Browse Source

Examples: Update `webgpu_lines_fat_raycasting` (#32060)

* Update webgpu_lines_fat_raycasting.html

* Update webgpu_lines_fat_raycasting.jpg
sunag 2 months ago
parent
commit
a31517aa5f

BIN
examples/screenshots/webgpu_lines_fat_raycasting.jpg


+ 6 - 4
examples/webgpu_lines_fat_raycasting.html

@@ -89,7 +89,7 @@
 
 			const params = {
 
-				'line type': 0,
+				'line type': 1,
 				'world units': matLine.worldUnits,
 				'visualize threshold': matThresholdLine.visible,
 				'width': matLine.linewidth,
@@ -177,13 +177,11 @@
 				segments.computeLineDistances();
 				segments.scale.set( 1, 1, 1 );
 				scene.add( segments );
-				segments.visible = false;
 
 				thresholdSegments = new LineSegments2( segmentsGeometry, matThresholdLine );
 				thresholdSegments.computeLineDistances();
 				thresholdSegments.scale.set( 1, 1, 1 );
 				scene.add( thresholdSegments );
-				thresholdSegments.visible = false;
 
 				line = new Line2( lineGeometry, matLine );
 				line.computeLineDistances();
@@ -201,6 +199,10 @@
 
 				//
 
+				switchLine( params[ 'line type' ] );
+
+				//
+
 				document.addEventListener( 'pointermove', onPointerMove );
 				window.addEventListener( 'resize', onWindowResize );
 				onWindowResize();
@@ -313,7 +315,7 @@
 
 					switchLine( val );
 
-				} ).setValue( 1 );
+				} );
 
 				gui.add( params, 'world units' ).onChange( function ( val ) {
 

粤ICP备19079148号