📄 BuiltinNode.js
¶
📊 Analysis Summary¶
Metric | Count |
---|---|
🔧 Functions | 1 |
🧱 Classes | 1 |
📦 Imports | 2 |
📚 Table of Contents¶
🛠️ File Location:¶
📂 src/nodes/accessors/BuiltinNode.js
📦 Imports¶
Name | Source |
---|---|
Node |
../core/Node.js |
nodeProxy |
../tsl/TSLBase.js |
Functions¶
BuiltinNode.generate(): string
¶
JSDoc:
/**
* Generates the code snippet of the builtin node.
*
* @param {NodeBuilder} builder - The current node builder.
* @return {string} The generated code snippet.
*/
Returns: string
Classes¶
BuiltinNode
¶
Class Code
class BuiltinNode extends Node {
/**
* Constructs a new builtin node.
*
* @param {string} name - The name of the built-in shader variable.
*/
constructor( name ) {
super( 'float' );
/**
* The name of the built-in shader variable.
*
* @type {string}
*/
this.name = name;
/**
* This flag can be used for type testing.
*
* @type {boolean}
* @readonly
* @default true
*/
this.isBuiltinNode = true;
}
/**
* Generates the code snippet of the builtin node.
*
* @param {NodeBuilder} builder - The current node builder.
* @return {string} The generated code snippet.
*/
generate( /* builder */ ) {
return this.name;
}
}