📄 UniformGroupNode.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 4 |
🧱 Classes | 1 |
📦 Imports | 1 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/nodes/core/UniformGroupNode.js
📦 Imports¶
Name | Source |
---|---|
Node |
./Node.js |
Functions¶
UniformGroupNode.serialize(data: any): void
¶
Parameters:
data
any
Returns: void
Calls:
super.serialize
Code
UniformGroupNode.deserialize(data: any): void
¶
Parameters:
data
any
Returns: void
Calls:
super.deserialize
Code
uniformGroup(name: string): UniformGroupNode
¶
Parameters:
name
string
Returns: UniformGroupNode
sharedUniformGroup(name: string, order: number): UniformGroupNode
¶
Parameters:
name
string
order
number
Returns: UniformGroupNode
Classes¶
UniformGroupNode
¶
Class Code
class UniformGroupNode extends Node {
static get type() {
return 'UniformGroupNode';
}
/**
* Constructs a new uniform group node.
*
* @param {string} name - The name of the uniform group node.
* @param {boolean} [shared=false] - Whether this uniform group node is shared or not.
* @param {number} [order=1] - Influences the internal sorting.
*/
constructor( name, shared = false, order = 1 ) {
super( 'string' );
/**
* The name of the uniform group node.
*
* @type {string}
*/
this.name = name;
/**
* Whether this uniform group node is shared or not.
*
* @type {boolean}
* @default false
*/
this.shared = shared;
/**
* Influences the internal sorting.
* TODO: Add details when this property should be changed.
*
* @type {number}
* @default 1
*/
this.order = order;
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isUniformGroup = true;
}
serialize( data ) {
super.serialize( data );
data.name = this.name;
data.version = this.version;
data.shared = this.shared;
}
deserialize( data ) {
super.deserialize( data );
this.name = data.name;
this.version = data.version;
this.shared = data.shared;
}
}