Skip to content

Commit 3c023f2

Browse files
s-rigaudSamuel Rigaud
andauthored
Examples: fix bugs (#31842)
Co-authored-by: Samuel Rigaud <[email protected]>
1 parent 981732c commit 3c023f2

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

examples/physics_ammo_break.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@
538538

539539
if ( breakable0 && ! collided0 && maxImpulse > fractureImpulse ) {
540540

541-
const debris = convexBreaker.subdivideByImpact( threeObject0, impactPoint, impactNormal, 1, 2, 1.5 );
541+
const debris = convexBreaker.subdivideByImpact( threeObject0, impactPoint, impactNormal, 1, 2 );
542542

543543
const numObjects = debris.length;
544544
for ( let j = 0; j < numObjects; j ++ ) {
@@ -560,7 +560,7 @@
560560

561561
if ( breakable1 && ! collided1 && maxImpulse > fractureImpulse ) {
562562

563-
const debris = convexBreaker.subdivideByImpact( threeObject1, impactPoint, impactNormal, 1, 2, 1.5 );
563+
const debris = convexBreaker.subdivideByImpact( threeObject1, impactPoint, impactNormal, 1, 2 );
564564

565565
const numObjects = debris.length;
566566
for ( let j = 0; j < numObjects; j ++ ) {

examples/webgl_gpgpu_water.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,8 @@
328328
borderGeom.rotateY( Math.PI * 0.25 );
329329
poolBorder = new THREE.Mesh( borderGeom, new THREE.MeshStandardMaterial( { color: 0x908877, roughness: 0.2 } ) );
330330
scene.add( poolBorder );
331-
borderGeom.receiveShadow = true;
332-
borderGeom.castShadow = true;
331+
poolBorder.receiveShadow = true;
332+
poolBorder.castShadow = true;
333333

334334
// THREE.Mesh just for mouse raycasting
335335
const geometryRay = new THREE.PlaneGeometry( BOUNDS, BOUNDS, 1, 1 );

examples/webgl_lines_fat_raycasting.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
'width': matLine.linewidth,
8686
'alphaToCoverage': matLine.alphaToCoverage,
8787
'threshold': raycaster.params.Line2.threshold,
88-
'translation': raycaster.params.Line2.threshold,
88+
'translation': 0,
8989
'animate': true
9090

9191
};
@@ -197,7 +197,7 @@
197197
stats = new Stats( { horizontal: false, trackGPU: true } );
198198
stats.init( renderer );
199199
document.body.appendChild( stats.dom );
200-
200+
201201
initGui();
202202

203203
}

examples/webgl_loader_ldraw.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@
368368

369369
function updateProgressBar( fraction ) {
370370

371-
progressBarDiv.innerText = 'Loading... ' + Math.round( fraction * 100, 2 ) + '%';
371+
progressBarDiv.innerText = 'Loading... ' + Math.round( fraction * 100 ) + '%';
372372

373373
}
374374

examples/webgpu_lines_fat_raycasting.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
'width': matLine.linewidth,
8787
'alphaToCoverage': matLine.alphaToCoverage,
8888
'threshold': raycaster.params.Line2.threshold,
89-
'translation': raycaster.params.Line2.threshold,
89+
'translation': 0,
9090
'animate': true
9191

9292
};
@@ -198,7 +198,7 @@
198198
stats = new Stats( { horizontal: false, trackGPU: true } );
199199
stats.init( renderer );
200200
document.body.appendChild( stats.dom );
201-
201+
202202
initGui();
203203

204204
}

0 commit comments

Comments
 (0)