@woosh/meep-engine 2.110.4 → 2.110.5

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.
Files changed (82) hide show
  1. package/build/meep.cjs +114 -108
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +115 -106
  4. package/package.json +1 -1
  5. package/src/core/events/signal/Signal.d.ts.map +1 -1
  6. package/src/core/events/signal/Signal.js +3 -98
  7. package/src/core/events/signal/dispatchViaProxy.d.ts +7 -0
  8. package/src/core/events/signal/dispatchViaProxy.d.ts.map +1 -0
  9. package/src/core/events/signal/dispatchViaProxy.js +60 -0
  10. package/src/core/events/signal/findSignalHandlerIndexByHandle.d.ts +9 -0
  11. package/src/core/events/signal/findSignalHandlerIndexByHandle.d.ts.map +1 -0
  12. package/src/core/events/signal/findSignalHandlerIndexByHandle.js +26 -0
  13. package/src/core/events/signal/findSignalHandlerIndexByHandleAndContext.d.ts +9 -0
  14. package/src/core/events/signal/findSignalHandlerIndexByHandleAndContext.d.ts.map +1 -0
  15. package/src/core/events/signal/findSignalHandlerIndexByHandleAndContext.js +21 -0
  16. package/src/core/fsm/simple/SimpleStateMachine.d.ts.map +1 -1
  17. package/src/core/fsm/simple/SimpleStateMachine.js +2 -1
  18. package/src/core/geom/3d/normal/octahedron/encode_unit_to_octahedron.d.ts +2 -2
  19. package/src/core/geom/3d/normal/octahedron/encode_unit_to_octahedron.d.ts.map +1 -1
  20. package/src/core/geom/3d/normal/octahedron/encode_unit_to_octahedron.js +1 -1
  21. package/src/core/geom/3d/sphere/sphere_fibonacci_point.d.ts +18 -0
  22. package/src/core/geom/3d/sphere/sphere_fibonacci_point.d.ts.map +1 -0
  23. package/src/core/geom/3d/sphere/sphere_fibonacci_point.js +51 -0
  24. package/src/engine/animation/clip/AnimationClip.d.ts.map +1 -1
  25. package/src/engine/animation/clip/AnimationClip.js +4 -0
  26. package/src/engine/animation/clip/AnimationInterpolationKind.d.ts +7 -0
  27. package/src/engine/animation/clip/AnimationInterpolationKind.d.ts.map +1 -0
  28. package/src/engine/animation/clip/AnimationInterpolationKind.js +9 -0
  29. package/src/engine/animation/clip/AnimationTrack.d.ts +12 -0
  30. package/src/engine/animation/clip/AnimationTrack.d.ts.map +1 -1
  31. package/src/engine/animation/clip/AnimationTrack.js +20 -1
  32. package/src/engine/animation/clip/AnimationTrackBinding.d.ts.map +1 -1
  33. package/src/engine/animation/clip/AnimationTrackBinding.js +12 -0
  34. package/src/engine/animation/clip/bind_property_writer.d.ts +9 -0
  35. package/src/engine/animation/clip/bind_property_writer.d.ts.map +1 -0
  36. package/src/engine/animation/clip/bind_property_writer.js +118 -0
  37. package/src/engine/animation/clip/curve_from_track_data.d.ts +12 -0
  38. package/src/engine/animation/clip/curve_from_track_data.d.ts.map +1 -0
  39. package/src/engine/animation/clip/curve_from_track_data.js +27 -0
  40. package/src/engine/animation/clip/curve_from_track_data_cubic_tangents.d.ts +10 -0
  41. package/src/engine/animation/clip/curve_from_track_data_cubic_tangents.d.ts.map +1 -0
  42. package/src/engine/animation/clip/curve_from_track_data_cubic_tangents.js +33 -0
  43. package/src/engine/animation/clip/curve_from_track_data_discrete.d.ts +10 -0
  44. package/src/engine/animation/clip/curve_from_track_data_discrete.d.ts.map +1 -0
  45. package/src/engine/animation/clip/curve_from_track_data_discrete.js +30 -0
  46. package/src/engine/animation/clip/curve_from_track_data_linear.d.ts +10 -0
  47. package/src/engine/animation/clip/curve_from_track_data_linear.d.ts.map +1 -0
  48. package/src/engine/animation/clip/curve_from_track_data_linear.js +25 -0
  49. package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -1
  50. package/src/engine/animation/clip/ecd_bind_animation_curve.js +14 -239
  51. package/src/engine/animation/curve/AnimationCurve.d.ts +17 -17
  52. package/src/engine/animation/curve/AnimationCurve.d.ts.map +1 -1
  53. package/src/engine/animation/curve/AnimationCurve.js +30 -20
  54. package/src/engine/animation/curve/Keyframe.d.ts +5 -0
  55. package/src/engine/animation/curve/Keyframe.d.ts.map +1 -1
  56. package/src/engine/animation/curve/Keyframe.js +6 -0
  57. package/src/engine/animation/curve/binding/BoundValueWriter.d.ts +7 -0
  58. package/src/engine/animation/curve/binding/BoundValueWriter.d.ts.map +1 -1
  59. package/src/engine/animation/curve/binding/BoundValueWriter.js +9 -1
  60. package/src/engine/animation/curve/compute_curve_aabb.d.ts +1 -1
  61. package/src/engine/animation/curve/compute_curve_aabb.js +1 -1
  62. package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
  63. package/src/engine/ecs/EntityComponentDataset.js +4 -3
  64. package/src/engine/ecs/parent/EntityNode.d.ts.map +1 -1
  65. package/src/engine/ecs/parent/EntityNode.js +2 -1
  66. package/src/engine/graphics/geometry/buffered/makeGeometryIndexed.d.ts +2 -1
  67. package/src/engine/graphics/geometry/buffered/makeGeometryIndexed.d.ts.map +1 -1
  68. package/src/engine/graphics/geometry/buffered/makeGeometryIndexed.js +4 -1
  69. package/src/engine/graphics/sh3/gi/material/common.glsl +3 -3
  70. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.d.ts.map +1 -1
  71. package/src/engine/graphics/sh3/lpv/PathTracerProbeRenderer.js +4 -3
  72. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.d.ts +2 -1
  73. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.d.ts.map +1 -1
  74. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map.js +6 -30
  75. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map_fibonacci.d.ts +13 -0
  76. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map_fibonacci.d.ts.map +1 -0
  77. package/src/engine/graphics/sh3/lpv/depth/octahedral/bake_octahedral_depth_map_fibonacci.js +163 -0
  78. package/src/engine/graphics/sh3/prototypeSH3Probe.js +2 -2
  79. package/src/engine/graphics/trail/x/RibbonXMaterialSpec.d.ts.map +1 -1
  80. package/src/engine/graphics/trail/x/RibbonXMaterialSpec.js +10 -2
  81. package/src/engine/graphics/trail/x/RibbonXPlugin.d.ts.map +1 -1
  82. package/src/engine/graphics/trail/x/RibbonXPlugin.js +7 -5
