Improve a buuuunch of textures and some reworks

This commit is contained in:
2026-09-27 18:05:20 -03:00
parent 9f47c709f1
commit b7ded817d9
186 changed files with 1486 additions and 124 deletions
+4 -1
View File
@@ -3,7 +3,7 @@ import { get_sprite_region } from "$/client/sprites.ts";
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
import { AssetManager } from "$/client/assets.ts";
import { ItemStack } from "$/common/inventory.ts";
import { block_item_texture, cube_face_texture } from "$/common/block_models.ts";
import { block_item_texture, cube_face_texture, cube_face_tint } from "$/common/block_models.ts";
import { draw_text, draw_texture_region, draw_texture_region_skewed, Texture } from "$/client/renderer/mod.ts";
// the corners keep their size (times scale), the edges stretch along and the middle fills the rest, like minecraft's
@@ -146,6 +146,7 @@ function draw_item_block(block_info: BlockRegistry, x: number, y: number) {
{ x: cx, y: cy + half_h },
{ x: cx - half_w, y: cy },
],
...cube_face_tint(block_info, "top"),
);
draw_texture_region_skewed(
atlas,
@@ -159,6 +160,7 @@ function draw_item_block(block_info: BlockRegistry, x: number, y: number) {
{ x: cx, y: cy + half_h + height },
{ x: cx - half_w, y: cy + height },
],
...cube_face_tint(block_info, "side"),
);
draw_texture_region_skewed(
atlas,
@@ -172,5 +174,6 @@ function draw_item_block(block_info: BlockRegistry, x: number, y: number) {
{ x: cx, y: cy + half_h + height },
{ x: cx + half_w, y: cy + height },
],
...cube_face_tint(block_info, "front"),
);
}