@woosh/meep-engine 2.81.4 → 2.83.0

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 (111) hide show
  1. package/build/meep.cjs +4398 -4421
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +4398 -4421
  4. package/editor/ecs/component/editors/primitive/ArrayEditor.js +2 -2
  5. package/editor/enableEditor.js +1 -1
  6. package/editor/view/EditorView.js +25 -25
  7. package/editor/view/ecs/components/particles/ParticleEmitterController.js +11 -11
  8. package/editor/view/node-graph/NodeView.js +7 -7
  9. package/package.json +1 -1
  10. package/samples/terrain/editor.js +19 -18
  11. package/src/core/cache/Cache.js +4 -2
  12. package/src/core/cache/Cache.spec.js +1 -1
  13. package/src/core/collection/RingBuffer.js +6 -0
  14. package/src/core/collection/array/arraySetDiff.js +8 -2
  15. package/src/core/collection/array/groupArrayBy.js +1 -1
  16. package/src/core/collection/array/weightedRandomFromArray.spec.js +3 -1
  17. package/src/core/collection/heap/FastBinaryHeap.spec.js +3 -2
  18. package/src/core/collection/list/List.js +8 -17
  19. package/src/core/collection/list/List.spec.js +55 -0
  20. package/src/core/collection/map/HashMap.spec.js +3 -1
  21. package/src/core/collection/set/HashSet.spec.js +23 -0
  22. package/src/core/events/signal/signal_aggregate_by_time_window.js +1 -1
  23. package/src/core/fsm/simple/SimpleStateMachine.js +2 -1
  24. package/src/core/function/chain.js +19 -0
  25. package/src/core/function/makeReturnValue.js +8 -0
  26. package/src/core/function/noop.js +6 -0
  27. package/src/core/function/objectsEqual.js +14 -0
  28. package/src/core/function/passThrough.js +9 -0
  29. package/src/core/function/returnEmptyArray.js +7 -0
  30. package/src/core/function/returnFalse.js +7 -0
  31. package/src/core/function/returnOne.js +7 -0
  32. package/src/core/function/returnTrue.js +7 -0
  33. package/src/core/function/returnZero.js +7 -0
  34. package/src/core/function/strictEquals.js +10 -0
  35. package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +2 -2
  36. package/src/core/geom/3d/topology/struct/prototypeBinaryTopology.js +5 -4
  37. package/src/core/lang/reactive/AbstractCachingParser.js +2 -1
  38. package/src/core/math/random/randomFloatBetween.spec.js +2 -1
  39. package/src/core/math/random/randomIntegerBetween.spec.js +2 -1
  40. package/src/core/model/node-graph/Connection.js +2 -1
  41. package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +2 -2
  42. package/src/core/model/object/ObjectPoolFactory.js +2 -1
  43. package/src/core/model/stat/Stat.js +4 -4
  44. package/src/core/process/PromiseWatcher.spec.js +1 -1
  45. package/src/core/process/task/Task.js +2 -1
  46. package/src/engine/EngineHarness.js +2 -1
  47. package/src/engine/achievements/gateway/StorageAchievementGateway.js +1 -1
  48. package/src/engine/asset/AssetManager.js +14 -14
  49. package/src/engine/asset/loaders/ArrayBufferLoader.js +1 -1
  50. package/src/engine/ecs/EntityComponentDataset.spec.js +2 -2
  51. package/src/engine/ecs/EntityManager.js +2 -1
  52. package/src/engine/ecs/EntityObserver.spec.js +4 -4
  53. package/src/engine/ecs/System.js +2 -2
  54. package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +2 -1
  55. package/src/engine/ecs/ik/IKProblem.js +1 -1
  56. package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +2 -1
  57. package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +2 -1
  58. package/src/engine/ecs/terrain/ecs/TerrainSystem.js +2 -1
  59. package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +2 -1
  60. package/src/engine/ecs/terrain/util/obtainTerrain.js +1 -1
  61. package/src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.js +3 -3
  62. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +15 -8
  63. package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.js +7 -7
  64. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -1
  65. package/src/engine/graphics/material/SplatMaterial.js +1 -15
  66. package/src/engine/graphics/render/layers/RenderLayer.js +1 -1
  67. package/src/engine/graphics/render/utils/ThreeBypassRenderer.js +2 -1
  68. package/src/engine/graphics/render/visibility/VisibilityFilter.js +2 -1
  69. package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +2 -1
  70. package/src/engine/graphics/texture/atlas/ManagedTextureAtlas.js +5 -5
  71. package/src/engine/graphics/texture/cubemap/load_environment_map.js +2 -2
  72. package/src/engine/graphics/texture/makeOnePixelTexture.js +5 -3
  73. package/src/engine/graphics/texture/virtual/VirtualTexturePage.js +2 -1
  74. package/src/engine/graphics/texture/whitePixelTexture.js +9 -0
  75. package/src/engine/intelligence/behavior/ecs/BehaviorSystem.spec.js +5 -5
  76. package/src/engine/intelligence/blackboard/BlackboardDynamicStorageAdapter.js +3 -3
  77. package/src/engine/intelligence/mcts/MonteCarlo.js +3 -3
  78. package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +3 -3
  79. package/src/engine/network/PriorityFetch.js +2 -2
  80. package/src/engine/options/Option.js +2 -2
  81. package/src/engine/options/Option.spec.js +1 -1
  82. package/src/engine/options/OptionGroup.js +2 -2
  83. package/src/engine/options/OptionGroup.spec.js +2 -2
  84. package/src/engine/save/Storage.js +2 -1
  85. package/src/engine/save/StorageBackedList.js +2 -1
  86. package/src/engine/save/storage/InMemoryStorage.js +2 -2
  87. package/src/engine/scene/transitionToScene.js +2 -1
  88. package/src/engine/sound/ecs/SoundListenerSystem.js +7 -7
  89. package/src/engine/sound/ecs/emitter/loadSoundTrackAsset.js +3 -3
  90. package/src/engine/ui/DraggableAspect.js +2 -2
  91. package/src/engine/ui/GUIEngine.js +17 -17
  92. package/src/engine/ui/notification/AnimatedObjectEmitter.js +3 -3
  93. package/src/engine/ui/notification/NotificationManager.js +4 -4
  94. package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +9 -9
  95. package/src/generation/grid/generation/util/buildPathFromDistanceMap.js +1 -1
  96. package/src/generation/markers/actions/util/GridCellActionDebugBreak.js +1 -1
  97. package/src/view/common/LabelView.js +9 -9
  98. package/src/view/common/ListView.js +3 -2
  99. package/src/view/common/VirtualListView.js +7 -6
  100. package/src/view/common/dnd/DropTarget.js +2 -2
  101. package/src/view/elements/DropDownSelectionView.js +2 -2
  102. package/src/view/elements/image/ImageView.js +4 -4
  103. package/src/view/elements/progress/SmoothProgressBar.js +4 -4
  104. package/src/view/elements/radial/RadialMenuElementDefinition.js +1 -1
  105. package/src/view/elements/tiles2d/TileGrid.js +8 -8
  106. package/src/view/elements/video/VideoView.js +5 -5
  107. package/src/view/math/FunctionGraphView.js +1 -1
  108. package/src/view/tooltip/gml/TooltipParser.js +6 -5
  109. package/src/core/collection/map/AsyncLoadingCache.js +0 -50
  110. package/src/core/collection/map/AsyncRemoteHashMap.js +0 -358
  111. package/src/core/function/Functions.js +0 -103
