Skip to content

⬅️ Back to Table of Contents

📄 Uniform.js

📊 Analysis Summary

Metric Count
🔧 Functions 1
🧱 Classes 1

📚 Table of Contents

🛠️ File Location:

📂 src/core/Uniform.js

Functions

Uniform.clone(): Uniform

JSDoc:

/**
     * Returns a new uniform with copied values from this instance.
     * If the value has a `clone()` method, the value is cloned as well.
     *
     * @return {Uniform} A clone of this instance.
     */

Returns: Uniform

Calls:

  • this.value.clone
Code
clone() {

        return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );

    }

Classes

Uniform

Class Code
class Uniform {

    /**
     * Constructs a new uniform.
     *
     * @param {any} value - The uniform value.
     */
    constructor( value ) {

        /**
         * The uniform value.
         *
         * @type {any}
         */
        this.value = value;

    }

    /**
     * Returns a new uniform with copied values from this instance.
     * If the value has a `clone()` method, the value is cloned as well.
     *
     * @return {Uniform} A clone of this instance.
     */
    clone() {

        return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );

    }

}

Methods

clone(): Uniform
Code
clone() {

        return new Uniform( this.value.clone === undefined ? this.value : this.value.clone() );

    }