Skip to content
Shapemetry

@huukhanhnguyen/types / evaluate/texture

evaluate/texture

TextureData

TextureData = { data: Uint8ClampedArray; filter?: "linear" | "nearest"; height: number; tileHeight?: number; tileWidth?: number; uvSet?: 0 | 1; width: number; wrap?: "repeat" | "clamp" | "mirror"; }

Resolved texture pixels + sampling metadata. The texture-chain ENGINE (which PRODUCES these) stays in the model package — this is the inert output bag a pixel consumer takes, and a Material alone cannot carry it (its texture / normalTexture / … fields are URI strings).

data

data: Uint8ClampedArray

filter?

optional filter?: "linear" | "nearest"

Sampler filter from the chain's declared filter builtin. Absent = linear.

height

height: number

tileHeight?

optional tileHeight?: number

tileWidth?

optional tileWidth?: number

Physical mm of one tile — renderers/exporters prefer this over material tile*.

uvSet?

optional uvSet?: 0 | 1

Which UV set this texture samples (0 = TEXCOORD_0, 1 = TEXCOORD_1). Declared on the CHAIN, not per material slot.

width

width: number

wrap?

optional wrap?: "repeat" | "clamp" | "mirror"

Sampler wrap mode from the chain's declared wrap builtin. Absent = repeat.

Last updated: 📖 1 min readEdit on GitHub