From 005930491762c0a1564b1fed8626583e27629713 Mon Sep 17 00:00:00 2001 From: yandeu <20306025+yandeu@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:15:51 +0200 Subject: [PATCH] Prepare for r156 --- src/examples/heightmap-with-color-scale.html | 2 +- src/examples/native-three-with-physics.html | 12 ++++++------ src/examples/softbody-cloth.html | 7 +------ src/examples/use-native-three-code.html | 2 +- 4 files changed, 9 insertions(+), 14 deletions(-) diff --git a/src/examples/heightmap-with-color-scale.html b/src/examples/heightmap-with-color-scale.html index af68479..b31e8d9 100644 --- a/src/examples/heightmap-with-color-scale.html +++ b/src/examples/heightmap-with-color-scale.html @@ -54,7 +54,7 @@ .scale(['#003eb2', '#0952c6', '#a49463', '#867645', '#3c6114', '#5a7f32', '#8c8e7b', '#a0a28f', '#ebebeb']) .domain([0, 0.025, 0.1, 0.2, 0.25, 0.8, 1.3, 1.45, 1.6]) - const mesh = this.third.heightMap.add(heightmap, { colorScale }) + const mesh = this.third.heightMap.add(heightmap, { colorScale, colorSpace: 'srgb' }) if (mesh) { // we position, scale, rotate etc. the mesh before adding physics to it mesh.scale.set(2, 2, 2) diff --git a/src/examples/native-three-with-physics.html b/src/examples/native-three-with-physics.html index ffbbbb9..1ec65c0 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 THREE.HemisphereLight(0xffffff, 0x000000, 1)) + scene.add(new THREE.AmbientLight(0xffffff, 1)) + const light = new THREE.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) diff --git a/src/examples/use-native-three-code.html b/src/examples/use-native-three-code.html index c0c4b10..34705be 100644 --- a/src/examples/use-native-three-code.html +++ b/src/examples/use-native-three-code.html @@ -34,7 +34,7 @@ this.third.physics.debug.enable() // Some "native" three.js code - const geometry = new THREE.BoxBufferGeometry(1, 1, 1) + const geometry = new THREE.BoxGeometry(1, 1, 1) const material = new THREE.MeshLambertMaterial({ color: 0x2194ce }) const cube = new THREE.Mesh(geometry, material) cube.position.set(0, 5, 0)