/** * A helper class for Float32Array. * * @author Luke Moody * @constructor * @param {Number} size The size of the array to create * @param {Number} itemSize The number of components per-value (ie. 3 for a vec3, 9 for a Mat3, etc.) */ export declare class Float32ArrayHelper { size: number; array: Float32Array; private itemSize; constructor(size: number, itemSize: number); /** * Sets the size of the internal array. * Delegates to `this.shrink` or `this.grow` depending on size * argument's relation to the current size of the internal array. * Note that if the array is to be shrunk, data will be lost. * @param {Number} size The new size of the array. */ setSize: (size: number) => void; /** * Shrinks the internal array. * @param {Number} size The new size of the typed array. Must be smaller than `this.array.length`. * @return {Float32ArrayHelper} Instance of this class. */ shrink: (size: number) => this; /** * Grows the internal array. * @param {Number} size The new size of the typed array. Must be larger than `this.array.length`. * @return {Float32ArrayHelper} Instance of this class. */ grow: (size: number) => this; /** * Perform a splice operation on this array's buffer. * @param {Number} start The start index of the splice. Will be multiplied by the number of components for this attribute. * @param {Number} end The end index of the splice. Will be multiplied by the number of components for this attribute. * @returns {Object} The Float32ArrayHelper instance. */ splice: (start: number, end: number) => this; /** * Copies from the given Float32Array into this one, using the index argument * as the start position. Alias for `Float32Array.set`. Will automatically resize * if the given source array is of a larger size than the internal array. * * @param {Number} index The start position from which to copy into this array. * @param {TypedArray} array The array from which to copy; the source array. * @return {Float32ArrayHelper} Instance of this class. */ private _setFromArray; /** * Set a Vector3 value using raw components. * * @param {Number} index The index at which to set the vec3 values from. * @param {Number} x The Vec3's `x` component. * @param {Number} y The Vec3's `y` component. * @param {Number} z The Vec3's `z` component. * @return {Float32ArrayHelper} Instance of this class. */ setVec3Components: (index: number, x: number, y: number, z: number) => this; /** * Set a Vector4 value using raw components. * * @param {Number} index The index at which to set the vec4 values from. * @param {Number} x The Vec4's `x` component. * @param {Number} y The Vec4's `y` component. * @param {Number} z The Vec4's `z` component. * @param {Number} w The Vec4's `w` component. * @return {Float32ArrayHelper} Instance of this class. */ setVec4Components: (index: number, x: number, y: number, z: number, w: number) => this; }