Creates a new TextureDataFloat instance with the specified dimensions and channel count.
The width of the texture in pixels
The height of the texture in pixels
The number of channels per pixel (e.g., 3 for RGB, 4 for RGBA)
Gets the underlying Float32Array containing the texture data.
The raw texture data as Float32Array
Gets the height of the texture in pixels.
The height of the texture
Gets the width of the texture in pixels.
The width of the texture
Gets the value of a specific channel at the given pixel coordinates.
The x-coordinate of the pixel
The y-coordinate of the pixel
The index of the channel to retrieve (0-based)
The floating-point value of the specified channel
Initializes the texture data with new dimensions and channel count. This method creates a new Float32Array, discarding any existing data.
The width of the texture in pixels
The height of the texture in pixels
The number of channels per pixel
Resizes the texture data to new dimensions and channel count. Existing data is preserved where possible during the resize operation.
The new width of the texture in pixels
The new height of the texture in pixels
The new number of channels per pixel
Sets the value of a specific channel at the given pixel coordinates.
The x-coordinate of the pixel
The y-coordinate of the pixel
The index of the channel to set (0-based)
The floating-point value to set for the channel
Static
transferTransfers data from a source ArrayBuffer to a new ArrayBuffer with the specified length. This is a utility method for efficiently copying array buffer data with different word sizes.
The source ArrayBuffer to copy data from
The length of the destination ArrayBuffer in bytes
A new ArrayBuffer containing the transferred data
A class for handling floating-point texture data with support for multi-channel pixels. This class provides methods to manipulate texture data stored as Float32Array, allowing for high-precision color and data storage in textures.