diff --git a/src/examples/native-three-with-physics.html b/src/examples/native-three-with-physics.html index ffbbbb9..6fe8ae9 100644 --- a/src/examples/native-three-with-physics.html +++ b/src/examples/native-three-with-physics.html @@ -42,9 +42,9 @@ const controls = new THREE.OrbitControls(camera, renderer.domElement) // light - scene.add(new THREE.HemisphereLight(0xffffbb, 0x080820, 1)) - scene.add(new THREE.AmbientLight(0x666666)) - const light = new THREE.DirectionalLight(0xdfebff, 1) + scene.add(new HemisphereLight(0xffffff, 0x000000, 1)) + scene.add(new AmbientLight(0xffffff, 1)) + const light = new DirectionalLight(0xffffff, 1) light.position.set(50, 200, 100) light.position.multiplyScalar(1.3) @@ -72,7 +72,7 @@ physics.add.existing(greenSphere) // green sphere - const geometry = new THREE.BoxBufferGeometry() + const geometry = new THREE.BoxGeometry() const material = new THREE.MeshLambertMaterial({ color: 0x00ff00 }) const cube = new THREE.Mesh(geometry, material) cube.position.set(0, 5, 0) @@ -84,10 +84,10 @@ const exclamationMark = () => { const material = new THREE.MeshLambertMaterial({ color: 0xffff00 }) - const sphere = new THREE.Mesh(new THREE.SphereBufferGeometry(0.25), material) + const sphere = new THREE.Mesh(new THREE.SphereGeometry(0.25), material) sphere.position.set(0, -0.8, 0) - const cube = new THREE.Mesh(new THREE.BoxBufferGeometry(0.4, 0.8, 0.4), material) + const cube = new THREE.Mesh(new THREE.BoxGeometry(0.4, 0.8, 0.4), material) cube.position.set(5, 2, 5) cube.add(sphere) diff --git a/src/examples/softbody-cloth.html b/src/examples/softbody-cloth.html index d27e73e..c772b5d 100644 --- a/src/examples/softbody-cloth.html +++ b/src/examples/softbody-cloth.html @@ -43,12 +43,7 @@ const clothNumSegmentsY = clothHeight * 5 const clothPos = new THREE.Vector3(0, 2, 2) - const clothGeometry = new THREE.PlaneBufferGeometry( - clothWidth, - clothHeight, - clothNumSegmentsZ, - clothNumSegmentsY - ) + const clothGeometry = new THREE.PlaneGeometry(clothWidth, clothHeight, clothNumSegmentsZ, clothNumSegmentsY) clothGeometry.rotateY(Math.PI * 0.5) clothGeometry.translate(clothPos.x, clothPos.y + clothHeight * 0.5, clothPos.z - clothWidth * 0.5)