UNPKG

@openhps/core

Version:

Open Hybrid Positioning System - Core component

358 lines (326 loc) 7.42 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Vector4NodeUniform = exports.Vector3NodeUniform = exports.Vector2NodeUniform = exports.NumberNodeUniform = exports.Matrix4NodeUniform = exports.Matrix3NodeUniform = exports.Matrix2NodeUniform = exports.ColorNodeUniform = void 0; var _Uniform = require("../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 _Uniform.NumberUniform { /** * Constructs a new node-based Number uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {number} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Vector2 uniform binding type. * It's value is managed by a node object. * * @private * @augments Vector2Uniform */ exports.NumberNodeUniform = NumberNodeUniform; class Vector2NodeUniform extends _Uniform.Vector2Uniform { /** * Constructs a new node-based Vector2 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Vector2} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Vector3 uniform binding type. * It's value is managed by a node object. * * @private * @augments Vector3Uniform */ exports.Vector2NodeUniform = Vector2NodeUniform; class Vector3NodeUniform extends _Uniform.Vector3Uniform { /** * Constructs a new node-based Vector3 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Vector3} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Vector4 uniform binding type. * It's value is managed by a node object. * * @private * @augments Vector4Uniform */ exports.Vector3NodeUniform = Vector3NodeUniform; class Vector4NodeUniform extends _Uniform.Vector4Uniform { /** * Constructs a new node-based Vector4 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Vector4} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Color uniform binding type. * It's value is managed by a node object. * * @private * @augments ColorUniform */ exports.Vector4NodeUniform = Vector4NodeUniform; class ColorNodeUniform extends _Uniform.ColorUniform { /** * Constructs a new node-based Color uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Color} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Matrix2 uniform binding type. * It's value is managed by a node object. * * @private * @augments Matrix2Uniform */ exports.ColorNodeUniform = ColorNodeUniform; class Matrix2NodeUniform extends _Uniform.Matrix2Uniform { /** * Constructs a new node-based Matrix2 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Matrix2} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Matrix3 uniform binding type. * It's value is managed by a node object. * * @private * @augments Matrix3Uniform */ exports.Matrix2NodeUniform = Matrix2NodeUniform; class Matrix3NodeUniform extends _Uniform.Matrix3Uniform { /** * Constructs a new node-based Matrix3 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Matrix3} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } /** * A special form of Matrix4 uniform binding type. * It's value is managed by a node object. * * @private * @augments Matrix4Uniform */ exports.Matrix3NodeUniform = Matrix3NodeUniform; class Matrix4NodeUniform extends _Uniform.Matrix4Uniform { /** * Constructs a new node-based Matrix4 uniform. * * @param {NodeUniform} nodeUniform - The node uniform. */ constructor(nodeUniform) { super(nodeUniform.name, nodeUniform.value); /** * The node uniform. * * @type {NodeUniform} */ this.nodeUniform = nodeUniform; } /** * Overwritten to return the value of the node uniform. * * @return {Matrix4} The value. */ getValue() { return this.nodeUniform.value; } /** * Returns the node uniform data type. * * @return {string} The data type. */ getType() { return this.nodeUniform.type; } } exports.Matrix4NodeUniform = Matrix4NodeUniform;