Block visuals
This commit is contained in:
@@ -35,6 +35,9 @@ export type ToChunkWorker =
|
||||
models: Record<string, ModelJson>;
|
||||
textures_info: Record<string, SpriteRegion>;
|
||||
image: { width: number; height: number };
|
||||
// the numeric ids of blocks with visuals, and whether each visual replaces the block's model, see
|
||||
// ctx.render.register_visual
|
||||
visuals: [number, boolean][];
|
||||
}
|
||||
| {
|
||||
type: "mesh";
|
||||
@@ -89,6 +92,8 @@ export type FromChunkWorker =
|
||||
// the chunk's light, one byte per block indexed like its blocks: block light << 4 | sky light, like sodium's
|
||||
// packed light data. entities are lit from it
|
||||
light: Uint8Array<ArrayBuffer>;
|
||||
// the blocks in it with visuals, as pairs of the block's index in the chunk (like light's) and its value
|
||||
visuals: Uint32Array<ArrayBuffer>;
|
||||
}
|
||||
| {
|
||||
type: "sorted";
|
||||
|
||||
Reference in New Issue
Block a user