@woosh/meep-engine 2.119.80 → 2.119.82

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 (138) hide show
  1. package/build/bundle-worker-image-decoder.js +1 -1
  2. package/editor/Editor.d.ts.map +1 -1
  3. package/editor/SelectionVisualizer.d.ts +0 -6
  4. package/editor/SelectionVisualizer.d.ts.map +1 -1
  5. package/editor/actions/concrete/ComponentAddAction.d.ts +0 -3
  6. package/editor/actions/concrete/ComponentAddAction.d.ts.map +1 -1
  7. package/editor/actions/concrete/ComponentRemoveAction.d.ts +0 -4
  8. package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -1
  9. package/editor/actions/concrete/EntityCreateAction.d.ts +0 -3
  10. package/editor/actions/concrete/EntityCreateAction.d.ts.map +1 -1
  11. package/editor/actions/concrete/EntityRemoveAction.d.ts.map +1 -1
  12. package/editor/actions/concrete/SelectionAddAction.d.ts.map +1 -1
  13. package/editor/actions/concrete/SelectionClearAction.d.ts +0 -3
  14. package/editor/actions/concrete/SelectionClearAction.d.ts.map +1 -1
  15. package/editor/actions/concrete/SelectionRemoveAction.d.ts +0 -3
  16. package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +1 -1
  17. package/editor/ecs/EditorEntity.d.ts +0 -7
  18. package/editor/ecs/EditorEntity.d.ts.map +1 -1
  19. package/editor/ecs/component/createObjectEditor.d.ts.map +1 -1
  20. package/editor/ecs/component/editors/ImagePathEditor.d.ts +7 -0
  21. package/editor/ecs/component/editors/ImagePathEditor.d.ts.map +1 -0
  22. package/editor/ecs/component/editors/LargeStringEditor.d.ts +16 -0
  23. package/editor/ecs/component/editors/LargeStringEditor.d.ts.map +1 -0
  24. package/editor/ecs/component/editors/Sampler2DEditor.d.ts.map +1 -1
  25. package/editor/ecs/component/editors/common/EnumEditor.d.ts +8 -0
  26. package/editor/ecs/component/editors/common/EnumEditor.d.ts.map +1 -0
  27. package/editor/ecs/component/editors/ecs/GridObstacleEditor.d.ts +7 -0
  28. package/editor/ecs/component/editors/ecs/GridObstacleEditor.d.ts.map +1 -0
  29. package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts +14 -0
  30. package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts.map +1 -0
  31. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +67 -0
  32. package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +1 -0
  33. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +12 -0
  34. package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +1 -0
  35. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +52 -0
  36. package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +1 -0
  37. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +48 -0
  38. package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +1 -0
  39. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +16 -0
  40. package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +1 -0
  41. package/editor/ecs/component/editors/ecs/Trail2DEditor.d.ts +30 -0
  42. package/editor/ecs/component/editors/ecs/Trail2DEditor.d.ts.map +1 -0
  43. package/editor/ecs/component/editors/ecs/TransformEditor.d.ts +20 -0
  44. package/editor/ecs/component/editors/ecs/TransformEditor.d.ts.map +1 -0
  45. package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.d.ts +19 -0
  46. package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.d.ts.map +1 -0
  47. package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.d.ts +39 -0
  48. package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.d.ts.map +1 -0
  49. package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.d.ts +16 -0
  50. package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.d.ts.map +1 -0
  51. package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.d.ts +19 -0
  52. package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.d.ts.map +1 -0
  53. package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.d.ts +18 -0
  54. package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.d.ts.map +1 -0
  55. package/editor/ecs/component/editors/three/BufferGeometryEditor.d.ts +7 -0
  56. package/editor/ecs/component/editors/three/BufferGeometryEditor.d.ts.map +1 -0
  57. package/editor/ecs/component/editors/three/MaterialEditor.d.ts +7 -0
  58. package/editor/ecs/component/editors/three/MaterialEditor.d.ts.map +1 -0
  59. package/editor/ecs/component/editors/three/MeshEditor.d.ts +7 -0
  60. package/editor/ecs/component/editors/three/MeshEditor.d.ts.map +1 -0
  61. package/editor/ecs/component/editors/three/TextureEditor.d.ts +7 -0
  62. package/editor/ecs/component/editors/three/TextureEditor.d.ts.map +1 -0
  63. package/editor/process/DisableGameUIProcess.d.ts +8 -0
  64. package/editor/process/DisableGameUIProcess.d.ts.map +1 -0
  65. package/editor/process/ObstacleGridDisplayProcess.d.ts +13 -0
  66. package/editor/process/ObstacleGridDisplayProcess.d.ts.map +1 -0
  67. package/editor/process/SymbolicDisplayProcess.d.ts +19 -0
  68. package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -0
  69. package/editor/process/symbolic/ComponentSymbolicDisplay.d.ts +11 -0
  70. package/editor/process/symbolic/ComponentSymbolicDisplay.d.ts.map +1 -0
  71. package/editor/process/symbolic/SymbolicDisplayInternalAPI.d.ts +65 -0
  72. package/editor/process/symbolic/SymbolicDisplayInternalAPI.d.ts.map +1 -0
  73. package/editor/process/symbolic/buildThreeJSHelperEntity.d.ts +9 -0
  74. package/editor/process/symbolic/buildThreeJSHelperEntity.d.ts.map +1 -0
  75. package/editor/process/symbolic/make3DSymbolicDisplay.d.ts +10 -0
  76. package/editor/process/symbolic/make3DSymbolicDisplay.d.ts.map +1 -0
  77. package/editor/process/symbolic/makeCameraSymbolicDisplay.d.ts +7 -0
  78. package/editor/process/symbolic/makeCameraSymbolicDisplay.d.ts.map +1 -0
  79. package/editor/process/symbolic/makeGridPositionSymbolDisplay.d.ts +6 -0
  80. package/editor/process/symbolic/makeGridPositionSymbolDisplay.d.ts.map +1 -0
  81. package/editor/process/symbolic/makeLightSymbolicDisplay.d.ts +7 -0
  82. package/editor/process/symbolic/makeLightSymbolicDisplay.d.ts.map +1 -0
  83. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.d.ts +6 -0
  84. package/editor/process/symbolic/makeParticleEmitterSymbolicDisplay.d.ts.map +1 -0
  85. package/editor/process/symbolic/makePathSymbolicDisplay.d.ts +7 -0
  86. package/editor/process/symbolic/makePathSymbolicDisplay.d.ts.map +1 -0
  87. package/editor/process/symbolic/makePositionedIconDisplaySymbol.d.ts +9 -0
  88. package/editor/process/symbolic/makePositionedIconDisplaySymbol.d.ts.map +1 -0
  89. package/editor/process/symbolic/makeSocketsSymbolicDisplay.d.ts +7 -0
  90. package/editor/process/symbolic/makeSocketsSymbolicDisplay.d.ts.map +1 -0
  91. package/editor/process/symbolic/makeSoundEmitterSymbolicDisplay.d.ts +6 -0
  92. package/editor/process/symbolic/makeSoundEmitterSymbolicDisplay.d.ts.map +1 -0
  93. package/editor/process/symbolic/synchronizeTransform.d.ts +12 -0
  94. package/editor/process/symbolic/synchronizeTransform.d.ts.map +1 -0
  95. package/editor/tools/GridPaintTool.d.ts.map +1 -1
  96. package/editor/tools/SelectionTool.d.ts +27 -0
  97. package/editor/tools/SelectionTool.d.ts.map +1 -1
  98. package/editor/tools/TopDownCameraControlTool.d.ts.map +1 -1
  99. package/editor/tools/engine/Tool.d.ts +1 -1
  100. package/editor/tools/engine/Tool.d.ts.map +1 -1
  101. package/editor/tools/engine/ToolEngine.d.ts +1 -8
  102. package/editor/tools/engine/ToolEngine.d.ts.map +1 -1
  103. package/editor/tools/paint/TerrainHeightPaintTool.d.ts.map +1 -1
  104. package/editor/tools/paint/TerrainPaintTool.d.ts.map +1 -1
  105. package/editor/tools/paint/TerrainTexturePaintTool.d.ts.map +1 -1
  106. package/editor/view/EditorView.d.ts.map +1 -1
  107. package/editor/view/ecs/ComponentControlFactory.d.ts +0 -5
  108. package/editor/view/ecs/ComponentControlFactory.d.ts.map +1 -1
  109. package/editor/view/ecs/EntityEditor.d.ts +2 -3
  110. package/editor/view/ecs/EntityEditor.d.ts.map +1 -1
  111. package/editor/view/ecs/EntityList.d.ts.map +1 -1
  112. package/editor/view/ecs/components/GridObstacleController.d.ts +14 -0
  113. package/editor/view/ecs/components/GridObstacleController.d.ts.map +1 -0
  114. package/editor/view/tools/ToolView.d.ts.map +1 -1
  115. package/package.json +1 -1
  116. package/src/core/binary/BinaryBuffer.d.ts +19 -0
  117. package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
  118. package/src/core/binary/BinaryBuffer.js +31 -0
  119. package/src/core/binary/half_to_float_uint16.d.ts +9 -0
  120. package/src/core/binary/half_to_float_uint16.d.ts.map +1 -0
  121. package/src/core/binary/half_to_float_uint16.js +50 -0
  122. package/src/core/events/signal/Signal.d.ts.map +1 -1
  123. package/src/core/events/signal/Signal.js +99 -105
  124. package/src/core/geom/Vector3.d.ts.map +1 -1
  125. package/src/core/geom/Vector3.js +17 -0
  126. package/src/core/localization/Localization.d.ts.map +1 -1
  127. package/src/core/localization/Localization.js +3 -1
  128. package/src/engine/ecs/Entity.d.ts.map +1 -1
  129. package/src/engine/ecs/Entity.js +45 -15
  130. package/src/engine/ecs/EntityReference.d.ts +33 -0
  131. package/src/engine/ecs/EntityReference.d.ts.map +1 -1
  132. package/src/engine/ecs/EntityReference.js +59 -4
  133. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.d.ts.map +1 -1
  134. package/src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.js +14 -8
  135. package/src/engine/sound/ecs/emitter/SoundTrack.d.ts.map +1 -1
  136. package/src/engine/sound/ecs/emitter/SoundTrack.js +8 -4
  137. package/src/view/minimap/gl/MinimapTerrainGL.d.ts.map +1 -1
  138. package/src/view/minimap/gl/MinimapTerrainGL.js +8 -4
