فهرست منبع

Added sheen to copy and toJSON functions

Daniel Sturk 6 سال پیش
والد
کامیت
59f550089c
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      examples/jsm/nodes/materials/nodes/StandardNode.js

+ 6 - 0
examples/jsm/nodes/materials/nodes/StandardNode.js

@@ -155,6 +155,8 @@ StandardNode.prototype.build = function ( builder ) {
 
 		if ( this.environment ) this.environment.analyze( builder, { cache: 'env', context: contextEnvironment, slot: 'environment' } ); // isolate environment from others inputs ( see TextureNode, CubeTextureNode )
 
+		if ( this.sheen ) this.sheen.analyze( builder );
+
 		// build code
 
 		var mask = this.mask ? this.mask.flow( builder, 'b' ) : undefined;
@@ -466,6 +468,8 @@ StandardNode.prototype.copy = function ( source ) {
 	if ( source.ambient ) this.ambient = source.ambient;
 
 	if ( source.environment ) this.environment = source.environment;
+	
+	if ( source.sheen ) this.sheen = source.sheen;
 
 };
 
@@ -507,6 +511,8 @@ StandardNode.prototype.toJSON = function ( meta ) {
 		if ( this.ambient ) data.ambient = this.ambient.toJSON( meta ).uuid;
 
 		if ( this.environment ) data.environment = this.environment.toJSON( meta ).uuid;
+		
+		if ( this.sheen ) data.sheen = this.sheen.toJSON( meta ).uuid;
 
 	}