DriftTexture · interface
MaterialTileGrid
One latent's tiles, level by level, by content.
Explained in DriftTexture.
interface MaterialTileGridimport type { MaterialTileGrid } from '@driftengine/texture';In depth
Level k is max(1, width >> k) by max(1, height >> k) texels, cut into tiles of tileSize
from the top-left, the last row and column short. levels[k][ty * across + tx] is that tile's
hash, where across is ceil(levelWidth / tileSize).
Properties
| Name | Type | Description |
|---|---|---|
widthreadonly | number | Level 0's texels across. |
heightreadonly | number | Level 0's texels down. |
tileSizereadonly | number | Texels along a tile's edge, the same at every level. |
addressModereadonly | number | One of ADDRESS_MODE, from the graph that samples this latent. |
levelsreadonly | readonly (readonly string[])[] |