Skip to content

⬅️ Back to Table of Contents

📄 ParameterNode.js

📊 Analysis Summary

Metric Count
🔧 Functions 3
🧱 Classes 1
📦 Imports 2

📚 Table of Contents

🛠️ File Location:

📂 src/nodes/core/ParameterNode.js

📦 Imports

Name Source
nodeObject ../tsl/TSLBase.js
PropertyNode ./PropertyNode.js

Functions

ParameterNode.getHash(): string

Returns: string

Code
getHash() {

        return this.uuid;

    }

ParameterNode.generate(): string

Returns: string

Code
generate() {

        return this.name;

    }

parameter(type: string, name: string): ParameterNode

Parameters:

  • type string
  • name string

Returns: ParameterNode

Calls:

  • nodeObject (from ../tsl/TSLBase.js)
Code
( type, name ) => nodeObject( new ParameterNode( type, name ) )

Classes

ParameterNode

Class Code
class ParameterNode extends PropertyNode {

    static get type() {

        return 'ParameterNode';

    }

    /**
     * Constructs a new parameter node.
     *
     * @param {string} nodeType - The type of the node.
     * @param {?string} [name=null] - The name of the parameter in the shader.
     */
    constructor( nodeType, name = null ) {

        super( nodeType, name );

        /**
         * This flag can be used for type testing.
         *
         * @type {boolean}
         * @readonly
         * @default true
         */
        this.isParameterNode = true;

    }

    getHash() {

        return this.uuid;

    }

    generate() {

        return this.name;

    }

}

Methods

getHash(): string
Code
getHash() {

        return this.uuid;

    }
generate(): string
Code
generate() {

        return this.name;

    }