updated the dungeon loading so it doesnt fail first try
This commit is contained in:
1 parent
e39aebf3a1
commit
7e60864e70
11 files changed
+383
-69
No files matched your search
@@ -0,0 +1,20 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DUNGEON_COLLISION_LOAD_BATCH_SIZE,
|
||||
DUNGEON_VISUAL_LOAD_BATCH_SIZE,
|
||||
advanceDungeonAssetCount,
|
||||
} from "./dungeonLoadSequencing";
|
||||
|
||||
describe("dungeon asset load sequencing", () => {
|
||||
it("loads visuals individually and collision meshes in bounded batches", () => {
|
||||
expect(DUNGEON_VISUAL_LOAD_BATCH_SIZE).toBe(1);
|
||||
expect(DUNGEON_COLLISION_LOAD_BATCH_SIZE).toBe(4);
|
||||
expect(advanceDungeonAssetCount(0, 48, DUNGEON_COLLISION_LOAD_BATCH_SIZE)).toBe(4);
|
||||
expect(advanceDungeonAssetCount(44, 48, DUNGEON_COLLISION_LOAD_BATCH_SIZE)).toBe(48);
|
||||
});
|
||||
|
||||
it("clamps malformed counters instead of creating an unbounded window", () => {
|
||||
expect(advanceDungeonAssetCount(-3, 2, 0)).toBe(1);
|
||||
expect(advanceDungeonAssetCount(8, 2, 4)).toBe(2);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user