|
@@ -3,22 +3,49 @@ import {
|
|
|
ColorUniform, Matrix3Uniform, Matrix4Uniform
|
|
ColorUniform, Matrix3Uniform, Matrix4Uniform
|
|
|
} from '../Uniform.js';
|
|
} from '../Uniform.js';
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Number uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments NumberUniform
|
|
|
|
|
+ */
|
|
|
class NumberNodeUniform extends NumberUniform {
|
|
class NumberNodeUniform extends NumberUniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Number uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Number} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -27,22 +54,49 @@ class NumberNodeUniform extends NumberUniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Vector2 uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments Vector2Uniform
|
|
|
|
|
+ */
|
|
|
class Vector2NodeUniform extends Vector2Uniform {
|
|
class Vector2NodeUniform extends Vector2Uniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Vector2 uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Vector2} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -51,22 +105,49 @@ class Vector2NodeUniform extends Vector2Uniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Vector3 uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments Vector3Uniform
|
|
|
|
|
+ */
|
|
|
class Vector3NodeUniform extends Vector3Uniform {
|
|
class Vector3NodeUniform extends Vector3Uniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Vector3 uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Vector3} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -75,22 +156,49 @@ class Vector3NodeUniform extends Vector3Uniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Vector4 uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments Vector4Uniform
|
|
|
|
|
+ */
|
|
|
class Vector4NodeUniform extends Vector4Uniform {
|
|
class Vector4NodeUniform extends Vector4Uniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Vector4 uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Vector4} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -99,22 +207,49 @@ class Vector4NodeUniform extends Vector4Uniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Color uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments ColorUniform
|
|
|
|
|
+ */
|
|
|
class ColorNodeUniform extends ColorUniform {
|
|
class ColorNodeUniform extends ColorUniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Color uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Color} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -123,22 +258,49 @@ class ColorNodeUniform extends ColorUniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Matrix3 uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments Matrix3Uniform
|
|
|
|
|
+ */
|
|
|
class Matrix3NodeUniform extends Matrix3Uniform {
|
|
class Matrix3NodeUniform extends Matrix3Uniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Matrix3 uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Matrix3} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|
|
@@ -147,22 +309,49 @@ class Matrix3NodeUniform extends Matrix3Uniform {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * A special form of Matrix4 uniform binding type.
|
|
|
|
|
+ * It's value is managed by a node object.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @private
|
|
|
|
|
+ * @augments Matrix4Uniform
|
|
|
|
|
+ */
|
|
|
class Matrix4NodeUniform extends Matrix4Uniform {
|
|
class Matrix4NodeUniform extends Matrix4Uniform {
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Constructs a new node-based Matrix4 uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param {NodeUniform} nodeUniform - The node uniform.
|
|
|
|
|
+ */
|
|
|
constructor( nodeUniform ) {
|
|
constructor( nodeUniform ) {
|
|
|
|
|
|
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
super( nodeUniform.name, nodeUniform.value );
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * The node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @type {NodeUniform}
|
|
|
|
|
+ */
|
|
|
this.nodeUniform = nodeUniform;
|
|
this.nodeUniform = nodeUniform;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Overwritten to return the value of the node uniform.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {Matrix4} The value.
|
|
|
|
|
+ */
|
|
|
getValue() {
|
|
getValue() {
|
|
|
|
|
|
|
|
return this.nodeUniform.value;
|
|
return this.nodeUniform.value;
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Returns the node uniform data type.
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return {String} The data type.
|
|
|
|
|
+ */
|
|
|
getType() {
|
|
getType() {
|
|
|
|
|
|
|
|
return this.nodeUniform.type;
|
|
return this.nodeUniform.type;
|