sunag 7 лет назад
Родитель
Сommit
232cb3f4cc

+ 1 - 1
examples/js/nodes/Nodes.js

@@ -2,7 +2,7 @@
 
 // core
 
-export { GLNode } from './core/GLNode.js';
+export { Node } from './core/Node.js';
 export { TempNode } from './core/TempNode.js';
 export { InputNode } from './core/InputNode.js';
 export { ConstNode } from './core/ConstNode.js';

+ 2 - 2
examples/js/nodes/THREE.Nodes.js

@@ -2,7 +2,7 @@ import {
 
 	// core
 	
-	GLNode,
+	Node,
 	TempNode,
 	InputNode,
 	ConstNode,
@@ -106,7 +106,7 @@ import {
 
 // core
 
-THREE.GLNode = GLNode;
+THREE.Node = Node;
 THREE.TempNode = TempNode;
 THREE.InputNode = InputNode;
 THREE.ConstNode = ConstNode;

+ 4 - 4
examples/js/nodes/core/AttributeNode.js

@@ -2,17 +2,17 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from './GLNode.js';
+import { Node } from './Node.js';
 
 function AttributeNode( name, type ) {
 
-	GLNode.call( this, type );
+	Node.call( this, type );
 
 	this.name = name;
 
 };
 
-AttributeNode.prototype = Object.create( GLNode.prototype );
+AttributeNode.prototype = Object.create( Node.prototype );
 AttributeNode.prototype.constructor = AttributeNode;
 AttributeNode.prototype.nodeType = "Attribute";
 
@@ -45,7 +45,7 @@ AttributeNode.prototype.generate = function ( builder, output ) {
 
 AttributeNode.prototype.copy = function ( source ) {
 			
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	this.type = source.type;
 	

+ 4 - 4
examples/js/nodes/core/GLNode.js → examples/js/nodes/core/Node.js

@@ -2,7 +2,7 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-function GLNode( type ) {
+function Node( type ) {
 
 	this.uuid = THREE.Math.generateUUID();
 
@@ -14,9 +14,9 @@ function GLNode( type ) {
 
 };
 
-GLNode.prototype = {
+Node.prototype = {
 
-	constructor: GLNode,
+	constructor: Node,
 	
 	isNode: true,
 	
@@ -173,4 +173,4 @@ GLNode.prototype = {
 	
 };
 
-export { GLNode };
+export { Node };

+ 7 - 7
examples/js/nodes/core/TempNode.js

@@ -3,11 +3,11 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from './GLNode.js';
+import { Node } from './Node.js';
 
 function TempNode( type, params ) {
 
-	GLNode.call( this, type );
+	Node.call( this, type );
 
 	params = params || {};
 
@@ -16,7 +16,7 @@ function TempNode( type, params ) {
 
 };
 
-TempNode.prototype = Object.create( GLNode.prototype );
+TempNode.prototype = Object.create( Node.prototype );
 TempNode.prototype.constructor = TempNode;
 
 TempNode.prototype.build = function ( builder, output, uuid, ns ) {
@@ -47,17 +47,17 @@ TempNode.prototype.build = function ( builder, output, uuid, ns ) {
 
 			}
 
-			return GLNode.prototype.build.call( this, builder, output, uuid );
+			return Node.prototype.build.call( this, builder, output, uuid );
 
 		} else if ( isUnique ) {
 
-			data.name = data.name || GLNode.prototype.build.call( this, builder, output, uuid );
+			data.name = data.name || Node.prototype.build.call( this, builder, output, uuid );
 
 			return data.name;
 
 		} else if ( ! builder.optimize || data.deps == 1 ) {
 
-			return GLNode.prototype.build.call( this, builder, output, uuid );
+			return Node.prototype.build.call( this, builder, output, uuid );
 
 		}
 
@@ -84,7 +84,7 @@ TempNode.prototype.build = function ( builder, output, uuid, ns ) {
 
 	}
 
-	return GLNode.prototype.build.call( this, builder, output, uuid );
+	return Node.prototype.build.call( this, builder, output, uuid );
 
 };
 

+ 4 - 4
examples/js/nodes/core/VarNode.js

@@ -2,17 +2,17 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from './GLNode.js';
+import { Node } from './Node.js';
 
 function VarNode( type, value ) {
 
-	GLNode.call( this, type );
+	Node.call( this, type );
 	
 	this.value = value;
 
 };
 
-VarNode.prototype = Object.create( GLNode.prototype );
+VarNode.prototype = Object.create( Node.prototype );
 VarNode.prototype.constructor = VarNode;
 VarNode.prototype.nodeType = "Var";
 
@@ -38,7 +38,7 @@ VarNode.prototype.generate = function ( builder, output ) {
 
 VarNode.prototype.copy = function ( source ) {
 	
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	this.type = source.type;
 	this.value = source.value;

+ 4 - 4
examples/js/nodes/materials/nodes/PhongNode.js

@@ -2,13 +2,13 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../../core/GLNode.js';
+import { Node } from '../../core/Node.js';
 import { ColorNode } from '../../inputs/ColorNode.js';
 import { FloatNode } from '../../inputs/FloatNode.js';
  
 function PhongNode() {
 
-	GLNode.call( this );
+	Node.call( this );
 
 	this.color = new ColorNode( 0xEEEEEE );
 	this.specular = new ColorNode( 0x111111 );
@@ -16,7 +16,7 @@ function PhongNode() {
 
 };
 
-PhongNode.prototype = Object.create( GLNode.prototype );
+PhongNode.prototype = Object.create( Node.prototype );
 PhongNode.prototype.constructor = PhongNode;
 PhongNode.prototype.nodeType = "Phong";
 
@@ -321,7 +321,7 @@ PhongNode.prototype.build = function ( builder ) {
 
 PhongNode.prototype.copy = function ( source ) {
 			
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	// vertex
 

+ 4 - 4
examples/js/nodes/materials/nodes/RawNode.js

@@ -2,17 +2,17 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../../core/GLNode.js';
+import { Node } from '../../core/Node.js';
 
 function RawNode( value ) {
 
-	GLNode.call( this, 'v4' );
+	Node.call( this, 'v4' );
 
 	this.value = value;
 
 };
 
-RawNode.prototype = Object.create( GLNode.prototype );
+RawNode.prototype = Object.create( Node.prototype );
 RawNode.prototype.constructor = RawNode;
 RawNode.prototype.nodeType = "Raw";
 
@@ -37,7 +37,7 @@ RawNode.prototype.generate = function ( builder ) {
 
 RawNode.prototype.copy = function ( source ) {
 	
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	this.value = source.value;
 	

+ 4 - 4
examples/js/nodes/materials/nodes/SpriteNode.js

@@ -2,19 +2,19 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../../core/GLNode.js';
+import { Node } from '../../core/Node.js';
 import { ColorNode } from '../../inputs/ColorNode.js';
 
 function SpriteNode() {
 
-	GLNode.call( this );
+	Node.call( this );
 
 	this.color = new ColorNode( 0xEEEEEE );
 	this.spherical = true;
 
 };
 
-SpriteNode.prototype = Object.create( GLNode.prototype );
+SpriteNode.prototype = Object.create( Node.prototype );
 SpriteNode.prototype.constructor = SpriteNode;
 SpriteNode.prototype.nodeType = "Sprite";
 
@@ -144,7 +144,7 @@ SpriteNode.prototype.build = function ( builder ) {
 
 SpriteNode.prototype.copy = function ( source ) {
 			
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	// vertex
 	

+ 4 - 4
examples/js/nodes/materials/nodes/StandardNode.js

@@ -2,14 +2,14 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../../core/GLNode.js';
+import { Node } from '../../core/Node.js';
 import { ColorNode } from '../../inputs/ColorNode.js';
 import { FloatNode } from '../../inputs/FloatNode.js';
 import { RoughnessToBlinnExponentNode } from '../../bsdfs/RoughnessToBlinnExponentNode.js';
  
 function StandardNode() {
 
-	GLNode.call( this );
+	Node.call( this );
 
 	this.color = new ColorNode( 0xEEEEEE );
 	this.roughness = new FloatNode( 0.5 );
@@ -17,7 +17,7 @@ function StandardNode() {
 
 };
 
-StandardNode.prototype = Object.create( GLNode.prototype );
+StandardNode.prototype = Object.create( Node.prototype );
 StandardNode.prototype.constructor = StandardNode;
 StandardNode.prototype.nodeType = "Standard";
 
@@ -392,7 +392,7 @@ StandardNode.prototype.build = function ( builder ) {
 
 StandardNode.prototype.copy = function ( source ) {
 			
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	// vertex
 

+ 4 - 4
examples/js/nodes/utils/BypassNode.js

@@ -2,18 +2,18 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../core/GLNode.js';
+import { Node } from '../core/Node.js';
 
 function BypassNode( code, value ) {
 
-	GLNode.call( this );
+	Node.call( this );
 
 	this.code = code;
 	this.value = value;
 
 };
 
-BypassNode.prototype = Object.create( GLNode.prototype );
+BypassNode.prototype = Object.create( Node.prototype );
 BypassNode.prototype.constructor = BypassNode;
 BypassNode.prototype.nodeType = "Bypass";
 
@@ -57,7 +57,7 @@ BypassNode.prototype.generate = function ( builder, output ) {
 
 BypassNode.prototype.copy = function ( source ) {
 	
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	this.code = source.code;
 	this.value = source.value;

+ 4 - 4
examples/js/nodes/utils/SwitchNode.js

@@ -2,18 +2,18 @@
  * @author sunag / http://www.sunag.com.br/
  */
 
-import { GLNode } from '../core/GLNode.js';
+import { Node } from '../core/Node.js';
  
 function SwitchNode( node, components ) {
 
-	GLNode.call( this );
+	Node.call( this );
 
 	this.node = node;
 	this.components = components || 'x';
 
 };
 
-SwitchNode.prototype = Object.create( GLNode.prototype );
+SwitchNode.prototype = Object.create( Node.prototype );
 SwitchNode.prototype.constructor = SwitchNode;
 SwitchNode.prototype.nodeType = "Switch";
 
@@ -75,7 +75,7 @@ SwitchNode.prototype.generate = function ( builder, output ) {
 
 SwitchNode.prototype.copy = function ( source ) {
 			
-	GLNode.prototype.copy.call( this, source );
+	Node.prototype.copy.call( this, source );
 	
 	this.node = source.node;
 	this.components = source.components;