ソースを参照

.input -> .output NodePostProcessing

sunag 7 年 前
コミット
3e7cbc282b

+ 6 - 6
examples/js/nodes/postprocessing/NodePostProcessing.js

@@ -24,7 +24,7 @@ function NodePostProcessing( renderer, renderTarget ) {
 	this.renderer = renderer;
 	this.renderer = renderer;
 	this.renderTarget = renderTarget;
 	this.renderTarget = renderTarget;
 
 
-	this.input = new ScreenNode();
+	this.output = new ScreenNode();
 	this.material = new NodeMaterial();
 	this.material = new NodeMaterial();
 
 
 	this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
 	this.camera = new THREE.OrthographicCamera( - 1, 1, 1, - 1, 0, 1 );
@@ -48,7 +48,7 @@ NodePostProcessing.prototype = {
 
 
 			this.material.dispose();
 			this.material.dispose();
 
 
-			this.material.fragment.value = this.input;
+			this.material.fragment.value = this.output;
 			this.material.build();
 			this.material.build();
 
 
 			if (this.material.uniforms.renderTexture) {
 			if (this.material.uniforms.renderTexture) {
@@ -98,16 +98,16 @@ NodePostProcessing.prototype = {
 
 
 		}
 		}
 
 
-		if ( meta && ! meta.postprocessing ) meta.postprocessing = {};
+		if ( meta && ! meta.post ) meta.post = {};
 
 
-		if ( ! meta.postprocessing[ this.uuid ] ) {
+		if ( ! meta.post[ this.uuid ] ) {
 
 
 			var data = {};
 			var data = {};
 
 
 			data.uuid = this.uuid;
 			data.uuid = this.uuid;
 			data.type = "NodePostProcessing";
 			data.type = "NodePostProcessing";
 
 
-			meta.postprocessing[ this.uuid ] = data;
+			meta.post[ this.uuid ] = data;
 
 
 			if ( this.name !== "" ) data.name = this.name;
 			if ( this.name !== "" ) data.name = this.name;
 
 
@@ -117,7 +117,7 @@ NodePostProcessing.prototype = {
 
 
 		}
 		}
 
 
-		meta.postprocessing = this.uuid;
+		meta.post = this.uuid;
 
 
 		return meta;
 		return meta;
 		
 		

+ 10 - 10
examples/webgl_postprocessing_nodes.html

@@ -149,7 +149,7 @@
 						var brightnessNode = new THREE.ColorAdjustmentNode( vibranceNode, brightness, THREE.ColorAdjustmentNode.BRIGHTNESS );
 						var brightnessNode = new THREE.ColorAdjustmentNode( vibranceNode, brightness, THREE.ColorAdjustmentNode.BRIGHTNESS );
 						var contrastNode = new THREE.ColorAdjustmentNode( brightnessNode, contrast, THREE.ColorAdjustmentNode.CONTRAST );
 						var contrastNode = new THREE.ColorAdjustmentNode( brightnessNode, contrast, THREE.ColorAdjustmentNode.CONTRAST );
 
 
-						nodepost.input = contrastNode;
+						nodepost.output = contrastNode;
 
 
 						// GUI
 						// GUI
 
 
@@ -199,7 +199,7 @@
 							THREE.Math3Node.MIX
 							THREE.Math3Node.MIX
 						);
 						);
 
 
-						nodepost.input = fade;
+						nodepost.output = fade;
 
 
 						// GUI
 						// GUI
 
 
@@ -233,7 +233,7 @@
 							THREE.Math3Node.MIX
 							THREE.Math3Node.MIX
 						);
 						);
 
 
-						nodepost.input = fade;
+						nodepost.output = fade;
 
 
 						// GUI
 						// GUI
 
 
@@ -255,7 +255,7 @@
 							THREE.OperatorNode.ADD
 							THREE.OperatorNode.ADD
 						);
 						);
 
 
-						nodepost.input = multiply;
+						nodepost.output = multiply;
 
 
 						// GUI
 						// GUI
 
 
@@ -293,7 +293,7 @@
 						saturation.inputs.rgb = screen;
 						saturation.inputs.rgb = screen;
 						saturation.inputs.adjustment = sat;
 						saturation.inputs.adjustment = sat;
 
 
-						nodepost.input = saturation;
+						nodepost.output = saturation;
 
 
 						// GUI
 						// GUI
 
 
@@ -346,7 +346,7 @@
 
 
 						var screen = new THREE.ScreenNode( offsetCoord );
 						var screen = new THREE.ScreenNode( offsetCoord );
 
 
-						nodepost.input = screen;
+						nodepost.output = screen;
 
 
 						// GUI
 						// GUI
 
 
@@ -386,7 +386,7 @@
 						var currentFrame = new THREE.RTTNode( size.width, size.height, motionBlur );
 						var currentFrame = new THREE.RTTNode( size.width, size.height, motionBlur );
 						currentFrame.saveTo = previousFrame;
 						currentFrame.saveTo = previousFrame;
 						
 						
-						nodepost.input = currentFrame;
+						nodepost.output = currentFrame;
 						
 						
 						break;
 						break;
 						
 						
@@ -422,7 +422,7 @@
 							THREE.Math3Node.MIX
 							THREE.Math3Node.MIX
 						);
 						);
 
 
-						nodepost.input = new THREE.ScreenNode( fadeScreen );
+						nodepost.output = new THREE.ScreenNode( fadeScreen );
 
 
 						// GUI
 						// GUI
 
 
@@ -457,7 +457,7 @@
 						var blurScreen = new THREE.BlurNode( new THREE.ScreenNode() );
 						var blurScreen = new THREE.BlurNode( new THREE.ScreenNode() );
 						blurScreen.size = new THREE.Vector2( size.width, size.height );
 						blurScreen.size = new THREE.Vector2( size.width, size.height );
 
 
-						nodepost.input = blurScreen;
+						nodepost.output = blurScreen;
 
 
 						// GUI
 						// GUI
 
 
@@ -487,7 +487,7 @@
 
 
 				var json = nodepost.toJSON();
 				var json = nodepost.toJSON();
 
 
-				nodepost.input = new THREE.NodeMaterialLoader( null, library ).parse( json ).value;
+				nodepost.output = new THREE.NodeMaterialLoader( null, library ).parse( json ).value;
 */
 */
 			}
 			}