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 d432bc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
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 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)

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

0 comments on commit d432bc3

Please sign in to comment.