Skip to content

Commit ef4c655

Browse files
Mugen87RuthySheffi
authored andcommitted
MaterialNode: Fix dashOffset with LineDashedMaterial. (mrdoob#31008)
* MaterialNode: Fix `dashOffset` with `LineDashedMaterial`. * Examples: Fix dash scale property.
1 parent 0ce0996 commit ef4c655

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

examples/webgpu_lines_fat_wireframe.html

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

221221
gui.add( param, 'dash scale', 0.5, 1, 0.1 ).onChange( function ( val ) {
222222

223-
matLine.dashScale = val;
223+
matLine.scale = val;
224224
matLineDashed.scale = val;
225225

226226
} );

src/nodes/accessors/MaterialNode.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,10 @@ class MaterialNode extends Node {
386386

387387
node = this.getTexture( scope ).r.sub( 1.0 ).mul( this.getFloat( 'aoMapIntensity' ) ).add( 1.0 );
388388

389+
} else if ( scope === MaterialNode.LINE_DASH_OFFSET ) {
390+
391+
node = ( material.dashOffset ) ? this.getFloat( scope ) : float( 0 );
392+
389393
} else {
390394

391395
const outputType = this.getNodeType( builder );

0 commit comments

Comments
 (0)