@woosh/meep-engine 2.92.9 → 2.92.11
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 +7 -13
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +7 -13
- 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 +4 -0
- package/src/core/math/interval/NumericInterval.d.ts +3 -3
- package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
- package/src/core/math/interval/NumericInterval.js +7 -13
- package/src/core/math/interval/NumericInterval.spec.js +9 -0
- package/src/core/math/max3.spec.js +2 -0
- package/src/core/math/min3.spec.js +2 -0
- 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/buffered/query/GeometrySpatialQueryAccelerator.js +2 -2
|
@@ -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);
|
|
@@ -232,14 +232,14 @@ export class GeometrySpatialQueryAccelerator {
|
|
|
232
232
|
* @returns {BinaryUint32BVH}
|
|
233
233
|
*/
|
|
234
234
|
__buildBVH(geometry) {
|
|
235
|
+
const bvh = new BinaryUint32BVH();
|
|
236
|
+
|
|
235
237
|
const position_attribute = geometry.getAttribute('position');
|
|
236
238
|
const index_attribute = geometry.getIndex();
|
|
237
239
|
|
|
238
240
|
const de_interleaved_position_attribute = deinterleaveBufferAttribute(position_attribute);
|
|
239
241
|
const vertices = de_interleaved_position_attribute.array;
|
|
240
242
|
|
|
241
|
-
const bvh = new BinaryUint32BVH();
|
|
242
|
-
|
|
243
243
|
if (index_attribute === undefined || index_attribute === null) {
|
|
244
244
|
bvh32_from_unindexed_geometry(bvh, vertices);
|
|
245
245
|
} else {
|