Skip to content

Commit

Permalink
Prepare for r156
Browse files Browse the repository at this point in the history
  • Loading branch information
yandeu committed Oct 11, 2023
1 parent fc27e88 commit 0059304
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/examples/heightmap-with-color-scale.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 6 additions & 6 deletions src/examples/native-three-with-physics.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
7 changes: 1 addition & 6 deletions src/examples/softbody-cloth.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion src/examples/use-native-three-code.html
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0059304

Please sign in to comment.