Skip to content

Commit

Permalink
Line2NodeMaterial: Fix usage of optional nodes. (#30107)
Browse files Browse the repository at this point in the history
* Line2NodeMaterial: fix gap

* Update PerspectiveCamera.js

---------

Co-authored-by: Samuel Rigaud <srigaud@duodisplay.com>
Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
  • Loading branch information
3 people authored Dec 11, 2024
1 parent a8aaca3 commit 3c2c930
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/materials/nodes/Line2NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class Line2NodeMaterial extends NodeMaterial {
if ( useDash ) {

const dashScaleNode = this.dashScaleNode ? float( this.dashScaleNode ) : materialLineScale;
const offsetNode = this.offsetNode ? float( this.offsetNodeNode ) : materialLineDashOffset;
const offsetNode = this.offsetNode ? float( this.offsetNode ) : materialLineDashOffset;

const instanceDistanceStart = attribute( 'instanceDistanceStart' );
const instanceDistanceEnd = attribute( 'instanceDistanceEnd' );
Expand Down Expand Up @@ -277,7 +277,7 @@ class Line2NodeMaterial extends NodeMaterial {
if ( useDash ) {

const dashSizeNode = this.dashSizeNode ? float( this.dashSizeNode ) : materialLineDashSize;
const gapSizeNode = this.dashSizeNode ? float( this.dashGapNode ) : materialLineGapSize;
const gapSizeNode = this.gapSizeNode ? float( this.gapSizeNode ) : materialLineGapSize;

dashSize.assign( dashSizeNode );
gapSize.assign( gapSizeNode );
Expand Down

0 comments on commit 3c2c930

Please sign in to comment.