Explorar o código

Examples: fix bugs (#31842)

Co-authored-by: Samuel Rigaud <rigaud@gmail.com>
Samuel Rigaud hai 4 meses
pai
achega
3c023f2a13

+ 2 - 2
examples/physics_ammo_break.html

@@ -538,7 +538,7 @@
 
 				if ( breakable0 && ! collided0 && maxImpulse > fractureImpulse ) {
 
-					const debris = convexBreaker.subdivideByImpact( threeObject0, impactPoint, impactNormal, 1, 2, 1.5 );
+					const debris = convexBreaker.subdivideByImpact( threeObject0, impactPoint, impactNormal, 1, 2 );
 
 					const numObjects = debris.length;
 					for ( let j = 0; j < numObjects; j ++ ) {
@@ -560,7 +560,7 @@
 
 				if ( breakable1 && ! collided1 && maxImpulse > fractureImpulse ) {
 
-					const debris = convexBreaker.subdivideByImpact( threeObject1, impactPoint, impactNormal, 1, 2, 1.5 );
+					const debris = convexBreaker.subdivideByImpact( threeObject1, impactPoint, impactNormal, 1, 2 );
 
 					const numObjects = debris.length;
 					for ( let j = 0; j < numObjects; j ++ ) {

+ 2 - 2
examples/webgl_gpgpu_water.html

@@ -328,8 +328,8 @@
 				borderGeom.rotateY( Math.PI * 0.25 );
 				poolBorder = new THREE.Mesh( borderGeom, new THREE.MeshStandardMaterial( { color: 0x908877, roughness: 0.2 } ) );
 				scene.add( poolBorder );
-				borderGeom.receiveShadow = true;
-				borderGeom.castShadow = true;
+				poolBorder.receiveShadow = true;
+				poolBorder.castShadow = true;
 
 				// THREE.Mesh just for mouse raycasting
 				const geometryRay = new THREE.PlaneGeometry( BOUNDS, BOUNDS, 1, 1 );

+ 2 - 2
examples/webgl_lines_fat_raycasting.html

@@ -85,7 +85,7 @@
 				'width': matLine.linewidth,
 				'alphaToCoverage': matLine.alphaToCoverage,
 				'threshold': raycaster.params.Line2.threshold,
-				'translation': raycaster.params.Line2.threshold,
+				'translation': 0,
 				'animate': true
 
 			};
@@ -197,7 +197,7 @@
 				stats = new Stats( { horizontal: false, trackGPU: true } );
 				stats.init( renderer );
 				document.body.appendChild( stats.dom );
-			
+
 				initGui();
 
 			}

+ 1 - 1
examples/webgl_loader_ldraw.html

@@ -368,7 +368,7 @@
 
 			function updateProgressBar( fraction ) {
 
-				progressBarDiv.innerText = 'Loading... ' + Math.round( fraction * 100, 2 ) + '%';
+				progressBarDiv.innerText = 'Loading... ' + Math.round( fraction * 100 ) + '%';
 
 			}
 

+ 2 - 2
examples/webgpu_lines_fat_raycasting.html

@@ -86,7 +86,7 @@
 				'width': matLine.linewidth,
 				'alphaToCoverage': matLine.alphaToCoverage,
 				'threshold': raycaster.params.Line2.threshold,
-				'translation': raycaster.params.Line2.threshold,
+				'translation': 0,
 				'animate': true
 
 			};
@@ -198,7 +198,7 @@
 				stats = new Stats( { horizontal: false, trackGPU: true } );
 				stats.init( renderer );
 				document.body.appendChild( stats.dom );
-			
+
 				initGui();
 
 			}

粤ICP备19079148号