@@ -314,23 +314,24 @@ export class Signal {
314
314
 
315
315
  do {
316
316
 
317
- if (_h.generation >= this.generation) {
318
- break;
319
- }
320
-
321
317
  const next = _h.next;
322
318
 
323
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
324
- //handler should be cut
325
- this.#remove_handler_internal(_h);
326
- }
319
+ if(_h.generation < this.generation) {
320
+ // only process if handler was attached before this dispatch
321
+
322
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
323
+ //handler should be cut
324
+ this.#remove_handler_internal(_h);
325
+ }
327
326
 
328
- const _f = _h.handle;
327
+ const _f = _h.handle;
328
+
329
+ try {
330
+ _f.apply(_h.context, args)
331
+ } catch (e) {
332
+ console.error("Failed to dispatch handler", _f, e);
333
+ }
329
334
 
330
- try {
331
- _f.apply(_h.context, args)
332
- } catch (e) {
333
- console.error("Failed to dispatch handler", _f, e);
334
335
  }
335
336
 
336
337
  _h = next;
@@ -363,23 +364,23 @@ export class Signal {
363
364
 
364
365
  do {
365
366
 
366
- if (_h.generation >= this.generation) {
367
- break;
368
- }
369
-
370
367
  const next = _h.next;
371
368
 
372
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
373
- //handler should be cut
374
- this.#remove_handler_internal(_h);
375
- }
369
+ if(_h.generation < this.generation) {
370
+ // only process if handler was attached before this dispatch
371
+
372
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
373
+ //handler should be cut
374
+ this.#remove_handler_internal(_h);
375
+ }
376
376
 
377
- const _f = _h.handle;
377
+ const _f = _h.handle;
378
378
 
379
- try {
380
- _f.call(_h.context)
381
- } catch (e) {
382
- console.error("Failed to dispatch handler", _f, e);
379
+ try {
380
+ _f.call(_h.context)
381
+ } catch (e) {
382
+ console.error("Failed to dispatch handler", _f, e);
383
+ }
383
384
  }
384
385
 
385
386
  _h = next;
@@ -412,23 +413,22 @@ export class Signal {
412
413
 
413
414
  do {
414
415
 
415
- if (_h.generation >= this.generation) {
416
- break;
417
- }
418
-
419
416
  const next = _h.next;
420
417
 
421
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
422
- //handler should be cut
423
- this.#remove_handler_internal(_h);
424
- }
418
+ if(_h.generation < this.generation) {
419
+ // only process if handler was attached before this dispatch
420
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
421
+ //handler should be cut
422
+ this.#remove_handler_internal(_h);
423
+ }
425
424
 
426
- const _f = _h.handle;
425
+ const _f = _h.handle;
427
426
 
428
- try {
429
- _f.call(_h.context, arg)
430
- } catch (e) {
431
- console.error("Failed to dispatch handler", _f, e);
427
+ try {
428
+ _f.call(_h.context, arg)
429
+ } catch (e) {
430
+ console.error("Failed to dispatch handler", _f, e);
431
+ }
432
432
  }
433
433
 
434
434
  _h = next;
@@ -461,23 +461,22 @@ export class Signal {
461
461
 
462
462
  do {
463
463
 
464
- if (_h.generation >= this.generation) {
465
- break;
466
- }
467
-
468
464
  const next = _h.next;
469
465
 
470
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
471
- //handler should be cut
472
- this.#remove_handler_internal(_h);
473
- }
466
+ if(_h.generation < this.generation) {
467
+ // only process if handler was attached before this dispatch
468
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
469
+ //handler should be cut
470
+ this.#remove_handler_internal(_h);
471
+ }
474
472
 
475
- const _f = _h.handle;
473
+ const _f = _h.handle;
476
474
 
477
- try {
478
- _f.call(_h.context, a, b)
479
- } catch (e) {
480
- console.error("Failed to dispatch handler", _f, e);
475
+ try {
476
+ _f.call(_h.context, a, b)
477
+ } catch (e) {
478
+ console.error("Failed to dispatch handler", _f, e);
479
+ }
481
480
  }
482
481
 
483
482
  _h = next;
@@ -510,23 +509,22 @@ export class Signal {
510
509
 
511
510
  do {
512
511
 
513
- if (_h.generation >= this.generation) {
514
- break;
515
- }
516
-
517
512
  const next = _h.next;
518
513
 
519
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
520
- //handler should be cut
521
- this.#remove_handler_internal(_h);
522
- }
514
+ if(_h.generation < this.generation) {
515
+ // only process if handler was attached before this dispatch
516
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
517
+ //handler should be cut
518
+ this.#remove_handler_internal(_h);
519
+ }
523
520
 
524
- const _f = _h.handle;
521
+ const _f = _h.handle;
525
522
 
526
- try {
527
- _f.call(_h.context, a, b, c)
528
- } catch (e) {
529
- console.error("Failed to dispatch handler", _f, e);
523
+ try {
524
+ _f.call(_h.context, a, b, c)
525
+ } catch (e) {
526
+ console.error("Failed to dispatch handler", _f, e);
527
+ }
530
528
  }
531
529
 
532
530
  _h = next;
@@ -560,23 +558,22 @@ export class Signal {
560
558
 
561
559
  do {
562
560
 
563
- if (_h.generation >= this.generation) {
564
- break;
565
- }
566
-
567
561
  const next = _h.next;
568
562
 
569
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
570
- //handler should be cut
571
- this.#remove_handler_internal(_h);
572
- }
563
+ if(_h.generation < this.generation) {
564
+ // only process if handler was attached before this dispatch
565
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
566
+ //handler should be cut
567
+ this.#remove_handler_internal(_h);
568
+ }
573
569
 
574
- const _f = _h.handle;
570
+ const _f = _h.handle;
575
571
 
576
- try {
577
- _f.call(_h.context, a, b, c, d)
578
- } catch (e) {
579
- console.error("Failed to dispatch handler", _f, e);
572
+ try {
573
+ _f.call(_h.context, a, b, c, d)
574
+ } catch (e) {
575
+ console.error("Failed to dispatch handler", _f, e);
576
+ }
580
577
  }
581
578
 
582
579
  _h = next;
@@ -612,23 +609,22 @@ export class Signal {
612
609
 
613
610
  do {
614
611
 
615
- if (_h.generation >= this.generation) {
616
- break;
617
- }
618
-
619
612
  const next = _h.next;
620
613
 
621
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
622
- //handler should be cut
623
- this.#remove_handler_internal(_h);
624
- }
614
+ if(_h.generation < this.generation) {
615
+ // only process if handler was attached before this dispatch
616
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
617
+ //handler should be cut
618
+ this.#remove_handler_internal(_h);
619
+ }
625
620
 
626
- const _f = _h.handle;
621
+ const _f = _h.handle;
627
622
 
628
- try {
629
- _f.call(_h.context, a, b, c, d, e, f)
630
- } catch (e) {
631
- console.error("Failed to dispatch handler", f, e);
623
+ try {
624
+ _f.call(_h.context, a, b, c, d, e, f)
625
+ } catch (e) {
626
+ console.error("Failed to dispatch handler", f, e);
627
+ }
632
628
  }
633
629
 
634
630
  _h = next;
@@ -666,24 +662,22 @@ export class Signal {
666
662
 
667
663
  do {
668
664
 
669
- if (_h.generation >= this.generation) {
670
- break;
671
- }
672
-
673
-
674
665
  const next = _h.next;
675
666
 
676
- if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
677
- //handler should be cut
678
- this.#remove_handler_internal(_h);
679
- }
667
+ if(_h.generation < this.generation) {
668
+ // only process if handler was attached before this dispatch
669
+ if (_h.getFlag(SignalHandlerFlags.RemoveAfterExecution)) {
670
+ //handler should be cut
671
+ this.#remove_handler_internal(_h);
672
+ }
680
673
 
681
- const _f = _h.handle;
674
+ const _f = _h.handle;
682
675
 
683
- try {
684
- _f.call(_h.context, a, b, c, d, e, f, g, h)
685
- } catch (e) {
686
- console.error("Failed to dispatch handler", f, e);
676
+ try {
677
+ _f.call(_h.context, a, b, c, d, e, f, g, h)
678
+ } catch (e) {
679
+ console.error("Failed to dispatch handler", f, e);
680
+ }
687
681
  }
688
682
 
689
683
  _h = next;
@@ -1 +1 @@
1
- {"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Vector3.js"],"names":[],"mappings":";AAgBA;;;GAGG;AACH;IAo6BI;;;;;OAK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ANW,MAAM,KACN,MAAM,KACN,MAAM,cACN,MAAM,GACL,OAAO,CAMlB;IAED,cAMC;IAED;;;OAGG;IACH,0BAFW,OAAO,QAYjB;IAED;;;;;;;;OAQG;IACH,oBAPW,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,MACN,MAAM,QAkBhB;IAED;;;;;OAKG;IACH,+BAJW,MAAM,OACN,MAAM,SACN,MAAM,QAuBhB;IAED;;;;;OAKG;IACH,6CAFa,OAAO,CASnB;IAED;;;;MAEC;IAED;;;OAGG;IACH,eAFW;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAC;QAAC,CAAC,EAAC,MAAM,CAAA;KAAC,GAAC,MAAM,QAS/C;IAED,mBAEC;IAED;;;;OAIG;IACH,2CAIC;IAED;;;;OAIG;IACH,6CAMC;IAED;;;;OAIG;IACH,kDAIC;IAED;;;;OAIG;IACH,oDAMC;IAED,eAMC;IAeD,mBAEC;IAdD,gBAEC;IAcD,mBAEC;IAdD,gBAEC;IAcD,mBAEC;IAdD,gBAEC;IAoEL,2BAxfe,OAAO,YAwfa;IAEnC,gBAlkBiB,MAAM,CAkkBG;IAC1B,mBAt7Be,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,UAq7BM;IAC3B,kBA16Be,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,6BAy6BI;IACzB;;OAEG;IACH,kBA96Be,MAAM,EAAE,GAAC,YAAY,WACrB,MAAM,6BA66BI;IA2DzB;;;OAGG;IACH,oBAFU,OAAO,CAEU;IA7HvB,sDAMC;CA4CJ;;cAiBS,OAAO;aAOP,OAAO;mBAOP,OAAO;YAMP,OAAO;cAMP,OAAO;cAMP,OAAO;eAMP,OAAO;iBAMP,OAAO;cAMP,OAAO;kBAYP,MAAM;;mBAhjCG,4BAA4B"}
1
+ {"version":3,"file":"Vector3.d.ts","sourceRoot":"","sources":["../../../../src/core/geom/Vector3.js"],"names":[],"mappings":";AAgBA;;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
29
  constructor(x = 0, y = 0, z = 0) {
30
+ assert.isNumber(x, 'x');
31
+ assert.notNaN(x, 'x');
32
+
33
+ assert.isNumber(y, 'x');
34
+ assert.notNaN(y, 'x');
35
+
36
+ assert.isNumber(z, 'x');
37
+ assert.notNaN(z, 'x');
38
+
30
39
  /**
40
+ * NOTE: do not assign directly, please use {@link set} method instead
41
+ * @readonly
31
42
  * @type {number}
32
43
  */
33
44
  this.x = x;
45
+
34
46
  /**
47
+ * NOTE: do not assign directly, please use {@link set} method instead
48
+ * @readonly
35
49
  * @type {number}
36
50
  */
37
51
  this.y = y;
52
+
38
53
  /**
54
+ * NOTE: do not assign directly, please use {@link set} method instead
55
+ * @readonly
39
56
  * @type {number}
40
57
  */
41
58
  this.z = z;
@@ -1 +1 @@
1
- {"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../../../src/core/localization/Localization.js"],"names":[],"mappings":"AA6BA;IAEQ;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEH;IAExB,SAAc;IAEd;;;OAGG;IACH,6BAFU,gBAAgB,CAEwB;IAElD;;;OAGG;IACH,QAFU,cAAc,CAEY;IAEpC;;;OAGG;IACH,OAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,wBAGE;IAGN;;;;OAIG;IACH,4BAEC;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,wCAEC;IAED;;;OAGG;IACH,8BAHa,OAAO,CAoBnB;IAED;;;;;;OAMG;IACH,mBAJW,MAAM,SACN,MAAM,gBAgDhB;IAGD;;;OAGG;IACH,gCAFW,MAAM,UAMhB;IAED;;;;;OAKG;IACH,0BA0BC;IAED;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,GAEJ,MAAM,CAoBlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,OAAO,CAIlB;CACJ;iCAnPgC,uBAAuB;2BAL7B,4BAA4B"}
1
+ {"version":3,"file":"Localization.d.ts","sourceRoot":"","sources":["../../../../src/core/localization/Localization.js"],"names":[],"mappings":"AA8BA;IAEQ;;;OAGG;IACH,cAFU,eAAa,IAAI,CAEH;IAExB,SAAc;IAEd;;;OAGG;IACH,6BAFU,gBAAgB,CAEwB;IAElD;;;OAGG;IACH,QAFU,cAAc,CAEY;IAEpC;;;OAGG;IACH,OAFU,OAAO,CAEA;IAEjB;;;OAGG;IACH,wBAIE;IAGN;;;;OAIG;IACH,4BAEC;IAED;;;;OAIG;IACH,0BAHW,MAAM,GACJ,MAAM,CAMlB;IAED;;;OAGG;IACH,wCAEC;IAED;;;OAGG;IACH,8BAHa,OAAO,CAoBnB;IAED;;;;;;OAMG;IACH,mBAJW,MAAM,SACN,MAAM,gBAgDhB;IAGD;;;OAGG;IACH,gCAFW,MAAM,UAMhB;IAED;;;;;OAKG;IACH,0BA0BC;IAED;;;;;;OAMG;IACH,eALW,MAAM,SACN,MAAM,GAEJ,MAAM,CAoBlB;IAED;;;;OAIG;IACH,eAHW,MAAM,GACL,OAAO,CAIlB;CACJ;iCApPgC,uBAAuB;2BAL7B,4BAA4B"}
@@ -2,6 +2,7 @@ import { parseTooltipString } from "../../view/tooltip/gml/parser/parseTooltipSt
2
2
  import { assert } from "../assert.js";
3
3
  import { Cache } from "../cache/Cache.js";
4
4
  import { computeHashArray } from "../collection/array/computeHashArray.js";
5
+ import { isArrayEqualStrict } from "../collection/array/isArrayEqualStrict.js";
5
6
  import ObservedString from "../model/ObservedString.js";
6
7
  import { seedVariablesIntoTemplateString } from "../parser/seedVariablesIntoTemplateString.js";
7
8
  import { STRING_TEMPLATE_VARIABLE_REGEX } from "../parser/STRING_TEMPLATE_VARIABLE_REGEX.js";
@@ -61,7 +62,8 @@ export class Localization {
61
62
  */
62
63
  this.__failure_cache = new Cache({
63
64
  maxWeight: 1024,
64
- keyHashFunction: (key) => computeHashArray(key, computeStringHash)
65
+ keyHashFunction: (key) => computeHashArray(key, computeStringHash),
66
+ keyEqualityFunction: isArrayEqualStrict
65
67
  });
66
68
  }
67
69
 
@@ -1 +1 @@
1
- {"version":3,"file":"Entity.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/Entity.js"],"names":[],"mappings":";AAeA;;;GAGG;AACH;IAoYI;;;;;OAKG;IACH,+BAJW,MAAM,oCAEJ,MAAM,CAelB;IArZD;;;OAGG;IACH,IAFU,MAAM,CAER;IAER;;;;OAIG;IACH,YAFU,MAAM,CAEA;IAEhB;;;;OAIG;IACH,2BAAgB;IAQhB;;;OAGG;IACH,gCAAe;IAEf;;;OAGG;IACH,OAFU,WAAW,GAAC,MAAM,CAEN;IAEtB;;;OAGG;IACH,gBAAgB;IAEhB;;OAEG;IACH;;MAEE;IAUF;;;OAGG;IACH,eAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;;OAIG;IACH,cAHW,MAAM,GAAC,WAAW,GAChB,OAAO,CAMnB;IAED;;;OAGG;IACH,gBAFW,MAAM,GAAC,WAAW,QAI5B;IAED;;;OAGG;IACH,uBAEC;IAED;;OAEG;IACH,4BAQC;IAED;;;OAGG;IACH,oBAEC;IAED;;;;OAIG;IACH,8BAFa,MAAM,CAiBlB;IAED;;;;OAIG;IACH,+BAFa,OAAO,CAInB;IAED;;;;OAIG;IACH,0CAYC;IAED;;;;;OAKG;IACH,8CAQC;IAED;;;;OAIG;IACH,kCAFa,MAAE,IAAI,CA0BlB;IAED;;;;OAIG;IACH,qBAHW,MAAM,qBAShB;IAED;;;OAGG;IACH,wBAFW,MAAM,gBAiBhB;IAED;;;;;;OAMG;IACH,4BALW,MAAM,sCAGJ,MAAM,CAalB;IAED;;;;;;OAMG;IACH,+BALW,MAAM,sCAGJ,MAAM,CAyBlB;IAED;;;OAGG;IACH,WAFa,OAAO,CAwBnB;IAED;;;;OAIG;IACH,wCAHa,MAAM,CAwDlB;IAwBL;;;;OAIG;IACH,mBAFU,OAAO,CAEQ;;CAPxB;4BAxa2B,kBAAkB;mBAF3B,oCAAoC"}
1
+ {"version":3,"file":"Entity.d.ts","source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 -3,6 +3,7 @@ import Signal from "../../core/events/signal/Signal.js";
3
3
  import { isDefined } from "../../core/process/matcher/isDefined.js";
4
4
  import { EntityFlags } from "./EntityFlags.js";
5
5
  import { EventType } from "./EntityManager.js";
6
+ import { EntityReference } from "./EntityReference.js";
6
7
 
7
8
  /**
8
9
  * Set of default flags
@@ -20,17 +21,44 @@ const DEFAULT_FLAGS =
20
21
  class Entity {
21
22
 
22
23
  /**
23
- * When entity is live - this is the entity ID inside associated `EntityComponentDataset`, when the entity is not live - it's set to -1
24
- * @type {number}
24
+ * @readonly
25
+ * @type {EntityReference}
26
+ */
27
+ reference = new EntityReference();
28
+
29
+
30
+ /**
31
+ * @deprecated use {@link reference} instead
32
+ * @returns {number}
25
33
  */
26
- id = -1;
34
+ get id() {
35
+ return this.reference.id;
36
+ }
27
37
 
28
38
  /**
29
- * Generation is a unique identifier coming from the dataset
30
- * Generation of an existing entity must match for it to be considered "the same"
31
- * @type {number}
39
+ * @deprecated use {@link reference} instead
40
+ * @param {number} v
32
41
  */
33
- generation = -1;
42
+ set id(v) {
43
+ this.reference.id = v;
44
+ }
45
+
46
+ /**
47
+ * @deprecated use {@link reference} instead
48
+ * @returns {number}
49
+ */
50
+ get generation() {
51
+ return this.reference.generation;
52
+ }
53
+
54
+
55
+ /**
56
+ * @deprecated use {@link reference} instead
57
+ * @param {number} v
58
+ */
59
+ set generation(v) {
60
+ this.reference.generation = v;
61
+ }
34
62
 
35
63
  /**
36
64
  * Components associated with the entity
@@ -220,7 +248,7 @@ class Entity {
220
248
  //see if entity is built
221
249
  if (this.getFlag(EntityFlags.Built)) {
222
250
 
223
- this.dataset.removeComponentFromEntity(this.id, klass);
251
+ this.dataset.removeComponentFromEntity(this.reference.id, klass);
224
252
 
225
253
  }
226
254
 
@@ -325,7 +353,7 @@ class Entity {
325
353
  if (this.getFlag(EntityFlags.Built)) {
326
354
 
327
355
  const dataset = this.dataset;
328
- const entity = this.id;
356
+ const entity = this.reference.id;
329
357
 
330
358
  //check that the entity is the same as what we have built
331
359
  //assert.ok(checkExistingComponents(entity, this.element, dataset), `Signature of Entity does not match existing entity(id=${entity})`);
@@ -334,8 +362,8 @@ class Entity {
334
362
 
335
363
  dataset.removeEntity(entity);
336
364
 
337
- this.id = -1;
338
- this.generation = -1;
365
+ // clear reference
366
+ this.reference.copy(EntityReference.NULL);
339
367
 
340
368
  this.clearFlag(EntityFlags.Built);
341
369
 
@@ -362,8 +390,9 @@ class Entity {
362
390
  return this.id;
363
391
  }
364
392
 
365
- const entity = this.id = dataset.createEntity();
366
- this.generation = dataset.getEntityGeneration(entity);
393
+ const entity = dataset.createEntity();
394
+ this.reference.bind(dataset, entity);
395
+
367
396
  this.dataset = dataset;
368
397
 
369
398
  let i;
@@ -419,9 +448,10 @@ class Entity {
419
448
  .forEach(r.add, r);
420
449
 
421
450
  r.setFlag(EntityFlags.Built);
422
- r.id = entity;
451
+
423
452
  r.dataset = dataset;
424
- r.generation = dataset.getEntityGeneration(entity);
453
+
454
+ r.reference.bind(dataset,entity);
425
455
 
426
456
  return r;
427
457
  }
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Uniquely identifies an entity by both its ID and generation.
3
+ * Lets us distinguish between two entities with the same ID that were created at different times
4
+ */
1
5
  export class EntityReference {
2
6
  /**
3
7
  *
@@ -8,14 +12,26 @@ export class EntityReference {
8
12
  static from(id: number, generation: number): EntityReference;
9
13
  /**
10
14
  * Entity ID
15
+ * When entity is live - this is the entity ID inside associated `EntityComponentDataset`, when the entity is not live - it's set to -1
11
16
  * @type {number}
12
17
  */
13
18
  id: number;
14
19
  /**
15
20
  * Entity generation number. This uniquely identifies an entity in combination with the ID
21
+ * Generation of an existing entity must match for it to be considered "the same"
16
22
  * @type {number}
17
23
  */
18
24
  generation: number;
25
+ /**
26
+ *
27
+ * @param {EntityReference} other
28
+ */
29
+ copy(other: EntityReference): void;
30
+ /**
31
+ *
32
+ * @returns {EntityReference}
33
+ */
34
+ clone(): EntityReference;
19
35
  /**
20
36
  *
21
37
  * @return {number}
@@ -39,6 +55,23 @@ export class EntityReference {
39
55
  * @returns {boolean}
40
56
  */
41
57
  destroy(ecd: EntityComponentDataset): boolean;
58
+ /**
59
+ * Bind reference to a specific entity
60
+ * @param {EntityComponentDataset} ecd
61
+ * @param {number} entity
62
+ */
63
+ bind(ecd: EntityComponentDataset, entity: number): void;
64
+ /**
65
+ *
66
+ * @param {number} id
67
+ * @param {number} generation
68
+ */
69
+ from(id: number, generation: number): void;
70
+ /**
71
+ * @readonly
72
+ * @type {boolean}
73
+ */
74
+ readonly isEntityReference: boolean;
42
75
  }
43
76
  export namespace EntityReference {
44
77
  let NULL: EntityReference;
@@ -1 +1 @@
1
- {"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;IA4DI;;;;;OAKG;IACH,gBAJW,MAAM,cACN,MAAM,GACL,eAAe,CAa1B;IA3ED;;;OAGG;IACH,IAFU,MAAM,CAET;IAEP;;;OAGG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACd,OAAO,CAMlB;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAQnB;IAED;;;;OAIG;IACH,sCAFa,OAAO,CASnB;CAoBJ;;cAIS,eAAe"}
1
+ {"version":3,"file":"EntityReference.d.ts","sourceRoot":"","sources":["../../../../src/engine/ecs/EntityReference.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH;IA6GI;;;;;OAKG;IACH,gBAJW,MAAM,cACN,MAAM,GACL,eAAe,CAQ1B;IAvHD;;;;OAIG;IACH,IAFU,MAAM,CAET;IAEP;;;;OAIG;IACH,YAFU,MAAM,CAED;IAEf;;;OAGG;IACH,YAFW,eAAe,QAKzB;IAED;;;OAGG;IACH,SAFa,eAAe,CAQ3B;IAED;;;OAGG;IACH,QAFY,MAAM,CAIjB;IAED;;;;OAIG;IACH,cAHW,eAAe,GACd,OAAO,CAMlB;IAED;;;;OAIG;IACH,qCAFa,OAAO,CAQnB;IAED;;;;OAIG;IACH,sCAFa,OAAO,CASnB;IAED;;;;OAIG;IACH,0CAFW,MAAM,QAMhB;IAED;;;;OAIG;IACH,SAHW,MAAM,cACN,MAAM,QAUhB;IAiBL;;;OAGG;IACH,4BAFU,OAAO,CAE0B;CAN1C;;cAWS,eAAe"}
@@ -1,19 +1,46 @@
1
1
  import { assert } from "../../core/assert.js";
2
2
 
3
+ /**
4
+ * Uniquely identifies an entity by both its ID and generation.
5
+ * Lets us distinguish between two entities with the same ID that were created at different times
6
+ */
3
7
  export class EntityReference {
4
8
 
5
9
  /**
6
10
  * Entity ID
11
+ * When entity is live - this is the entity ID inside associated `EntityComponentDataset`, when the entity is not live - it's set to -1
7
12
  * @type {number}
8
13
  */
9
14
  id = -1
10
15
 
11
16
  /**
12
17
  * Entity generation number. This uniquely identifies an entity in combination with the ID
18
+ * Generation of an existing entity must match for it to be considered "the same"
13
19
  * @type {number}
14
20
  */
15
21
  generation = -1
16
22
 
23
+ /**
24
+ *
25
+ * @param {EntityReference} other
26
+ */
27
+ copy(other){
28
+ this.id = other.id;
29
+ this.generation = other.generation;
30
+ }
31
+
32
+ /**
33
+ *
34
+ * @returns {EntityReference}
35
+ */
36
+ clone(){
37
+ const r = new EntityReference();
38
+
39
+ r.copy(this);
40
+
41
+ return r;
42
+ }
43
+
17
44
  /**
18
45
  *
19
46
  * @return {number}
@@ -60,27 +87,55 @@ export class EntityReference {
60
87
  }
61
88
  }
62
89
 
90
+ /**
91
+ * Bind reference to a specific entity
92
+ * @param {EntityComponentDataset} ecd
93
+ * @param {number} entity
94
+ */
95
+ bind(ecd, entity){
96
+ const generation = ecd.getEntityGeneration(entity);
97
+
98
+ this.from(entity, generation);
99
+ }
100
+
63
101
  /**
64
102
  *
65
103
  * @param {number} id
66
104
  * @param {number} generation
67
- * @return {EntityReference}
68
105
  */
69
- static from(id, generation) {
106
+ from(id, generation){
70
107
 
71
108
  assert.isNonNegativeInteger(id, 'id');
72
109
  assert.isNonNegativeInteger(generation, 'generation');
73
110
 
111
+ this.id = id;
112
+ this.generation = generation;
113
+
114
+ }
115
+
116
+ /**
117
+ *
118
+ * @param {number} id
119
+ * @param {number} generation
120
+ * @return {EntityReference}
121
+ */
122
+ static from(id, generation) {
74
123
  const r = new EntityReference();
75
124
 
76
- r.id = id;
77
- r.generation = generation;
125
+ r.from(id, generation);
78
126
 
79
127
  return r;
80
128
  }
81
129
  }
82
130
 
83
131
  /**
132
+ * @readonly
133
+ * @type {boolean}
134
+ */
135
+ EntityReference.prototype.isEntityReference = true;
136
+
137
+ /**
138
+ * Special singleton to describe an invalid reference
84
139
  * @readonly
85
140
  * @type {EntityReference}
86
141
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TopDownCameraLanderSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.js"],"names":[],"mappings":"AA2EA;IACI,cAoBC;IAjBG;;;OAGG;IACH,cAFU,MAAM,MAAM,YAAW,CAEc;IAE/C,8EAAkE;IAElE,+EAEC;IAED;;;OAGG;IACH,aAAc;IAGlB;;;;;OAKG;IACH,aAJW,mBAAmB,cACnB,uBAAuB,UACvB,MAAM,QAmChB;IAED;;;;;OAKG;IACH,eAJW,mBAAmB,cACnB,uBAAuB,UACvB,MAAM,QAUhB;IAED,6BAEC;CACJ;uBA7JsB,2BAA2B;sBAE5B,oCAAoC;oCAEtB,8BAA8B;oCAH9B,0BAA0B;4CAOlB,0DAA0D"}
1
+ {"version":3,"file":"TopDownCameraLanderSystem.d.ts","sourceRoot":"","sources":["../../../../../../../src/engine/graphics/ecs/camera/topdown/TopDownCameraLanderSystem.js"],"names":[],"mappings":"AA6EA;IACI,cAwBC;IArBG;;;OAGG;IACH,cAFU,MAAM,MAAM,YAAW,CAM/B;IAEF,8EAAkE;IAElE,+EAEC;IAED;;;OAGG;IACH,aAAc;IAGlB;;;;;OAKG;IACH,aAJW,mBAAmB,cACnB,uBAAuB,UACvB,MAAM,QAmChB;IAED;;;;;OAKG;IACH,eAJW,mBAAmB,cACnB,uBAAuB,UACvB,MAAM,QAUhB;IAED,6BAEC;CACJ;uBA5JsB,2BAA2B;sBAR5B,oCAAoC;oCAWtB,8BAA8B;oCAC9B,0BAA0B;4CALlB,0DAA0D"}