Change imports
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import { assert, assertAlmostEquals, assertEquals } from "@std/assert";
|
||||
import { BUILTIN_MODELS, type ModelJson } from "$/common/block_models.ts";
|
||||
import { BUILTIN_MODELS, type ModelJson } from "@/common/block_models.ts";
|
||||
import {
|
||||
block_shape,
|
||||
clip_shape,
|
||||
@@ -13,10 +13,10 @@ import {
|
||||
model_shape,
|
||||
raycast_blocks,
|
||||
type Shape,
|
||||
} from "$/common/block_shapes.ts";
|
||||
import { block_from_json, type BlockJson, validate_block } from "$/common/mod_data.ts";
|
||||
import { move_body } from "$/common/physics.ts";
|
||||
import { box_overlaps_block } from "$/common/utils.ts";
|
||||
} from "@/common/block_shapes.ts";
|
||||
import { block_from_json, type BlockJson, validate_block } from "@/common/mod_data.ts";
|
||||
import { move_body } from "@/common/physics.ts";
|
||||
import { box_overlaps_block } from "@/common/utils.ts";
|
||||
|
||||
const slab: ModelJson = {
|
||||
id: "test:slab",
|
||||
@@ -115,7 +115,7 @@ Deno.test("only a placed block's boxes are in the way of whoever stands there",
|
||||
});
|
||||
|
||||
Deno.test("the outline is the edges of the shape's boxes, a little outside them", async () => {
|
||||
const { shape_edges } = await import("$/client/rendering/level_renderer.ts");
|
||||
const { shape_edges } = await import("@/client/rendering/level_renderer.ts");
|
||||
const cube = shape_edges(FULL_SHAPE);
|
||||
assertEquals(cube.length, 12);
|
||||
assert(cube.every((edge) => edge.every((v) => v < 0 || v > 1)));
|
||||
|
||||
Reference in New Issue
Block a user