Documentation Index
Fetch the complete documentation index at: https://mintlify.com/BunnyNabbit/celaria-formats/llms.txt
Use this file to discover all available pages before exploring further.
CelariaUvMap reads .cuvdata binary files and returns an array of UV texture coordinate entries. Each entry describes the texture region applied to a specific face of a specific block. This class is parse-only — there is no serialization method.
CelariaUvMap only supports reading .cuvdata files. Writing UV data back to the binary format is not supported.Static properties
fileSignature
.cuvdata file begins with. parse checks this value and throws if the buffer does not begin with it.
Static methods
parse(buffer)
Parses a .cuvdata binary buffer and returns an array of UvData objects.
A Node.js
Buffer containing the raw bytes of a .cuvdata file.UvData[]
The returned array contains one entry per face entry stored in the file. The file header contains a block count and a face count; the returned array length equals the face count.
UvData type
Each element returned by parse is a UvData object with the following fields:
The index of the block this UV entry applies to, corresponding to a block’s position in the map’s instance list.
The face of the block this UV entry applies to. Face indices are specific to the block geometry used by Celaria.
The left edge of the UV region in normalized texture coordinates (0.0–1.0).
The top edge of the UV region in normalized texture coordinates (0.0–1.0).
The right edge of the UV region in normalized texture coordinates (0.0–1.0).
The bottom edge of the UV region in normalized texture coordinates (0.0–1.0).
startX, startY, endX, endY) are stored as 32-bit floats in the binary format.
Full example
Related
UV maps guide
How to read and work with
.cuvdata UV texture data.CelariaMap
The finalized map format that UV data corresponds to.
Types
Type definitions including
UvData.Block
Block instances that UV entries reference by index.