Skip to content

Commit

Permalink
Examples: Clean up. (#30297)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 authored Jan 9, 2025
1 parent 4e91f68 commit 7e300eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
Binary file modified examples/screenshots/webgpu_camera_array.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 3 additions & 5 deletions examples/webgpu_camera_array.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
light.position.set( 0.5, 0.5, 1 );
light.castShadow = true;
light.shadow.camera.zoom = 4; // tighter shadow map
light.shadow.bias = - 0.001;
scene.add( light );

const geometryBackground = new THREE.PlaneGeometry( 100, 100 );
Expand All @@ -76,15 +77,15 @@
background.position.set( 0, 0, - 1 );
scene.add( background );

const geometryCylinder = new THREE.CylinderGeometry( 0.5, 0.5, 1, 32 );
const geometryCylinder = new THREE.BoxGeometry();
const materialCylinder = new THREE.MeshPhongMaterial( { color: 0xff0000 } );

mesh = new THREE.Mesh( geometryCylinder, materialCylinder );
mesh.castShadow = true;
mesh.receiveShadow = true;
scene.add( mesh );

renderer = new THREE.WebGPURenderer();
renderer = new THREE.WebGPURenderer( { antialias: true } );
renderer.setPixelRatio( window.devicePixelRatio );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.setAnimationLoop( animate );
Expand Down Expand Up @@ -131,9 +132,6 @@

function animate() {

mesh.rotation.x += 0.005;
mesh.rotation.z += 0.01;

renderer.render( scene, camera );

}
Expand Down

0 comments on commit 7e300eb

Please sign in to comment.