@@ -1,7 +1,7 @@
1
- import { Option } from "./Option.js";
1
+ import { noop } from "../../core/function/noop.js";
2
2
  import { stringify } from "../../core/json/JsonUtils.js";
3
+ import { Option } from "./Option.js";
3
4
  import { OptionAbstract } from "./OptionAbstract.js";
4
- import { noop } from "../../core/function/Functions.js";
5
5
 
6
6
  function isOption(c) {
7
7
  return typeof c.read === "function";
@@ -1,6 +1,6 @@
1
- import { OptionGroup } from "./OptionGroup.js";
2
- import { noop } from "../../core/function/Functions.js";
1
+ import { noop } from "../../core/function/noop.js";
3
2
  import { InMemoryStorage } from "../save/storage/InMemoryStorage.js";
3
+ import { OptionGroup } from "./OptionGroup.js";
4
4
 
5
5
  test("constructor", () => {
6
6
  const group = new OptionGroup("x");
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Created by Alex on 22/02/2017.
3
3
  */
4
- import { noop } from "../../core/function/Functions.js";
4
+
5
+ import { noop } from "../../core/function/noop.js";
5
6
 
6
7
  class Storage {
7
8
  constructor() {
@@ -1,5 +1,6 @@
1
1
  import { assert } from "../../core/assert.js";
2
- import { noop, returnTrue } from "../../core/function/Functions.js";
2
+ import { noop } from "../../core/function/noop.js";
3
+ import { returnTrue } from "../../core/function/returnTrue.js";
3
4
 
4
5
  /**
5
6
  * @template T
@@ -1,6 +1,6 @@
1
- import Storage from "../Storage.js";
2
1
  import { collectIteratorValueToArray } from "../../../core/collection/collectIteratorValueToArray.js";
3
- import { noop } from "../../../core/function/Functions.js";
2
+ import { noop } from "../../../core/function/noop.js";
3
+ import Storage from "../Storage.js";
4
4
 
5
5
  export class InMemoryStorage extends Storage {
6
6
  #data = new Map();
@@ -1,5 +1,6 @@
1
1
  import { assert } from "../../core/assert.js";
2
- import { noop } from "../../core/function/Functions.js";
2
+
3
+ import { noop } from "../../core/function/noop.js";
3
4
  import Task from "../../core/process/task/Task.js";
4
5
  import TaskGroup from "../../core/process/task/TaskGroup.js";
5
6
  import TaskState from "../../core/process/task/TaskState.js";
@@ -3,15 +3,15 @@
3
3
  * Date: 11/6/2014
4
4
  * Time: 21:47
5
5
  */
6
- import { System } from '../../ecs/System.js';
7
- import SoundListener from './SoundListener.js';
8
- import { Transform } from '../../ecs/transform/Transform.js';
9
- import { browserInfo } from "../../browserInfo.js";
10
- import Vector3 from "../../../core/geom/Vector3.js";
11
- import { noop } from "../../../core/function/Functions.js";
12
6
  import { assert } from "../../../core/assert.js";
13
- import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
7
+ import { noop } from "../../../core/function/noop.js";
8
+ import Vector3 from "../../../core/geom/Vector3.js";
14
9
  import { ResourceAccessKind } from "../../../core/model/ResourceAccessKind.js";
10
+ import { ResourceAccessSpecification } from "../../../core/model/ResourceAccessSpecification.js";
11
+ import { browserInfo } from "../../browserInfo.js";
12
+ import { System } from '../../ecs/System.js';
13
+ import { Transform } from '../../ecs/transform/Transform.js';
14
+ import SoundListener from './SoundListener.js';
15
15
 
16
16
  const v3 = new Vector3();
17
17
  const v3_up = new Vector3();
@@ -1,7 +1,7 @@
1
- import { SoundTrackFlags } from "./SoundTrackFlags.js";
2
- import { GameAssetType } from "../../../asset/GameAssetType.js";
3
- import { noop } from "../../../../core/function/Functions.js";
4
1
  import { assert } from "../../../../core/assert.js";
2
+ import { noop } from "../../../../core/function/noop.js";
3
+ import { GameAssetType } from "../../../asset/GameAssetType.js";
4
+ import { SoundTrackFlags } from "./SoundTrackFlags.js";
5
5
 
6
6
  /**
7
7
  * @param {SoundTrack} track
@@ -3,9 +3,9 @@
3
3
  * @author Alex Goldring, travnick@gmail.com
4
4
  */
5
5
 
6
- import { PointerDevice } from "../input/devices/PointerDevice.js";
6
+ import { noop } from "../../core/function/noop.js";
7
7
  import Vector2 from "../../core/geom/Vector2.js";
8
- import { noop } from "../../core/function/Functions.js";
8
+ import { PointerDevice } from "../input/devices/PointerDevice.js";
9
9
 
10
10
  export class DraggableAspect {
11
11
  /**
@@ -4,31 +4,31 @@
4
4
 
5
5
 
6
6
  import List from '../../core/collection/list/List.js';
7
- import {playTrackRealTime} from "../animation/playTrackRealTime.js";
8
-
9
- import GUIElement from '../ecs/gui/GUIElement.js';
10
- import ViewportPosition from '../ecs/gui/position/ViewportPosition.js';
11
-
12
- import Entity from '../ecs/Entity.js';
7
+ import { noop } from "../../core/function/noop.js";
8
+ import ObservedString from "../../core/model/ObservedString.js";
9
+ import { SimpleLifecycle, SimpleLifecycleStateType } from "../../core/process/SimpleLifecycle.js";
13
10
 
14
11
  import ConfirmationDialogView from '../../view/elements/ConfirmationDialogView.js';
12
+ import EmptyView from "../../view/elements/EmptyView.js";
15
13
  import SimpleWindowView from '../../view/elements/SimpleWindow.js';
14
+ import { DomTooltipManager } from "../../view/tooltip/DomTooltipManager.js";
15
+ import { GMLEngine } from "../../view/tooltip/gml/GMLEngine.js";
16
+ import { TooltipManager } from "../../view/tooltip/TooltipManager.js";
16
17
 
17
18
  import View from '../../view/View.js';
18
- import TransitionFunctions from "../animation/TransitionFunctions.js";
19
19
  import AnimationTrack from "../animation/keyed2/AnimationTrack.js";
20
20
  import AnimationTrackPlayback from "../animation/keyed2/AnimationTrackPlayback.js";
21
- import {TooltipManager} from "../../view/tooltip/TooltipManager.js";
22
- import {DomTooltipManager} from "../../view/tooltip/DomTooltipManager.js";
21
+ import { playTrackRealTime } from "../animation/playTrackRealTime.js";
22
+ import TransitionFunctions from "../animation/TransitionFunctions.js";
23
+ import { SerializationMetadata } from "../ecs/components/SerializationMetadata.js";
24
+
25
+ import Entity from '../ecs/Entity.js';
26
+
27
+ import GUIElement from '../ecs/gui/GUIElement.js';
28
+ import ViewportPosition from '../ecs/gui/position/ViewportPosition.js';
23
29
  import Ticker from "../simulation/Ticker.js";
24
- import {SimpleLifecycle, SimpleLifecycleStateType} from "../../core/process/SimpleLifecycle.js";
25
- import EmptyView from "../../view/elements/EmptyView.js";
26
- import {GMLEngine} from "../../view/tooltip/gml/GMLEngine.js";
27
- import ObservedString from "../../core/model/ObservedString.js";
28
- import {CursorType} from "./cursor/CursorType.js";
29
- import {noop} from "../../core/function/Functions.js";
30
- import {SerializationMetadata} from "../ecs/components/SerializationMetadata.js";
31
- import {SceneGUIContext} from "./scene/SceneGUIContext.js";
30
+ import { CursorType } from "./cursor/CursorType.js";
31
+ import { SceneGUIContext } from "./scene/SceneGUIContext.js";
32
32
 
33
33
 
34
34
  class GUIEngine {
@@ -1,9 +1,9 @@
1
+ import { assert } from "../../../core/assert.js";
2
+ import Signal from "../../../core/events/signal/Signal.js";
3
+ import { noop } from "../../../core/function/noop.js";
1
4
  import { max2 } from "../../../core/math/max2.js";
2
5
  import { min2 } from "../../../core/math/min2.js";
3
6
  import AnimationTrackPlayback from "../../animation/keyed2/AnimationTrackPlayback.js";
4
- import { noop } from "../../../core/function/Functions.js";
5
- import Signal from "../../../core/events/signal/Signal.js";
6
- import { assert } from "../../../core/assert.js";
7
7
 
8
8
  /**
9
9
  * @template T
@@ -1,11 +1,11 @@
1
- import NotificationLog from "../../notify/NotificationLog.js";
2
1
  import { assert } from "../../../core/assert.js";
3
- import { noop } from "../../../core/function/Functions.js";
4
2
  import List from "../../../core/collection/list/List.js";
5
- import Entity from "../../ecs/Entity.js";
6
- import GUIElement from "../../ecs/gui/GUIElement.js";
3
+ import { noop } from "../../../core/function/noop.js";
7
4
  import { SerializationMetadata } from "../../ecs/components/SerializationMetadata.js";
5
+ import Entity from "../../ecs/Entity.js";
8
6
  import { EventType } from "../../ecs/EntityManager.js";
7
+ import GUIElement from "../../ecs/gui/GUIElement.js";
8
+ import NotificationLog from "../../notify/NotificationLog.js";
9
9
 
10
10
 
11
11
  class LogDisplay {
@@ -1,20 +1,20 @@
1
- import { min2 } from "../../../../core/math/min2.js";
2
- import { GridTaskGenerator } from "../../GridTaskGenerator.js";
1
+ import { matcher_tag_unoccupied } from "../../../../../samples/generation/rules/matcher_tag_unoccupied.js";
2
+ import { assert } from "../../../../core/assert.js";
3
3
  import { BitSet } from "../../../../core/binary/BitSet.js";
4
- import Task from "../../../../core/process/task/Task.js";
5
- import { TaskSignal } from "../../../../core/process/task/TaskSignal.js";
6
- import Vector2 from "../../../../core/geom/Vector2.js";
7
4
  import BinaryHeap from "../../../../core/collection/heap/FastBinaryHeap.js";
8
- import { passThrough } from "../../../../core/function/Functions.js";
5
+ import { passThrough } from "../../../../core/function/passThrough.js";
6
+ import Vector2 from "../../../../core/geom/Vector2.js";
7
+ import { min2 } from "../../../../core/math/min2.js";
8
+ import Task from "../../../../core/process/task/Task.js";
9
9
  import TaskGroup from "../../../../core/process/task/TaskGroup.js";
10
+ import { TaskSignal } from "../../../../core/process/task/TaskSignal.js";
11
+ import { actionTask } from "../../../../core/process/task/util/actionTask.js";
10
12
  import { Sampler2D } from "../../../../engine/graphics/texture/sampler/Sampler2D.js";
11
13
  import { bitSet2Sampler2D } from "../../../../engine/graphics/texture/sampler/util/bitSet2Sampler2D.js";
12
14
  import { drawSamplerHTML } from "../../../../engine/graphics/texture/sampler/util/drawSamplerHTML.js";
13
- import { matcher_tag_unoccupied } from "../../../../../samples/generation/rules/matcher_tag_unoccupied.js";
15
+ import { GridTaskGenerator } from "../../GridTaskGenerator.js";
14
16
  import { buildDistanceMapToObjective } from "../util/buildDistanceMapToObjective.js";
15
17
  import { buildPathFromDistanceMap } from "../util/buildPathFromDistanceMap.js";
16
- import { assert } from "../../../../core/assert.js";
17
- import { actionTask } from "../../../../core/process/task/util/actionTask.js";
18
18
 
19
19
  const ESTIMATED_TILES_PER_ROOM = 900;
20
20
 
@@ -1,4 +1,4 @@
1
- import { returnZero } from "../../../../core/function/Functions.js";
1
+ import { returnZero } from "../../../../core/function/returnZero.js";
2
2
 
3
3
  /**
4
4
  *
@@ -1,5 +1,5 @@
1
+ import { returnTrue } from "../../../../core/function/returnTrue.js";
1
2
  import { GridCellAction } from "../../../placement/action/GridCellAction.js";
2
- import { returnTrue } from "../../../../core/function/Functions.js";
3
3
 
4
4
  export class GridCellActionDebugBreak extends GridCellAction {
5
5
 
@@ -2,21 +2,21 @@
2
2
  * Created by Alex on 26/05/2016.
3
3
  * @copyright Alex Goldring 2016
4
4
  */
5
- import View from "../View.js";
6
- import ObservedValue from "../../core/model/ObservedValue.js";
5
+ import { assert } from "../../core/assert.js";
6
+ import { isTypedArray } from "../../core/collection/array/typed/isTypedArray.js";
7
+ import { noop } from "../../core/function/noop.js";
7
8
  import Vector1 from "../../core/geom/Vector1.js";
8
- import LinearValue from "../../core/model/LinearValue.js";
9
- import ObservedString from "../../core/model/ObservedString.js";
10
9
  import BoundedValue from "../../core/model/BoundedValue.js";
10
+ import LinearValue from "../../core/model/LinearValue.js";
11
11
  import ObservedBoolean from "../../core/model/ObservedBoolean.js";
12
+ import ObservedInteger from "../../core/model/ObservedInteger.js";
13
+ import ObservedString from "../../core/model/ObservedString.js";
14
+ import ObservedValue from "../../core/model/ObservedValue.js";
12
15
  import Stat from "../../core/model/stat/Stat.js";
16
+ import { number_pretty_print } from "../../core/primitives/numbers/number_pretty_print.js";
13
17
  import { isInstanceOf, isTypeOf, or } from "../../core/process/matcher/Matchers.js";
14
18
  import { frameThrottle } from "../../engine/graphics/FrameThrottle.js";
15
- import { assert } from "../../core/assert.js";
16
- import ObservedInteger from "../../core/model/ObservedInteger.js";
17
- import { noop } from "../../core/function/Functions.js";
18
- import { isTypedArray } from "../../core/collection/array/typed/isTypedArray.js";
19
- import { number_pretty_print } from "../../core/primitives/numbers/number_pretty_print.js";
19
+ import View from "../View.js";
20
20
 
21
21
 
22
22
  /**
@@ -4,11 +4,12 @@
4
4
  */
5
5
 
6
6
 
7
- import View from "../View.js";
8
7
  import { assert } from "../../core/assert.js";
9
- import { noop, returnTrue } from "../../core/function/Functions.js";
10
8
  import { Cache } from "../../core/cache/Cache.js";
11
9
  import List from "../../core/collection/list/List.js";
10
+ import { noop } from "../../core/function/noop.js";
11
+ import { returnTrue } from "../../core/function/returnTrue.js";
12
+ import View from "../View.js";
12
13
 
13
14
  /**
14
15
  * @template T
@@ -1,14 +1,15 @@
1
1
  /**
2
2
  * Created by Alex on 15/01/2017.
3
3
  */
4
- import { max2 } from "../../core/math/max2.js";
5
- import View from '../View.js';
6
- import dom from '../DOM.js';
4
+ import { Cache } from "../../core/cache/Cache.js";
7
5
  import List from '../../core/collection/list/List.js';
8
- import { frameThrottle } from '../../engine/graphics/FrameThrottle.js';
9
6
  import Signal from "../../core/events/signal/Signal.js";
10
- import { Cache } from "../../core/cache/Cache.js";
11
- import { passThrough, strictEquals } from "../../core/function/Functions.js";
7
+ import { passThrough } from "../../core/function/passThrough.js";
8
+ import { strictEquals } from "../../core/function/strictEquals.js";
9
+ import { max2 } from "../../core/math/max2.js";
10
+ import { frameThrottle } from '../../engine/graphics/FrameThrottle.js';
11
+ import dom from '../DOM.js';
12
+ import View from '../View.js';
12
13
 
13
14
  export const AlignmentOption = {
14
15
  Start: 'start',
@@ -1,8 +1,8 @@
1
- import { returnTrue } from "../../../core/function/Functions.js";
2
1
  import Signal from "../../../core/events/signal/Signal.js";
2
+ import { SignalBinding } from "../../../core/events/signal/SignalBinding.js";
3
+ import { returnTrue } from "../../../core/function/returnTrue.js";
3
4
  import { DragEvents } from "../../../engine/input/devices/events/DragEvents.js";
4
5
  import { DraggableElementFlags } from "./Draggable.js";
5
- import { SignalBinding } from "../../../core/events/signal/SignalBinding.js";
6
6
 
7
7
  /**
8
8
  *
@@ -3,9 +3,9 @@
3
3
  */
4
4
 
5
5
 
6
- import View from '../View.js';
7
- import { passThrough } from "../../core/function/Functions.js";
6
+ import { passThrough } from "../../core/function/passThrough.js";
8
7
  import UUID from "../../core/UUID.js";
8
+ import View from '../View.js';
9
9
 
10
10
  /**
11
11
  * @template T
@@ -2,12 +2,12 @@
2
2
  * Created by Alex on 27/02/2017.
3
3
  */
4
4
 
5
- import View from "../../View.js";
6
- import { noop } from "../../../core/function/Functions.js";
7
- import { HTMLElementCacheKey } from "../../common/HTMLElementCacheKey.js";
8
5
  import { KeyValuePair } from "../../../core/collection/KeyValuePair.js";
9
- import { ObjectPoolFactory } from "../../../core/model/object/ObjectPoolFactory.js";
6
+ import { noop } from "../../../core/function/noop.js";
10
7
  import { ImmutableObjectPool } from "../../../core/model/object/ImmutableObjectPool.js";
8
+ import { ObjectPoolFactory } from "../../../core/model/object/ObjectPoolFactory.js";
9
+ import { HTMLElementCacheKey } from "../../common/HTMLElementCacheKey.js";
10
+ import View from "../../View.js";
11
11
 
12
12
  /**
13
13
  *
@@ -1,10 +1,10 @@
1
- import View from "../../View.js";
2
- import dom from "../../DOM.js";
1
+ import { passThrough } from "../../../core/function/passThrough.js";
2
+ import { clamp01 } from "../../../core/math/clamp01.js";
3
3
 
4
4
  import BoundedValue from "../../../core/model/BoundedValue.js";
5
5
  import { frameThrottle } from "../../../engine/graphics/FrameThrottle.js";
6
- import { passThrough } from "../../../core/function/Functions.js";
7
- import { clamp01 } from "../../../core/math/clamp01.js";
6
+ import dom from "../../DOM.js";
7
+ import View from "../../View.js";
8
8
 
9
9
  function makeTextPercentage(value, max, process) {
10
10
  const r = (value / max) * 100;
@@ -1,5 +1,5 @@
1
- import { noop } from "../../../core/function/Functions.js";
2
1
  import { assert } from "../../../core/assert.js";
2
+ import { noop } from "../../../core/function/noop.js";
3
3
 
4
4
  export class RadialMenuElementDefinition {
5
5
  constructor() {
@@ -3,18 +3,18 @@
3
3
  */
4
4
 
5
5
 
6
- import TileView from './Tile.js';
7
-
8
- import View from "../../View.js";
9
- import dom from "../../DOM.js";
6
+ import { assert } from "../../../core/assert.js";
7
+ import Signal from "../../../core/events/signal/Signal.js";
8
+ import { noop } from "../../../core/function/noop.js";
10
9
 
11
10
  import Vector2 from "../../../core/geom/Vector2.js";
12
- import Signal from "../../../core/events/signal/Signal.js";
11
+ import { computeTileGridMove } from "../../../engine/ui/tiles2d/computeTileGridMove.js";
13
12
 
14
13
  import { DragAndDropContext } from '../../common/dnd/DragAndDropContext.js';
15
- import { computeTileGridMove } from "../../../engine/ui/tiles2d/computeTileGridMove.js";
16
- import { assert } from "../../../core/assert.js";
17
- import { noop } from "../../../core/function/Functions.js";
14
+ import dom from "../../DOM.js";
15
+
16
+ import View from "../../View.js";
17
+ import TileView from './Tile.js';
18
18
 
19
19
  const slotElementPrototype = dom('div').addClass('marker').el;
20
20
 
@@ -1,11 +1,11 @@
1
- import { HTMLElementCacheKey } from "../../common/HTMLElementCacheKey.js";
2
- import { KeyValuePair } from "../../../core/collection/KeyValuePair.js";
3
1
  import { Cache } from "../../../core/cache/Cache.js";
4
- import { noop } from "../../../core/function/Functions.js";
5
- import View from "../../View.js";
6
- import { ObjectPoolFactory } from "../../../core/model/object/ObjectPoolFactory.js";
2
+ import { KeyValuePair } from "../../../core/collection/KeyValuePair.js";
3
+ import { noop } from "../../../core/function/noop.js";
7
4
  import { invokeObjectEquals } from "../../../core/model/object/invokeObjectEquals.js";
8
5
  import { invokeObjectHash } from "../../../core/model/object/invokeObjectHash.js";
6
+ import { ObjectPoolFactory } from "../../../core/model/object/ObjectPoolFactory.js";
7
+ import { HTMLElementCacheKey } from "../../common/HTMLElementCacheKey.js";
8
+ import View from "../../View.js";
9
9
 
10
10
  /**
11
11
  *
@@ -1,5 +1,5 @@
1
+ import { returnZero } from "../../core/function/returnZero.js";
1
2
  import View from "../View.js";
2
- import { returnZero } from "../../core/function/Functions.js";
3
3
 
4
4
  export class FunctionGraphView extends View {
5
5
  /**
@@ -1,8 +1,9 @@
1
- import {Cache} from "../../../core/cache/Cache.js";
2
- import {strictEquals} from "../../../core/function/Functions.js";
3
- import {parseTooltipString} from "./parser/parseTooltipString.js";
4
- import {computeStringHash} from "../../../core/primitives/strings/computeStringHash.js";
5
- import {string_compute_byte_size} from "../../../core/primitives/strings/string_compute_byte_size.js";
1
+ import { Cache } from "../../../core/cache/Cache.js";
2
+
3
+ import { strictEquals } from "../../../core/function/strictEquals.js";
4
+ import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
5
+ import { string_compute_byte_size } from "../../../core/primitives/strings/string_compute_byte_size.js";
6
+ import { parseTooltipString } from "./parser/parseTooltipString.js";
6
7
 
7
8
  export class TooltipParser {
8
9
 
@@ -1,50 +0,0 @@
1
- import { AbstractAsyncMap } from "./AbstractAsyncMap.js";
2
-
3
- /**
4
- * Cache wrapper that loads data when it's not found in the cache
5
- * @deprecated prefer to use {@link LoadingCache} instead
6
- */
7
- export class AsyncLoadingCache extends AbstractAsyncMap {
8
- /**
9
- *
10
- * @param {Map} cache
11
- * @param {function(K):Promise<T>} loader
12
- */
13
- constructor(cache, loader) {
14
- super();
15
-
16
- this.__cache = cache;
17
- this.__loader = loader;
18
- this.__pending = new Map();
19
- }
20
-
21
- async get(key) {
22
-
23
- const cached = this.__cache.get(key);
24
-
25
- if (cached !== undefined) {
26
- return cached;
27
- }
28
-
29
- let promise = this.__pending.get(key);
30
- let original_loader = false;
31
-
32
- if (promise === undefined) {
33
- promise = this.__loader(key);
34
-
35
- this.__pending.set(key, promise);
36
-
37
- original_loader = true;
38
- }
39
-
40
- const value = await promise;
41
-
42
- if (original_loader) {
43
- this.__cache.set(key, value);
44
- // remove from pending
45
- this.__pending.delete(key);
46
- }
47
-
48
- return value;
49
- }
50
- }