Skip to content

Commit

Permalink
WebGLNodes: Simpify onBuild().
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Nov 1, 2023
1 parent a615ade commit 9a2bcad
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions examples/jsm/renderers/webgl-legacy/nodes/WebGLNodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@ Material.prototype.onBuild = function ( object, parameters, renderer ) {

const material = this;

if ( Array.isArray( material ) ) {

for ( const m of material ) {

if ( m.isNodeMaterial === true ) {

builders.set( m, new WebGLNodeBuilder( object, renderer, parameters, m ).build() );

}

}

} else if ( material.isNodeMaterial === true ) {
if ( material.isNodeMaterial === true ) {

builders.set( material, new WebGLNodeBuilder( object, renderer, parameters, material ).build() );

Expand Down

0 comments on commit 9a2bcad

Please sign in to comment.