@woosh/meep-engine 2.92.8 → 2.92.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/meep.cjs +1 -1
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +1 -1
- package/package.json +1 -1
- package/src/engine/animation/curve/prototypeGLTF.js +14 -14
- package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.js +1 -1
- package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.spec.d.ts +2 -0
- package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.spec.d.ts.map +1 -0
- package/src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.spec.js +16 -0
package/build/meep.module.js
CHANGED
|
@@ -65751,7 +65751,7 @@ function bvh32_from_indexed_geometry(bvh, vertices, indices) {
|
|
|
65751
65751
|
*/
|
|
65752
65752
|
function bvh32_from_unindexed_geometry(bvh, vertices) {
|
|
65753
65753
|
|
|
65754
|
-
const triangle_count =
|
|
65754
|
+
const triangle_count = vertices.length / 3;
|
|
65755
65755
|
|
|
65756
65756
|
bvh.setLeafCount(triangle_count);
|
|
65757
65757
|
bvh.initialize_structure();
|
package/package.json
CHANGED
|
@@ -38,22 +38,22 @@ async function main(engine) {
|
|
|
38
38
|
yaw: 3.123185307179593,
|
|
39
39
|
});
|
|
40
40
|
//
|
|
41
|
-
make_sample('data/models/samples/InterpolationTest.glb',[
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
],engine.entityManager.dataset);
|
|
52
|
-
//
|
|
53
|
-
// make_sample('data/models/samples/BoxAnimated.glb',[
|
|
54
|
-
// 'animation_01'
|
|
41
|
+
// make_sample('data/models/samples/InterpolationTest.glb',[
|
|
42
|
+
// 'Step Scale',
|
|
43
|
+
// 'Linear Scale',
|
|
44
|
+
// 'CubicSpline Scale',
|
|
45
|
+
// 'Step Rotation',
|
|
46
|
+
// 'CubicSpline Rotation',
|
|
47
|
+
// 'Linear Rotation',
|
|
48
|
+
// 'Step Translation',
|
|
49
|
+
// 'CubicSpline Translation',
|
|
50
|
+
// 'Linear Translation'
|
|
55
51
|
// ],engine.entityManager.dataset);
|
|
56
52
|
//
|
|
53
|
+
make_sample('data/models/samples/BoxAnimated.glb',[
|
|
54
|
+
'animation_0'
|
|
55
|
+
],engine.entityManager.dataset);
|
|
56
|
+
|
|
57
57
|
// make_sample('data/models/samples/animatedbox1.gltf', [
|
|
58
58
|
// 'All Animations'
|
|
59
59
|
// ], engine.entityManager.dataset);
|
|
@@ -7,7 +7,7 @@ import { bvh32_set_leaf_from_triangle } from "./bvh32_set_leaf_from_triangle.js"
|
|
|
7
7
|
*/
|
|
8
8
|
export function bvh32_from_unindexed_geometry(bvh, vertices) {
|
|
9
9
|
|
|
10
|
-
const triangle_count =
|
|
10
|
+
const triangle_count = vertices.length / 3;
|
|
11
11
|
|
|
12
12
|
bvh.setLeafCount(triangle_count);
|
|
13
13
|
bvh.initialize_structure();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bvh32_from_unindexed_geometry.spec.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/geometry/bvh/buffered/bvh32_from_unindexed_geometry.spec.js"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BinaryUint32BVH } from "../../../../../core/bvh2/binary/2/BinaryUint32BVH.js";
|
|
2
|
+
import { bvh32_from_unindexed_geometry } from "./bvh32_from_unindexed_geometry.js";
|
|
3
|
+
|
|
4
|
+
test("1 triangle geometry", () => {
|
|
5
|
+
const bvh = new BinaryUint32BVH();
|
|
6
|
+
|
|
7
|
+
bvh32_from_unindexed_geometry(bvh, new Float32Array([1, 2, 3]));
|
|
8
|
+
|
|
9
|
+
const address = bvh.getNodeAddress(0);
|
|
10
|
+
|
|
11
|
+
const bounds = [];
|
|
12
|
+
|
|
13
|
+
bvh.readBounds(address, bounds, 0);
|
|
14
|
+
|
|
15
|
+
expect(bounds).toEqual([1, 2, 3, 1, 2, 3]);
|
|
16
|
+
});
|