This commit is contained in:
parent
c40aeb1dfb
commit
04e1d0d313
37
src/index.js
37
src/index.js
@ -13,19 +13,30 @@ if (WebGL.isWebGL2Available()) {
|
|||||||
layer.bind(world);
|
layer.bind(world);
|
||||||
console.log(layer);
|
console.log(layer);
|
||||||
|
|
||||||
const test1 = document.createElement('div');
|
{
|
||||||
test1.style.width = '10%';
|
const test = document.createElement('div');
|
||||||
test1.style.height = '10%';
|
test.style.width = '10%';
|
||||||
test1.style.background = 'red';
|
test.style.height = '10%';
|
||||||
test1.style.pointerEvents = 'fill';
|
test.style.background = 'red';
|
||||||
layer.add(test1, { x: 0, y: 0, z: 0 });
|
test.style.pointerEvents = 'fill';
|
||||||
|
layer.add(test, { x: 0, y: 0, z: 0 });
|
||||||
const test2 = document.createElement('div');
|
}
|
||||||
test2.style.width = '5%';
|
{
|
||||||
test2.style.height = '5%';
|
const test = document.createElement('div');
|
||||||
test2.style.background = 'green';
|
test.style.width = '5%';
|
||||||
test2.style.pointerEvents = 'fill';
|
test.style.height = '5%';
|
||||||
layer.add(test2, { x: 0, y: 0, z: 1 });
|
test.style.background = 'green';
|
||||||
|
test.style.pointerEvents = 'fill';
|
||||||
|
layer.add(test, { x: 0, y: 0, z: 1 });
|
||||||
|
}
|
||||||
|
{
|
||||||
|
const test = document.createElement('div');
|
||||||
|
test.style.width = '1%';
|
||||||
|
test.style.height = '1%';
|
||||||
|
test.style.background = 'blue';
|
||||||
|
test.style.pointerEvents = 'fill';
|
||||||
|
layer.add(test, { x: 4 * Pseudo3DLayer.PixelToBlockMultiple, y: 2 * Pseudo3DLayer.PixelToBlockMultiple, z: 2 });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
document.body.appendChild(WebGL.getWebGL2ErrorMessage());
|
document.body.appendChild(WebGL.getWebGL2ErrorMessage());
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user