package/build/meep.cjs CHANGED
@@ -899,13 +899,6 @@ function m4_multiply(out, a, b) {
899
899
  out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;
900
900
  }
901
901
 
902
- const SignalFlags = {
903
- /**
904
- * If set - signal will not invoke handlers when dispatched
905
- */
906
- Silent: 1
907
- };
908
-
909
902
  /**
910
903
  *
911
904
  * @enum {number}
@@ -984,6 +977,118 @@ class SignalHandler {
984
977
  */
985
978
  SignalHandler.prototype.isSignalHandler = true;
986
979
 
980
+ /**
981
+ * Common dispatch stack
982
+ * @readonly
983
+ * @type {SignalHandler[]}
984
+ */
985
+ const dispatch_stack$1 = [];
986
+ let dispatch_stack_top$1 = 0;
987
+
988
+ /**
989
+ *
990
+ * @param {function} f
991
+ * @param {*} context
992
+ * @param {Array} args
993
+ */
994
+ function dispatchCallback(f, context, args) {
995
+
996
+ try {
997
+ f.apply(context, args);
998
+ } catch (e) {
999
+ }
1000
+ }
1001
+
1002
+ /**
1003
+ *
1004
+ * @param {SignalHandler[]} handlers
1005
+ * @param {Array} [args]
1006
+ */
1007
+ function dispatchViaProxy(handlers, args) {
1008
+ const length = handlers.length;
1009
+
1010
+ const stack_pointer = dispatch_stack_top$1;
1011
+ const stack_frame_end = stack_pointer + length;
1012
+ dispatch_stack_top$1 = stack_frame_end;
1013
+
1014
+ let i, h;
1015
+ for (i = 0; i < length; i++) {
1016
+ //copy to proxy
1017
+ dispatch_stack$1[stack_pointer + i] = handlers[length - (i + 1)];
1018
+ }
1019
+
1020
+ for (i = stack_frame_end - 1; i >= stack_pointer; i--) {
1021
+ h = dispatch_stack$1[i];
1022
+
1023
+ if (h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
1024
+ //handler should be cut
1025
+ const p = handlers.indexOf(h);
1026
+ handlers.splice(p, 1);
1027
+ }
1028
+
1029
+ dispatchCallback(h.handle, h.context, args);
1030
+ }
1031
+
1032
+ //drop stack frame
1033
+ dispatch_stack_top$1 = stack_pointer;
1034
+ }
1035
+
1036
+ /**
1037
+ *
1038
+ * @param {SignalHandler[]} handlers
1039
+ * @param {function} f
1040
+ * @param {*} [thisArg]
1041
+ * @returns {number} index of the handler, or -1 if not found
1042
+ */
1043
+ function findSignalHandlerIndexByHandle(handlers, f, thisArg) {
1044
+ const l = handlers.length;
1045
+
1046
+ for (let i = 0; i < l; i++) {
1047
+ const signalHandler = handlers[i];
1048
+
1049
+ if (signalHandler.handle === f) {
1050
+
1051
+ if (thisArg !== undefined && thisArg !== signalHandler.context) {
1052
+ //context variable doesn't match
1053
+ continue;
1054
+ }
1055
+
1056
+ return i;
1057
+ }
1058
+ }
1059
+
1060
+ return -1;
1061
+ }
1062
+
1063
+ /**
1064
+ *
1065
+ * @param {SignalHandler[]} handlers
1066
+ * @param {function} f
1067
+ * @param {*} ctx
1068
+ * @returns {number} index of the handler, or -1 if not found
1069
+ */
1070
+ function findSignalHandlerIndexByHandleAndContext(handlers, f, ctx) {
1071
+ const l = handlers.length;
1072
+
1073
+ for (let i = 0; i < l; i++) {
1074
+ const handler = handlers[i];
1075
+
1076
+ if (handler.handle === f && handler.context === ctx) {
1077
+ return i;
1078
+ }
1079
+
1080
+ }
1081
+
1082
+ return -1;
1083
+ }
1084
+
1085
+ const SignalFlags = {
1086
+ /**
1087
+ * If set - signal will not invoke handlers when dispatched
1088
+ */
1089
+ Silent: 1
1090
+ };
1091
+
987
1092
  /**
988
1093
  * Common dispatch stack
989
1094
  * @readonly
@@ -1562,55 +1667,6 @@ class Signal {
1562
1667
  */
1563
1668
  Signal.prototype.isSignal = true;
1564
1669
 
1565
- /**
1566
- *
1567
- * @param {SignalHandler[]} handlers
1568
- * @param {function} f
1569
- * @param {*} [thisArg]
1570
- * @returns {number} index of the handler, or -1 if not found
1571
- */
1572
- function findSignalHandlerIndexByHandle(handlers, f, thisArg) {
1573
- const l = handlers.length;
1574
-
1575
- for (let i = 0; i < l; i++) {
1576
- const signalHandler = handlers[i];
1577
-
1578
- if (signalHandler.handle === f) {
1579
-
1580
- if (thisArg !== undefined && thisArg !== signalHandler.context) {
1581
- //context variable doesn't match
1582
- continue;
1583
- }
1584
-
1585
- return i;
1586
- }
1587
- }
1588
-
1589
- return -1;
1590
- }
1591
-
1592
- /**
1593
- *
1594
- * @param {SignalHandler[]} handlers
1595
- * @param {function} f
1596
- * @param {*} ctx
1597
- * @returns {number} index of the handler, or -1 if not found
1598
- */
1599
- function findSignalHandlerIndexByHandleAndContext(handlers, f, ctx) {
1600
- const l = handlers.length;
1601
-
1602
- for (let i = 0; i < l; i++) {
1603
- const handler = handlers[i];
1604
-
1605
- if (handler.handle === f && handler.context === ctx) {
1606
- return i;
1607
- }
1608
-
1609
- }
1610
-
1611
- return -1;
1612
- }
1613
-
1614
1670
  /**
1615
1671
  *
1616
1672
  * @param {Signal} signal
@@ -1646,54 +1702,6 @@ function removeHandlerByHandlerAndContext(signal, h, ctx) {
1646
1702
  }
1647
1703
 
1648
1704
  return false;
1649
- }
1650
-
1651
- /**
1652
- *
1653
- * @param {function} f
1654
- * @param {*} context
1655
- * @param {Array} args
1656
- */
1657
- function dispatchCallback(f, context, args) {
1658
-
1659
- try {
1660
- f.apply(context, args);
1661
- } catch (e) {
1662
- }
1663
- }
1664
-
1665
- /**
1666
- *
1667
- * @param {SignalHandler[]} handlers
1668
- * @param {Array} [args]
1669
- */
1670
- function dispatchViaProxy(handlers, args) {
1671
- const length = handlers.length;
1672
-
1673
- const stack_pointer = dispatch_stack_top;
1674
- const stack_frame_end = stack_pointer + length;
1675
- dispatch_stack_top = stack_frame_end;
1676
-
1677
- let i, h;
1678
- for (i = 0; i < length; i++) {
1679
- //copy to proxy
1680
- dispatch_stack[stack_pointer + i] = handlers[length - (i + 1)];
1681
- }
1682
-
1683
- for (i = stack_frame_end - 1; i >= stack_pointer; i--) {
1684
- h = dispatch_stack[i];
1685
-
1686
- if (h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
1687
- //handler should be cut
1688
- const p = handlers.indexOf(h);
1689
- handlers.splice(p, 1);
1690
- }
1691
-
1692
- dispatchCallback(h.handle, h.context, args);
1693
- }
1694
-
1695
- //drop stack frame
1696
- dispatch_stack_top = stack_pointer;
1697
1705
  }
