(x, y, z)
| 18 | // test.scene.add(boxMesh); |
| 19 | |
| 20 | const addNewBoxMesh = (x, y, z) => { |
| 21 | const boxGeometry = new THREE.BoxGeometry(1, 1, 1); |
| 22 | const boxMaterial = new THREE.MeshPhongMaterial({ |
| 23 | color: 0xfafafa, |
| 24 | }); |
| 25 | const boxMesh = new THREE.Mesh(boxGeometry, boxMaterial); |
| 26 | boxMesh.position.set(x, y, z); |
| 27 | test.scene.add(boxMesh); |
| 28 | }; |
| 29 | |
| 30 | // top rows |
| 31 | addNewBoxMesh(0, 2, 0); |