Release Healer Man 0.1.33
This commit is contained in:
1 parent
6dcb1034e5
commit
05b25c4341
20 files changed
+573
-51
No files matched your search
@@ -1,4 +1,10 @@
|
||||
import { BufferGeometry, Float32BufferAttribute, Group, Mesh } from "three";
|
||||
import {
|
||||
BufferAttribute,
|
||||
BufferGeometry,
|
||||
Float32BufferAttribute,
|
||||
Group,
|
||||
Mesh,
|
||||
} from "three";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { preparePartyNavigationGraph } from "./partyNavigationAssetCache";
|
||||
|
||||
@@ -33,4 +39,26 @@ describe("party navigation asset cache", () => {
|
||||
}]);
|
||||
expect(second).not.toBe(first);
|
||||
});
|
||||
|
||||
it("expands normalized quantized positions before baking the node transform", () => {
|
||||
const geometry = new BufferGeometry();
|
||||
geometry.setAttribute("position", new BufferAttribute(new Int16Array([
|
||||
0, 0, 0,
|
||||
32_767, 0, 0,
|
||||
0, 0, 32_767,
|
||||
]), 3, true));
|
||||
const mesh = new Mesh(geometry);
|
||||
mesh.position.set(10, 2, -5);
|
||||
mesh.scale.setScalar(100);
|
||||
const scene = new Group();
|
||||
scene.add(mesh);
|
||||
|
||||
const graph = preparePartyNavigationGraph("/navigation/quantized-transform.glb", scene, []);
|
||||
|
||||
expect(graph.nodes.map((node) => node.position)).toEqual([
|
||||
[10, 2, -5],
|
||||
[110, 2, -5],
|
||||
[10, 2, 95],
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user