fixed index.js
This commit is contained in:
parent
f69653a0a9
commit
301cad8398
|
@ -2,7 +2,7 @@
|
||||||
console.log("/root/index.js: hello world")
|
console.log("/root/index.js: hello world")
|
||||||
|
|
||||||
function doTHREE(){
|
function doTHREE(){
|
||||||
const scene = AFRAME.scenes[0]
|
const scene = AFRAME.scenes[0].object3D
|
||||||
const object = new THREE.Mesh(
|
const object = new THREE.Mesh(
|
||||||
new THREE.BoxGeometry(1, 1, 1),
|
new THREE.BoxGeometry(1, 1, 1),
|
||||||
new THREE.MeshBasicMaterial({ color: 0xff0000 })
|
new THREE.MeshBasicMaterial({ color: 0xff0000 })
|
||||||
|
@ -12,6 +12,6 @@ function doTHREE(){
|
||||||
scene.add(object);
|
scene.add(object);
|
||||||
}
|
}
|
||||||
|
|
||||||
//doTHREE()
|
//doTHREE() // uncomment this to test
|
||||||
|
|
||||||
// for [higherlevel] AFRAME markup see ~/index.html
|
// for [higherlevel] AFRAME markup see ~/index.html
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue