@woosh/meep-engine 2.113.3 → 2.113.4

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 (57) hide show
  1. package/build/meep.cjs +29 -28
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +29 -28
  4. package/package.json +1 -1
  5. package/src/core/collection/array/combine_hash.d.ts +7 -0
  6. package/src/core/collection/array/combine_hash.d.ts.map +1 -0
  7. package/src/core/collection/array/combine_hash.js +13 -0
  8. package/src/core/collection/array/computeHashIntegerArray.d.ts.map +1 -1
  9. package/src/core/collection/array/computeHashIntegerArray.js +4 -7
  10. package/src/core/function/FunctionCompiler.js +3 -3
  11. package/src/core/geom/ConicRay.js +2 -2
  12. package/src/core/geom/Vector4.js +2 -2
  13. package/src/core/model/node-graph/node/NodeInstancePortReference.js +2 -2
  14. package/src/core/model/reactive/model/ReactiveBinaryExpression.d.ts.map +1 -1
  15. package/src/core/model/reactive/model/ReactiveBinaryExpression.js +2 -2
  16. package/src/core/model/reactive/model/terminal/ReactiveReference.d.ts.map +1 -1
  17. package/src/core/model/reactive/model/terminal/ReactiveReference.js +2 -2
  18. package/src/engine/asset/AssetDescription.js +2 -2
  19. package/src/engine/asset/loaders/material/computeMaterialHash.js +6 -6
  20. package/src/engine/asset/loaders/material/computeTextureHash.js +2 -2
  21. package/src/engine/ecs/animation/Animation.js +2 -2
  22. package/src/engine/ecs/animation/AnimationClip.d.ts.map +1 -1
  23. package/src/engine/ecs/animation/AnimationClip.js +4 -4
  24. package/src/engine/ecs/gui/GUIElement.js +2 -2
  25. package/src/engine/ecs/gui/hud/HeadsUpDisplay.js +2 -2
  26. package/src/engine/ecs/gui/position/ViewportPosition.js +2 -2
  27. package/src/engine/ecs/ik/IKConstraint.d.ts.map +1 -1
  28. package/src/engine/ecs/ik/IKConstraint.js +3 -3
  29. package/src/engine/graphics/ecs/animation/animator/AnimationClip.d.ts.map +1 -1
  30. package/src/engine/graphics/ecs/animation/animator/AnimationClip.js +4 -4
  31. package/src/engine/graphics/ecs/animation/animator/AnimationClipDefinition.js +4 -4
  32. package/src/engine/graphics/ecs/animation/animator/AnimationNotification.js +2 -2
  33. package/src/engine/graphics/ecs/animation/animator/AnimationNotificationDefinition.js +3 -3
  34. package/src/engine/graphics/ecs/animation/animator/graph/AnimationGraph.js +2 -2
  35. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.d.ts.map +1 -1
  36. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationGraphDefinition.js +8 -8
  37. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationStateDefinition.js +2 -2
  38. package/src/engine/graphics/ecs/animation/animator/graph/definition/AnimationTransitionDefinition.js +3 -3
  39. package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +2 -2
  40. package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js +2 -2
  41. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.d.ts.map +1 -1
  42. package/src/engine/graphics/particles/particular/engine/parameter/ParameterLookupTable.js +8 -3
  43. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.d.ts.map +1 -1
  44. package/src/engine/graphics/particles/particular/engine/parameter/ParameterTrack.js +3 -3
  45. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.d.ts.map +1 -1
  46. package/src/engine/graphics/particles/particular/engine/parameter/ParticleParameter.js +4 -4
  47. package/src/engine/graphics/render/buffer/slot/parameter/ProgramValueSlotParameter.d.ts.map +1 -1
  48. package/src/engine/graphics/render/buffer/slot/parameter/ProgramValueSlotParameter.js +4 -4
  49. package/src/engine/graphics/render/frame_graph/resource/TextureResourceDescriptor.js +2 -2
  50. package/src/engine/grid/obstacle/GridObstacle.js +2 -2
  51. package/src/engine/intelligence/behavior/selector/WeightedElement.js +2 -2
  52. package/src/engine/sound/ecs/emitter/SoundEmitter.js +2 -2
  53. package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
  54. package/src/engine/sound/ecs/emitter/SoundTrack.js +6 -6
  55. package/src/misc/makeMaterialIconCached.js +2 -2
  56. package/src/view/common/HTMLElementCacheKey.d.ts.map +1 -1
  57. package/src/view/common/HTMLElementCacheKey.js +5 -5
package/build/meep.cjs CHANGED
@@ -50535,11 +50535,12 @@ function computeIntegerArrayHash(data, offset, length) {
50535
50535
  }
50536
50536
 
50537
50537
  /**
50538
- * Computes hash on integer values
50538
+ * Computes hash on integer values, useful for building composite hashes
50539
50539
  * @param {...number} value
50540
50540
  * @returns {number}
50541
50541
  */
50542
- function computeHashIntegerArray(...value) {
50542
+ function combine_hash(...value) {
50543
+
50543
50544
  return computeIntegerArrayHash(value, 0, value.length);
50544
50545
  }
50545
50546
 
@@ -50801,7 +50802,7 @@ class Vector4 {
50801
50802
  * @return {number}
50802
50803
  */
50803
50804
  hash() {
50804
- return computeHashIntegerArray(
50805
+ return combine_hash(
50805
50806
  computeHashFloat(this.x),
50806
50807
  computeHashFloat(this.y),
50807
50808
  computeHashFloat(this.z),
@@ -75865,15 +75866,6 @@ class GenericRendererAdapter extends AbstractRenderAdapter {
75865
75866
 
75866
75867
  }
75867
75868
 
75868
- /**
75869
- *
75870
- * @param {Plane} plane
75871
- * @returns {number}
75872
- */
75873
- function planeHash(plane) {
75874
- return mortonEncode_magicbits(plane.normal.x, plane.normal.y, plane.normal.z) ^ plane.constant;
75875
- }
75876
-
75877
75869
  /**
75878
75870
  * @template T
75879
75871
  * @param {T[]} array
@@ -75899,6 +75891,23 @@ function computeHashArray(array, elementHashFunction, thisArg) {
75899
75891
  return hash;
75900
75892
  }
75901
75893
 
75894
+ /**
75895
+ *
75896
+ * @param {THREE.Color} c
75897
+ */
75898
+ function computeHashColor(c) {
75899
+ return c.getHex();
75900
+ }
75901
+
75902
+ /**
75903
+ *
75904
+ * @param {Plane} plane
75905
+ * @returns {number}
75906
+ */
75907
+ function planeHash(plane) {
75908
+ return mortonEncode_magicbits(plane.normal.x, plane.normal.y, plane.normal.z) ^ plane.constant;
75909
+ }
75910
+
75902
75911
  /**
75903
75912
  *
75904
75913
  * @param {THREE.Texture} texture
@@ -75912,14 +75921,6 @@ function textureHashById(texture) {
75912
75921
  return texture.id;
75913
75922
  }
75914
75923
 
75915
- /**
75916
- *
75917
- * @param {THREE.Color} c
75918
- */
75919
- function computeHashColor(c) {
75920
- return c.getHex();
75921
- }
75922
-
75923
75924
  /**
75924
75925
  *
75925
75926
  * @param {Material|MeshStandardMaterial|ShaderMaterial} material
@@ -75927,7 +75928,7 @@ function computeHashColor(c) {
75927
75928
  */
75928
75929
  function computeMaterialHash(material) {
75929
75930
 
75930
- let hash = computeHashIntegerArray(
75931
+ let hash = combine_hash(
75931
75932
  computeHashFloat(material.alphaTest),
75932
75933
  material.blendDst,
75933
75934
  material.blendDstAlpha === null ? 0 : computeHashFloat(material.blendDstAlpha),
@@ -75961,7 +75962,7 @@ function computeMaterialHash(material) {
75961
75962
 
75962
75963
 
75963
75964
  if (material.isMeshStandardMaterial) {
75964
- hash = computeHashIntegerArray(
75965
+ hash = combine_hash(
75965
75966
  hash,
75966
75967
  computeHashColor(material.color),
75967
75968
  computeHashFloat(material.roughness),
@@ -76509,7 +76510,7 @@ function computeTextureHash(t) {
76509
76510
 
76510
76511
  const specificHash = computeSpecificHash(t);
76511
76512
 
76512
- return computeHashIntegerArray(
76513
+ return combine_hash(
76513
76514
  t.mapping,
76514
76515
  t.wrapS,
76515
76516
  t.wrapT,
@@ -85550,7 +85551,7 @@ class AssetDescription {
85550
85551
  * @returns {number}
85551
85552
  */
85552
85553
  hash() {
85553
- return computeHashIntegerArray(
85554
+ return combine_hash(
85554
85555
  computeStringHash(this.path),
85555
85556
  computeStringHash(this.type)
85556
85557
  );
@@ -98230,7 +98231,7 @@ function isArrayEqual(first, second) {
98230
98231
  * @param {KeyValuePair<string,string>} pair
98231
98232
  */
98232
98233
  function computeStringPairHash(pair) {
98233
- return computeHashIntegerArray(
98234
+ return combine_hash(
98234
98235
  computeStringHash(pair.key),
98235
98236
  computeStringHash(pair.value)
98236
98237
  );
@@ -98465,7 +98466,7 @@ class HTMLElementCacheKey {
98465
98466
  const tagHash = computeStringHash(this.tag);
98466
98467
 
98467
98468
 
98468
- this.__hash = computeHashIntegerArray(
98469
+ this.__hash = combine_hash(
98469
98470
  styleHash,
98470
98471
  attributeHash,
98471
98472
  tagHash
@@ -102798,7 +102799,7 @@ class GUIElement {
102798
102799
  * @return {number}
102799
102800
  */
102800
102801
  hash() {
102801
- return computeHashIntegerArray(
102802
+ return combine_hash(
102802
102803
  this.flags,
102803
102804
  computeStringHash(this.klass),
102804
102805
  this.anchor.hash(),
@@ -102935,7 +102936,7 @@ class ViewportPosition {
102935
102936
  }
102936
102937
 
102937
102938
  hash() {
102938
- return computeHashIntegerArray(
102939
+ return combine_hash(
102939
102940
  this.position.hash(),
102940
102941
  this.offset.hash(),
102941
102942
  this.anchor.hash(),