Release Healer Man 0.1.5
This commit is contained in:
1 parent
f4c9cf356c
commit
55cfd43d66
62 files changed
+3030
-153
No files matched your search
@@ -2,6 +2,7 @@ import { beforeEach, describe, expect, it } from "vitest";
|
||||
import {
|
||||
clearMobRuntimeRegistry,
|
||||
getMobPosition,
|
||||
getMobRuntimeTransform,
|
||||
nearbyMobRuntimeIds,
|
||||
readMobRuntimePosition,
|
||||
registerMobRuntime,
|
||||
@@ -14,12 +15,13 @@ describe("mob runtime position registry", () => {
|
||||
beforeEach(clearMobRuntimeRegistry);
|
||||
|
||||
it("supports allocation-free frame updates and snapshot reads", () => {
|
||||
const unregister = registerMobRuntime("mob-a", [1, 2, 3]);
|
||||
const unregister = registerMobRuntime("mob-a", [1, 2, 3], 0.4);
|
||||
const out: [number, number, number] = [0, 0, 0];
|
||||
expect(readMobRuntimePosition("mob-a", out)).toBe(true);
|
||||
expect(out).toEqual([1, 2, 3]);
|
||||
updateMobRuntimePosition("mob-a", 4, 5, 6);
|
||||
updateMobRuntimePosition("mob-a", 4, 5, 6, 1.2);
|
||||
expect(getMobPosition("mob-a")).toEqual([4, 5, 6]);
|
||||
expect(getMobRuntimeTransform("mob-a")).toEqual({ position: [4, 5, 6], yaw: 1.2 });
|
||||
unregister();
|
||||
expect(getMobPosition("mob-a")).toBeNull();
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user