Add all textures and models from create

This commit is contained in:
2026-10-12 18:47:41 -03:00
parent d4eff11f3e
commit 99bdcaeffc
3775 changed files with 66614 additions and 58 deletions
+12
View File
@@ -161,3 +161,15 @@ Deno.test("raycast_blocks goes over the empty half of a slab, and not out of a b
const into = raycast_blocks([0.5, 0.25, 0.5], [1, 0, 0], 20, world)!;
assertEquals([into.x, into.face], [2, "west"]);
});
Deno.test("an x turn turns a model's shape with it", () => {
const slab: ModelJson = {
id: "a:slab",
elements: [{ from: [0, 0, 0], to: [16, 8, 16], faces: { top: { texture: "a:x" } } }],
};
// the bottom half tips to the south half, standing up
assertEquals(model_shape(slab, 0, 90), [[0, 0, 0.5, 1, 1, 1]]);
assertEquals(model_shape(slab, 0, 180), [[0, 0.5, 0, 1, 1, 1]]);
// then y turns the south half to the west
assertEquals(model_shape(slab, 90, 90), [[0, 0, 0, 0.5, 1, 1]]);
});