|
|
@@ -119,6 +119,9 @@
|
|
|
line.scale.set( 1, 1, 1 );
|
|
|
scene.add( line );
|
|
|
|
|
|
+
|
|
|
+ // THREE.Line ( THREE.BufferGeometry, THREE.LineBasicNodeMaterial ) - rendered with gl.LINE_STRIP
|
|
|
+
|
|
|
const geo = new THREE.BufferGeometry();
|
|
|
geo.setAttribute( 'position', new THREE.Float32BufferAttribute( positions, 3 ) );
|
|
|
geo.setAttribute( 'color', new THREE.Float32BufferAttribute( colors, 3 ) );
|
|
|
@@ -208,7 +211,7 @@
|
|
|
const param = {
|
|
|
'line type': 0,
|
|
|
'world units': false,
|
|
|
- 'width': 5,
|
|
|
+ 'width': 10,
|
|
|
'alphaToCoverage': false,
|
|
|
'dashed': false,
|
|
|
'dash offset': 0,
|
|
|
@@ -243,9 +246,18 @@
|
|
|
matLine.worldUnits = val;
|
|
|
matLine.needsUpdate = true;
|
|
|
|
|
|
+ if ( val ) {
|
|
|
+
|
|
|
+ widthController.name( 'width (world units)' ).min( 0.1 ).max( 0.5 ).setValue( 0.5 );
|
|
|
+
|
|
|
+ } else {
|
|
|
+
|
|
|
+ widthController.name( 'width (pixels)' ).min( 1 ).max( 10 ).setValue( 10 );
|
|
|
+ }
|
|
|
+
|
|
|
} );
|
|
|
|
|
|
- gui.add( param, 'width', 1, 10 ).onChange( function ( val ) {
|
|
|
+ const widthController = gui.add( param, 'width', 1, 10 ).name( 'width (pixels)' ).onChange( function ( val ) {
|
|
|
|
|
|
matLine.linewidth = val;
|
|
|
|