1698
1706
 
1699
1707
  /**
@@ -74519,7 +74527,8 @@ class EntityNode {
74519
74527
  // destroy children first
74520
74528
  const children = this.__children;
74521
74529
  const child_count = children.length;
74522
- for (let i = 0; i < child_count; i++) {
74530
+
74531
+ for (let i = child_count - 1; i >= 0; i--) {
74523
74532
  const child = children[i];
74524
74533
 
74525
74534
  child.destroy();
@@ -118169,9 +118178,6 @@ exports.ShadedGeometrySystem = ShadedGeometrySystem;
118169
118178
  exports.Signal = Signal;
118170
118179
  exports.SignalBinding = SignalBinding;
118171
118180
  exports.Transform = Transform;
118172
- exports.dispatchViaProxy = dispatchViaProxy;
118173
- exports.findSignalHandlerIndexByHandle = findSignalHandlerIndexByHandle;
118174
- exports.findSignalHandlerIndexByHandleAndContext = findSignalHandlerIndexByHandleAndContext;
118175
118181
  exports.find_path_on_grid_astar = find_path_on_grid_astar;
118176
118182
  exports.quat3_createFromAxisAngle = quat3_createFromAxisAngle;
118177
118183
  exports.three_update_shadow_camera_extents = three_update_shadow_camera_extents;