Skip to content

Commit

Permalink
Merge pull request mrdoob#12628 from WestLangley/dev-materials_channels
Browse files Browse the repository at this point in the history
Example: Prevent material.needsUpdate being true every frame
  • Loading branch information
mrdoob authored Nov 10, 2017
2 parents d4a7057 + 0ebf4a2 commit 4e8a8c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion examples/webgl_materials_channels.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@
side: 'double'
};

var sides = {
'front': THREE.FrontSide,
'back': THREE.BackSide,
'double': THREE.DoubleSide
};

var cameraOrtho, cameraPerspective;
var controlsOrtho, controlsPerspective;

Expand Down Expand Up @@ -277,7 +283,7 @@

}

if ( params.side !== material.side ) {
if ( sides[ params.side ] !== material.side ) {

switch ( params.side ) {

Expand Down

0 comments on commit 4e8a8c1

Please sign in to comment.