Allow for textures that aren't 16x16

This commit is contained in:
2026-09-28 16:20:37 -03:00
parent 52ef4e5ca6
commit fe149bb9ad
18 changed files with 268 additions and 136 deletions
+7
View File
@@ -1,13 +1,20 @@
// the pixels across a block face or an item sprite. block models and item models are made in these units, a texture of
// another size is stretched to fit
export const TEXTURE_SIZE = 16;
// the most a texture can be on either side, entity sprites are bigger than blocks'
export const MAX_TEXTURE_SIZE = 256;
export const TICKS_PER_SECOND = 20;
export const TICK_DELTA = 1 / TICKS_PER_SECOND;
export const SLOT_SIZE = 18 * 3;
// where a texture is in the atlas, in pixels
export interface SpriteRegion {
x: number;
y: number;
width: number;
height: number;
}
export const faces = ["west", "east", "bottom", "top", "north", "south"] as const;