UNPKG

gulp-structify

Version:

Generates WebGL-compatible Structs and StructBuffers from a template file.

48 lines (47 loc) 1.53 kB
import { TypedArray } from './typedarray'; export declare class Template<T extends TypedArray> { /** * Sets each component of this struct to that of the other struct. */ set(other: this): void; /** * Sets each component of this struct to the specified scalar. */ setScalar(k: number): void; /** * Adds the other struct to this struct componentwise. */ add(other: this): void; /** * Subtracts the other struct from this struct componentwise. */ subtract(other: this): void; /** * Multiplies each component of this struct by the specified scalar. */ mulScalar(k: number): void; /** * Divides each component of this struct by the specified scalar. */ divScalar(k: number): void; /** * Checks if each component of this struct is equal to that of the other struct. */ equals(other: this): boolean; /** * Checks if each component of this struct is equal to the specified scalar. */ equalsScalar(k: number): boolean; /** * Checks if each component of this struct is approximately equal to that of the other struct. */ epsilonEquals(other: this, e: number): boolean; /** * Checks if each component of this struct is approximately equal to the specified scalar. */ epsilonEqualsScalar(k: number, e: number): boolean; /** * Returns a string representation of this struct. */ toString(): string; }