@woosh/meep-engine 2.92.10 → 2.92.12
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/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +33 -9
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +33 -9
- package/editor/tools/v2/prototypeTransformControls.js +13 -11
- package/package.json +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.d.ts.map +1 -1
- package/src/core/bvh2/binary/2/BinaryUint32BVH.js +13 -1
- package/src/core/geom/3d/aabb/aabb3_array_combine.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_array_combine.js +34 -6
- package/src/core/geom/3d/aabb/aabb3_array_set.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/aabb3_array_set.js +5 -1
- package/src/core/math/spline/spline_bezier3_bounds.js +3 -3
- package/src/core/math/spline/spline_hermite3.d.ts +11 -0
- package/src/core/math/spline/spline_hermite3.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3.js +21 -0
- package/src/core/math/spline/spline_hermite3_bounds.d.ts +17 -0
- package/src/core/math/spline/spline_hermite3_bounds.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3_bounds.js +95 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts +2 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.d.ts.map +1 -0
- package/src/core/math/spline/spline_hermite3_bounds.spec.js +37 -0
- package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
- package/src/engine/animation/curve/AnimationCurve.js +10 -16
- package/src/engine/animation/curve/AnimationCurve.spec.js +11 -0
- package/src/engine/animation/curve/compression/prototypeCurveCompression.js +13 -2
- package/src/engine/animation/curve/compute_curve_aabb.d.ts.map +1 -1
- package/src/engine/animation/curve/compute_curve_aabb.js +25 -4
- package/src/engine/animation/curve/draw/build_plot_entity_from_array.d.ts.map +1 -1
- package/src/engine/animation/curve/draw/build_plot_entity_from_array.js +10 -2
- package/src/engine/animation/curve/prototypeGLTF.js +14 -14
- package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts +4 -1
- package/src/engine/graphics/canvas/canvas2d_draw_label.d.ts.map +1 -1
- package/src/engine/graphics/canvas/canvas2d_draw_label.js +10 -4
- 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.js +6 -2
|
@@ -38,22 +38,22 @@ async function main(engine) {
|
|
|
38
38
|
yaw: 3.123185307179593,
|
|
39
39
|
});
|
|
40
40
|
//
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
// ],engine.entityManager.dataset);
|
|
52
|
-
//
|
|
53
|
-
make_sample('data/models/samples/BoxAnimated.glb',[
|
|
54
|
-
'animation_0'
|
|
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);
|
|
@@ -4,6 +4,9 @@
|
|
|
4
4
|
* @param {string} text
|
|
5
5
|
* @param {number} x
|
|
6
6
|
* @param {number} y
|
|
7
|
+
* @param {string} [color] CSS color
|
|
8
|
+
* @param {number} [fontSize] in pixels
|
|
9
|
+
* @param {string} [outline] CSS color
|
|
7
10
|
*/
|
|
8
|
-
export function canvas2d_draw_label({ ctx, text, x, y }: CanvasRenderingContext2D): void;
|
|
11
|
+
export function canvas2d_draw_label({ ctx, text, x, y, color, fontSize, outline }: CanvasRenderingContext2D): void;
|
|
9
12
|
//# sourceMappingURL=canvas2d_draw_label.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"canvas2d_draw_label.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/canvas/canvas2d_draw_label.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"canvas2d_draw_label.d.ts","sourceRoot":"","sources":["../../../../../src/engine/graphics/canvas/canvas2d_draw_label.js"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,mFARW,wBAAwB,QAyBlC"}
|
|
@@ -4,18 +4,24 @@
|
|
|
4
4
|
* @param {string} text
|
|
5
5
|
* @param {number} x
|
|
6
6
|
* @param {number} y
|
|
7
|
+
* @param {string} [color] CSS color
|
|
8
|
+
* @param {number} [fontSize] in pixels
|
|
9
|
+
* @param {string} [outline] CSS color
|
|
7
10
|
*/
|
|
8
11
|
export function canvas2d_draw_label({
|
|
9
12
|
ctx,
|
|
10
13
|
text,
|
|
11
14
|
x,
|
|
12
|
-
y
|
|
15
|
+
y,
|
|
16
|
+
color = 'white',
|
|
17
|
+
fontSize = 10,
|
|
18
|
+
outline = `rgba(0, 0, 0, 0.5)`
|
|
13
19
|
}) {
|
|
14
20
|
|
|
15
|
-
ctx.fillStyle =
|
|
16
|
-
ctx.font =
|
|
21
|
+
ctx.fillStyle = color;
|
|
22
|
+
ctx.font = `${Math.ceil(fontSize)}px Tahoma`;
|
|
17
23
|
|
|
18
|
-
ctx.strokeStyle =
|
|
24
|
+
ctx.strokeStyle = outline;
|
|
19
25
|
ctx.lineWidth = 2;
|
|
20
26
|
ctx.strokeText(text, x, y);
|
|
21
27
|
ctx.fillText(text, x, y);
|
|
@@ -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 = vertices.length /
|
|
10
|
+
const triangle_count = vertices.length / 9;
|
|
11
11
|
|
|
12
12
|
bvh.setLeafCount(triangle_count);
|
|
13
13
|
bvh.initialize_structure();
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { BinaryUint32BVH } from "../../../../../core/bvh2/binary/2/BinaryUint32BVH.js";
|
|
2
2
|
import { bvh32_from_unindexed_geometry } from "./bvh32_from_unindexed_geometry.js";
|
|
3
3
|
|
|
4
|
-
test("1 triangle geometry", () => {
|
|
4
|
+
test("1 point triangle geometry", () => {
|
|
5
5
|
const bvh = new BinaryUint32BVH();
|
|
6
6
|
|
|
7
|
-
bvh32_from_unindexed_geometry(bvh, new Float32Array([
|
|
7
|
+
bvh32_from_unindexed_geometry(bvh, new Float32Array([
|
|
8
|
+
1, 2, 3,
|
|
9
|
+
1, 2, 3,
|
|
10
|
+
1, 2, 3
|
|
11
|
+
]));
|
|
8
12
|
|
|
9
13
|
const address = bvh.getNodeAddress(0);
|
|
10
14
|
|