@woosh/meep-engine 2.81.3 → 2.82.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.
- package/build/meep.cjs +4392 -4420
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +4392 -4420
- package/editor/ecs/component/editors/primitive/ArrayEditor.js +2 -2
- package/editor/enableEditor.js +1 -1
- package/editor/view/EditorView.js +25 -25
- package/editor/view/ecs/components/particles/ParticleEmitterController.js +11 -11
- package/editor/view/node-graph/NodeView.js +7 -7
- package/package.json +1 -1
- package/samples/terrain/editor.js +19 -18
- package/src/core/cache/Cache.js +4 -2
- package/src/core/cache/Cache.spec.js +1 -1
- package/src/core/collection/array/arraySetDiff.js +8 -2
- package/src/core/collection/array/computeHashArray.js +5 -0
- package/src/core/collection/array/groupArrayBy.js +1 -1
- package/src/core/collection/array/weightedRandomFromArray.spec.js +3 -1
- package/src/core/collection/heap/FastBinaryHeap.spec.js +3 -2
- package/src/core/collection/list/List.js +8 -17
- package/src/core/collection/list/List.spec.js +55 -0
- package/src/core/collection/map/HashMap.spec.js +3 -1
- package/src/core/collection/set/HashSet.spec.js +23 -0
- package/src/core/collection/table/RowFirstTableSpec.js +44 -30
- package/src/core/events/signal/signal_aggregate_by_time_window.js +1 -1
- package/src/core/fsm/simple/SimpleStateMachine.js +2 -1
- package/src/core/function/chain.js +19 -0
- package/src/core/function/makeReturnValue.js +8 -0
- package/src/core/function/noop.js +6 -0
- package/src/core/function/objectsEqual.js +14 -0
- package/src/core/function/passThrough.js +9 -0
- package/src/core/function/returnEmptyArray.js +7 -0
- package/src/core/function/returnFalse.js +7 -0
- package/src/core/function/returnOne.js +7 -0
- package/src/core/function/returnTrue.js +7 -0
- package/src/core/function/returnZero.js +7 -0
- package/src/core/function/strictEquals.js +10 -0
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +2 -2
- package/src/core/geom/3d/topology/struct/prototypeBinaryTopology.js +5 -4
- package/src/core/lang/reactive/AbstractCachingParser.js +2 -1
- package/src/core/math/random/randomFloatBetween.spec.js +2 -1
- package/src/core/math/random/randomIntegerBetween.spec.js +2 -1
- package/src/core/model/node-graph/Connection.js +2 -1
- package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +2 -2
- package/src/core/model/object/ObjectPoolFactory.js +2 -1
- package/src/core/model/stat/Stat.js +4 -4
- package/src/core/process/PromiseWatcher.spec.js +1 -1
- package/src/core/process/task/Task.js +2 -1
- package/src/engine/EngineHarness.js +2 -1
- package/src/engine/achievements/gateway/StorageAchievementGateway.js +1 -1
- package/src/engine/asset/AssetManager.js +14 -14
- package/src/engine/asset/loaders/ArrayBufferLoader.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.spec.js +2 -2
- package/src/engine/ecs/EntityManager.js +2 -1
- package/src/engine/ecs/EntityObserver.spec.js +4 -4
- package/src/engine/ecs/System.js +2 -2
- package/src/engine/ecs/dynamic_actions/DynamicActorSystem.js +2 -1
- package/src/engine/ecs/ik/IKProblem.js +1 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +2 -1
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +2 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.js +2 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +2 -1
- package/src/engine/ecs/terrain/util/obtainTerrain.js +1 -1
- package/src/engine/ecs/terrain/util/paintTerrainOverlayViaLookupTable.js +3 -3
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -1
- package/src/engine/graphics/ecs/highlight/plugin/OutlineRenderPlugin.js +7 -7
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -1
- package/src/engine/graphics/material/SplatMaterial.js +1 -15
- package/src/engine/graphics/render/layers/RenderLayer.js +1 -1
- package/src/engine/graphics/render/utils/ThreeBypassRenderer.js +2 -1
- package/src/engine/graphics/render/visibility/VisibilityFilter.js +2 -1
- package/src/engine/graphics/sh3/path_tracer/prototypePathTracer.js +2 -1
- package/src/engine/graphics/texture/atlas/ManagedTextureAtlas.js +5 -5
- package/src/engine/graphics/texture/cubemap/load_environment_map.js +2 -2
- package/src/engine/graphics/texture/makeOnePixelTexture.js +5 -3
- package/src/engine/graphics/texture/virtual/VirtualTexturePage.js +2 -1
- package/src/engine/graphics/texture/whitePixelTexture.js +9 -0
- package/src/engine/intelligence/behavior/ecs/BehaviorSystem.spec.js +5 -5
- package/src/engine/intelligence/blackboard/BlackboardDynamicStorageAdapter.js +3 -3
- package/src/engine/intelligence/mcts/MonteCarlo.js +3 -3
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +3 -3
- package/src/engine/network/PriorityFetch.js +2 -2
- package/src/engine/options/Option.js +2 -2
- package/src/engine/options/Option.spec.js +1 -1
- package/src/engine/options/OptionGroup.js +2 -2
- package/src/engine/options/OptionGroup.spec.js +2 -2
- package/src/engine/save/Storage.js +2 -1
- package/src/engine/save/StorageBackedList.js +2 -1
- package/src/engine/save/storage/InMemoryStorage.js +2 -2
- package/src/engine/scene/transitionToScene.js +2 -1
- package/src/engine/sound/ecs/SoundListenerSystem.js +7 -7
- package/src/engine/sound/ecs/emitter/loadSoundTrackAsset.js +3 -3
- package/src/engine/ui/DraggableAspect.js +2 -2
- package/src/engine/ui/GUIEngine.js +17 -17
- package/src/engine/ui/notification/AnimatedObjectEmitter.js +3 -3
- package/src/engine/ui/notification/NotificationManager.js +4 -4
- package/src/generation/grid/generation/discrete/GridTaskConnectRooms.js +9 -9
- package/src/generation/grid/generation/util/buildPathFromDistanceMap.js +1 -1
- package/src/generation/markers/actions/util/GridCellActionDebugBreak.js +1 -1
- package/src/view/common/LabelView.js +9 -9
- package/src/view/common/ListView.js +3 -2
- package/src/view/common/VirtualListView.js +7 -6
- package/src/view/common/dnd/DropTarget.js +2 -2
- package/src/view/elements/DropDownSelectionView.js +2 -2
- package/src/view/elements/image/ImageView.js +4 -4
- package/src/view/elements/progress/SmoothProgressBar.js +4 -4
- package/src/view/elements/radial/RadialMenuElementDefinition.js +1 -1
- package/src/view/elements/tiles2d/TileGrid.js +8 -8
- package/src/view/elements/video/VideoView.js +5 -5
- package/src/view/math/FunctionGraphView.js +1 -1
- package/src/view/tooltip/gml/TooltipParser.js +6 -5
- package/src/core/function/Functions.js +0 -103
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param {Object} a
|
|
4
|
+
* @param {Object} b
|
|
5
|
+
* @returns {boolean}
|
|
6
|
+
*/
|
|
7
|
+
export function objectsEqual(a, b) {
|
|
8
|
+
return a === b
|
|
9
|
+
|| (
|
|
10
|
+
typeof a === "object" //guard against null and undefined values
|
|
11
|
+
&& typeof a.equals === "function" // check for equals method
|
|
12
|
+
&& a.equals(b)
|
|
13
|
+
);
|
|
14
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { noop } from "../../../function/Functions.js";
|
|
1
|
+
import { noop } from "../../../function/noop.js";
|
|
3
2
|
import { INVALID_NEIGHBOUR } from "./TetrahedralMesh.js";
|
|
3
|
+
import { tetrahedron_compute_signed_volume } from "./tetrahedron_compute_signed_volume.js";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
*
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { PLYLoader } from "three/examples/jsm/loaders/PLYLoader.js";
|
|
2
|
-
import { noop } from "../../../../function/Functions.js";
|
|
3
|
-
import { bt_index_geometry_to_topology } from "./binary/io/bt_index_geometry_to_topology.js";
|
|
4
|
-
import { BinaryTopology } from "./binary/BinaryTopology.js";
|
|
5
2
|
import {
|
|
6
3
|
compute_buffer_geometry_byte_size
|
|
7
4
|
} from "../../../../../engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.js";
|
|
8
|
-
|
|
5
|
+
|
|
6
|
+
import { noop } from "../../../../function/noop.js";
|
|
9
7
|
import { number_pretty_print } from "../../../../primitives/numbers/number_pretty_print.js";
|
|
8
|
+
import { BinaryTopology } from "./binary/BinaryTopology.js";
|
|
9
|
+
import { bt_index_geometry_to_topology } from "./binary/io/bt_index_geometry_to_topology.js";
|
|
10
|
+
import { TopoMesh } from "./TopoMesh.js";
|
|
10
11
|
|
|
11
12
|
function promise_ply(url) {
|
|
12
13
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../assert.js";
|
|
2
2
|
import { Cache } from "../../cache/Cache.js";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { noop } from "../../function/noop.js";
|
|
4
5
|
import { computeStringHash } from "../../primitives/strings/computeStringHash.js";
|
|
5
6
|
|
|
6
7
|
export class AbstractCachingParser {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { returnOne
|
|
1
|
+
import { returnOne } from "../../function/returnOne.js";
|
|
2
|
+
import { returnZero } from "../../function/returnZero.js";
|
|
2
3
|
import { randomFloatBetween } from "./randomFloatBetween.js";
|
|
3
4
|
|
|
4
5
|
test("limits", () => {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { returnOne } from "../../function/returnOne.js";
|
|
2
|
+
import { returnZero } from "../../function/returnZero.js";
|
|
1
3
|
import { randomIntegerBetween } from "./randomIntegerBetween.js";
|
|
2
|
-
import { returnOne, returnZero } from "../../function/Functions.js";
|
|
3
4
|
|
|
4
5
|
test("limits", () => {
|
|
5
6
|
expect(randomIntegerBetween(returnZero, -3, 7)).toEqual(-3);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { assert } from "../../assert.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { noop } from "../../function/noop.js";
|
|
3
4
|
import { objectKeyByValue } from "../object/objectKeyByValue.js";
|
|
4
5
|
import { PortDirection } from "./node/PortDirection.js";
|
|
5
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {noop} from "../../../../function/
|
|
2
|
-
import {NodeParameterDataType} from "./NodeParameterDataType.js";
|
|
1
|
+
import { noop } from "../../../../function/noop.js";
|
|
2
|
+
import { NodeParameterDataType } from "./NodeParameterDataType.js";
|
|
3
3
|
|
|
4
4
|
export class NodeParameterDescription {
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { assert } from "../../assert.js";
|
|
2
2
|
import List from "../../collection/list/List.js";
|
|
3
|
-
import {
|
|
3
|
+
import { chain } from "../../function/chain.js";
|
|
4
4
|
import Vector1 from "../../geom/Vector1.js";
|
|
5
|
+
import { EPSILON } from "../../math/EPSILON.js";
|
|
6
|
+
import { epsilonEquals } from "../../math/epsilonEquals.js";
|
|
5
7
|
import { max2 } from "../../math/max2.js";
|
|
6
8
|
import LinearModifier from "./LinearModifier.js";
|
|
7
|
-
import { epsilonEquals } from "../../math/epsilonEquals.js";
|
|
8
|
-
import { EPSILON } from "../../math/EPSILON.js";
|
|
9
9
|
|
|
10
10
|
class Stat extends Number {
|
|
11
11
|
/**
|
|
@@ -296,7 +296,7 @@ Stat.Process = {
|
|
|
296
296
|
return max2(value, v);
|
|
297
297
|
}
|
|
298
298
|
},
|
|
299
|
-
chain:
|
|
299
|
+
chain: chain
|
|
300
300
|
};
|
|
301
301
|
|
|
302
302
|
/**
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
import { assert } from "../../assert.js";
|
|
7
7
|
import { array_push_if_unique } from "../../collection/array/array_push_if_unique.js";
|
|
8
8
|
import Signal from "../../events/signal/Signal.js";
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
import { noop } from "../../function/noop.js";
|
|
10
11
|
import ObservedInteger from "../../model/ObservedInteger.js";
|
|
11
12
|
import { TaskSignal } from "./TaskSignal.js";
|
|
12
13
|
import TaskState from "./TaskState.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import Stats from "three/examples/jsm/libs/stats.module.js";
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
import { noop } from "../core/function/noop.js";
|
|
3
4
|
import Vector2 from "../core/geom/Vector2.js";
|
|
4
5
|
import Vector3 from "../core/geom/Vector3.js";
|
|
5
6
|
import EmptyView from "../view/elements/EmptyView.js";
|
|
@@ -3,26 +3,26 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import { ObservedMap } from "../../core/collection/map/ObservedMap.js";
|
|
7
|
-
import { HashMap } from "../../core/collection/map/HashMap.js";
|
|
8
|
-
import { extractAssetListFromManager } from "./preloader/extractAssetListFromManager.js";
|
|
9
6
|
import { assert } from "../../core/assert.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
7
|
+
import { array_push_if_unique } from "../../core/collection/array/array_push_if_unique.js";
|
|
8
|
+
import { array_remove_first } from "../../core/collection/array/array_remove_first.js";
|
|
9
|
+
import FastBinaryHeap from "../../core/collection/heap/FastBinaryHeap.js";
|
|
10
|
+
import { HashMap } from "../../core/collection/map/HashMap.js";
|
|
11
|
+
import { ObservedMap } from "../../core/collection/map/ObservedMap.js";
|
|
14
12
|
import { Deque } from "../../core/collection/queue/Deque.js";
|
|
13
|
+
import { HashSet } from "../../core/collection/set/HashSet.js";
|
|
14
|
+
import { noop } from "../../core/function/noop.js";
|
|
15
|
+
import ConcurrentExecutor from "../../core/process/executor/ConcurrentExecutor.js";
|
|
15
16
|
import Task from "../../core/process/task/Task.js";
|
|
16
17
|
import { TaskSignal } from "../../core/process/task/TaskSignal.js";
|
|
17
|
-
import {
|
|
18
|
-
import FastBinaryHeap from "../../core/collection/heap/FastBinaryHeap.js";
|
|
18
|
+
import { AssetDescription } from "./AssetDescription.js";
|
|
19
19
|
import { AssetLoadState } from "./AssetLoadState.js";
|
|
20
|
-
import {
|
|
21
|
-
import ConcurrentExecutor from "../../core/process/executor/ConcurrentExecutor.js";
|
|
22
|
-
import { AssetLoader } from "./loaders/AssetLoader.js";
|
|
23
|
-
import { array_push_if_unique } from "../../core/collection/array/array_push_if_unique.js";
|
|
20
|
+
import { AssetRequest, AssetRequestFlags } from "./AssetRequest.js";
|
|
24
21
|
import { AssetRequestScope } from "./AssetRequestScope.js";
|
|
25
|
-
import {
|
|
22
|
+
import { CrossOriginConfig } from "./CORS/CrossOriginConfig.js";
|
|
23
|
+
import { AssetLoader } from "./loaders/AssetLoader.js";
|
|
24
|
+
import { PendingAsset } from "./PendingAsset.js";
|
|
25
|
+
import { extractAssetListFromManager } from "./preloader/extractAssetListFromManager.js";
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
class Response {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { noop } from "../../../core/function/
|
|
1
|
+
import { noop } from "../../../core/function/noop.js";
|
|
2
2
|
import { Asset } from "../Asset.js";
|
|
3
3
|
import { CrossOriginConfig } from "../CORS/CrossOriginConfig.js";
|
|
4
4
|
import { CrossOriginKind } from "../CORS/CrossOriginKind.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jest } from '@jest/globals';
|
|
2
|
+
import { noop } from "../../core/function/noop.js";
|
|
1
3
|
import { EntityComponentDataset } from "./EntityComponentDataset.js";
|
|
2
4
|
import { EventType } from "./EntityManager.js";
|
|
3
5
|
import { EntityObserver } from "./EntityObserver.js";
|
|
4
|
-
import { noop } from "../../core/function/Functions.js";
|
|
5
|
-
import { jest } from '@jest/globals';
|
|
6
6
|
|
|
7
7
|
class DummyComponentA {
|
|
8
8
|
}
|
|
@@ -6,7 +6,8 @@ import { assert } from "../../core/assert.js";
|
|
|
6
6
|
import { array_copy_unique } from "../../core/collection/array/array_copy_unique.js";
|
|
7
7
|
import Signal from "../../core/events/signal/Signal.js";
|
|
8
8
|
import { IllegalStateException } from "../../core/fsm/exceptions/IllegalStateException.js";
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
import { noop } from "../../core/function/noop.js";
|
|
10
11
|
import { ResourceAccessKind } from "../../core/model/ResourceAccessKind.js";
|
|
11
12
|
import { EntityObserver } from "./EntityObserver.js";
|
|
12
13
|
import { computeSystemName, System, SystemState } from "./System.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jest } from '@jest/globals';
|
|
2
|
+
import { noop } from "../../core/function/noop.js";
|
|
3
3
|
import GridPosition from "../grid/position/GridPosition.js";
|
|
4
4
|
import Entity from "./Entity.js";
|
|
5
5
|
import { EntityComponentDataset } from "./EntityComponentDataset.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { EntityObserver } from "./EntityObserver.js";
|
|
7
|
+
import { Transform } from "./transform/Transform.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
package/src/engine/ecs/System.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
import { array_copy_unique } from "../../core/collection/array/array_copy_unique.js";
|
|
7
|
-
import ObservedValue from "../../core/model/ObservedValue.js";
|
|
8
|
-
import { noop } from "../../core/function/Functions.js";
|
|
9
7
|
import { array_push_if_unique } from "../../core/collection/array/array_push_if_unique.js";
|
|
8
|
+
import { noop } from "../../core/function/noop.js";
|
|
9
|
+
import ObservedValue from "../../core/model/ObservedValue.js";
|
|
10
10
|
import { ResourceAccessKind } from "../../core/model/ResourceAccessKind.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -3,7 +3,8 @@ import { OverrideContextBehavior } from "../../../../../model/game/util/behavior
|
|
|
3
3
|
import { assert } from "../../../core/assert.js";
|
|
4
4
|
import { randomMultipleFromArray } from "../../../core/collection/array/randomMultipleFromArray.js";
|
|
5
5
|
import { HashMap } from "../../../core/collection/map/HashMap.js";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { returnTrue } from "../../../core/function/returnTrue.js";
|
|
7
8
|
import { randomFloatBetween } from "../../../core/math/random/randomFloatBetween.js";
|
|
8
9
|
import { randomFromArray } from "../../../core/math/random/randomFromArray.js";
|
|
9
10
|
import { ResourceAccessKind } from "../../../core/model/ResourceAccessKind.js";
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { assert } from "../../../../../core/assert.js";
|
|
2
2
|
import { BinaryBuffer } from "../../../../../core/binary/BinaryBuffer.js";
|
|
3
3
|
import { IllegalStateException } from "../../../../../core/fsm/exceptions/IllegalStateException.js";
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
import { returnEmptyArray } from "../../../../../core/function/returnEmptyArray.js";
|
|
5
6
|
import { objectKeyByValue } from "../../../../../core/model/object/objectKeyByValue.js";
|
|
6
7
|
import { executeBinaryClassUpgraderChain } from "../executeBinaryClassUpgraderChain.js";
|
|
7
8
|
import { BinaryCollectionHeaderCodec, BinaryCollectionHeaderLayout } from "./BinaryCollectionHeaderCodec.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { assert } from "../../../../../core/assert.js";
|
|
2
2
|
import { HashMap } from "../../../../../core/collection/map/HashMap.js";
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { returnEmptyArray } from "../../../../../core/function/returnEmptyArray.js";
|
|
4
5
|
import { BinaryCollectionHeaderCodec, BinaryCollectionHeaderLayout } from "./BinaryCollectionHeaderCodec.js";
|
|
5
6
|
|
|
6
7
|
export class BinaryCollectionSerializer {
|
|
@@ -3,7 +3,8 @@ import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
|
|
|
3
3
|
import {
|
|
4
4
|
bvh_query_user_data_overlaps_frustum
|
|
5
5
|
} from "../../../../core/bvh2/bvh3/query/bvh_query_user_data_overlaps_frustum.js";
|
|
6
|
-
|
|
6
|
+
|
|
7
|
+
import { noop } from "../../../../core/function/noop.js";
|
|
7
8
|
import { read_three_planes_to_array } from "../../../../core/geom/3d/frustum/read_three_planes_to_array.js";
|
|
8
9
|
import { MATRIX_4_IDENTITY } from "../../../../core/geom/3d/mat4/MATRIX_4_IDENTITY.js";
|
|
9
10
|
import { ImageRGBADataLoader } from "../../../asset/loaders/image/ImageRGBADataLoader.js";
|
|
@@ -11,7 +11,8 @@ import { bvh_query_leaves_ray } from "../../../../core/bvh2/bvh3/query/bvh_query
|
|
|
11
11
|
import { isArrayEqualStrict } from "../../../../core/collection/array/isArrayEqualStrict.js";
|
|
12
12
|
import { Color } from "../../../../core/color/Color.js";
|
|
13
13
|
import Signal from '../../../../core/events/signal/Signal.js';
|
|
14
|
-
|
|
14
|
+
|
|
15
|
+
import { noop } from "../../../../core/function/noop.js";
|
|
15
16
|
import { aabb2_overlap_exists } from "../../../../core/geom/2d/aabb/aabb2_overlap_exists.js";
|
|
16
17
|
import { SurfacePoint3 } from "../../../../core/geom/3d/SurfacePoint3.js";
|
|
17
18
|
import Vector2 from '../../../../core/geom/Vector2.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ParameterLookupTable } from "../../../graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
|
|
3
|
-
import { passThrough } from "../../../../core/function/Functions.js";
|
|
1
|
+
import { passThrough } from "../../../../core/function/passThrough.js";
|
|
4
2
|
import { clamp01 } from "../../../../core/math/clamp01.js";
|
|
3
|
+
import { ParameterLookupTable } from "../../../graphics/particles/particular/engine/parameter/ParameterLookupTable.js";
|
|
5
4
|
import { sampler2d_scale } from "../../../graphics/texture/sampler/resize/sampler2d_scale.js";
|
|
5
|
+
import { Sampler2D } from "../../../graphics/texture/sampler/Sampler2D.js";
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
const heatmap_lut = new ParameterLookupTable(4);
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
bvh_query_user_data_overlaps_frustum
|
|
8
8
|
} from "../../../../../core/bvh2/bvh3/query/bvh_query_user_data_overlaps_frustum.js";
|
|
9
9
|
import { AsyncLoadingCache } from "../../../../../core/collection/map/AsyncLoadingCache.js";
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
import { returnTrue } from "../../../../../core/function/returnTrue.js";
|
|
11
12
|
import { aabb3_matrix4_project } from "../../../../../core/geom/3d/aabb/aabb3_matrix4_project.js";
|
|
12
13
|
import { aabb3_raycast } from "../../../../../core/geom/3d/aabb/aabb3_raycast.js";
|
|
13
14
|
import {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
+
import { Scene as ThreeScene } from "three";
|
|
2
|
+
import { noop } from "../../../../../core/function/noop.js";
|
|
1
3
|
import { max2 } from "../../../../../core/math/max2.js";
|
|
4
|
+
import { ObjectPoolFactory } from "../../../../../core/model/object/ObjectPoolFactory.js";
|
|
5
|
+
import { ProcessState } from "../../../../../core/process/ProcessState.js";
|
|
2
6
|
import { EnginePlugin } from "../../../../plugin/EnginePlugin.js";
|
|
3
|
-
import {
|
|
4
|
-
import { Scene as ThreeScene } from "three";
|
|
7
|
+
import { CompositingStages } from "../../../composit/CompositingStages.js";
|
|
5
8
|
import { BlendingType } from "../../../texture/sampler/BlendingType.js";
|
|
6
|
-
import { HighlightRenderGroup } from "../renderer/HighlightRenderGroup.js";
|
|
7
|
-
import { ObjectPoolFactory } from "../../../../../core/model/object/ObjectPoolFactory.js";
|
|
8
9
|
import { HighlightRenderElement } from "../renderer/HighlightRenderElement.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { ProcessState } from "../../../../../core/process/ProcessState.js";
|
|
10
|
+
import { HighlightRenderGroup } from "../renderer/HighlightRenderGroup.js";
|
|
11
|
+
import { OutlineRenderer } from "../renderer/OutlineRenderer.js";
|
|
12
12
|
|
|
13
13
|
export class OutlineRenderPlugin extends EnginePlugin {
|
|
14
14
|
constructor() {
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
bvh_query_user_data_overlaps_frustum
|
|
7
7
|
} from "../../../../core/bvh2/bvh3/query/bvh_query_user_data_overlaps_frustum.js";
|
|
8
8
|
import { BVHQueryIntersectsRay } from "../../../../core/bvh2/bvh3/query/BVHQueryIntersectsRay.js";
|
|
9
|
-
|
|
9
|
+
|
|
10
|
+
import { returnTrue } from "../../../../core/function/returnTrue.js";
|
|
10
11
|
import { ray3_array_compose } from "../../../../core/geom/3d/ray/ray3_array_compose.js";
|
|
11
12
|
import { SurfacePoint3 } from "../../../../core/geom/3d/SurfacePoint3.js";
|
|
12
13
|
import { v3_distance_sqr } from "../../../../core/geom/vec3/v3_distance_sqr.js";
|
|
@@ -15,21 +15,7 @@ import {
|
|
|
15
15
|
Vector4 as ThreeVector4
|
|
16
16
|
} from 'three';
|
|
17
17
|
import TerrainShader from "../shaders/TerrainShader.js";
|
|
18
|
-
import {
|
|
19
|
-
import sampler2D2Texture from "../texture/sampler/Sampler2D2Texture.js";
|
|
20
|
-
|
|
21
|
-
export function whitePixelTexture() {
|
|
22
|
-
const sampler = Sampler2D.uint8(4, 1, 1);
|
|
23
|
-
|
|
24
|
-
for (let i = 0; i < sampler.data.length; i++) {
|
|
25
|
-
|
|
26
|
-
sampler.data[i] = 255;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
const dataTexture = sampler2D2Texture(sampler);
|
|
30
|
-
|
|
31
|
-
return dataTexture;
|
|
32
|
-
}
|
|
18
|
+
import { whitePixelTexture } from "../texture/whitePixelTexture.js";
|
|
33
19
|
|
|
34
20
|
/**
|
|
35
21
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import { passThrough } from "../../../../core/function/
|
|
6
|
+
import { passThrough } from "../../../../core/function/passThrough.js";
|
|
7
7
|
import { compare_three_objects } from "../../three/compare_three_objects.js";
|
|
8
8
|
import { IncrementalDeltaSet } from "../visibility/IncrementalDeltaSet.js";
|
|
9
9
|
import { RenderLayerState } from "./RenderLayerState.js";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { noop, returnTrue } from "../../../../core/function/Functions.js";
|
|
2
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { noop } from "../../../../core/function/noop.js";
|
|
3
|
+
import { returnTrue } from "../../../../core/function/returnTrue.js";
|
|
3
4
|
|
|
4
5
|
export class VisibilityFilter {
|
|
5
6
|
constructor({
|
|
@@ -14,7 +14,8 @@ import '../../../../../../../../css/game.scss';
|
|
|
14
14
|
import { float2uint8 } from "../../../../core/binary/float2uint8.js";
|
|
15
15
|
import { Color } from "../../../../core/color/Color.js";
|
|
16
16
|
import { kelvin_to_rgb } from "../../../../core/color/kelvin/kelvin_to_rgb.js";
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
import { noop } from "../../../../core/function/noop.js";
|
|
18
19
|
import { ray3_array_compose } from "../../../../core/geom/3d/ray/ray3_array_compose.js";
|
|
19
20
|
import Quaternion from "../../../../core/geom/Quaternion.js";
|
|
20
21
|
import { v3_distance } from "../../../../core/geom/vec3/v3_distance.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { strictEquals } from "../../../../core/function/Functions.js";
|
|
1
|
+
import { LoadingCache } from "../../../../core/cache/LoadingCache.js";
|
|
2
|
+
import { strictEquals } from "../../../../core/function/strictEquals.js";
|
|
4
3
|
import { computeStringHash } from "../../../../core/primitives/strings/computeStringHash.js";
|
|
5
|
-
import {
|
|
4
|
+
import { GameAssetType } from "../../../asset/GameAssetType.js";
|
|
6
5
|
import { Reference } from "../../../reference/v2/Reference.js";
|
|
7
|
-
import { LoadingCache } from "../../../../core/cache/LoadingCache.js";
|
|
8
6
|
import { Sampler2D } from "../sampler/Sampler2D.js";
|
|
9
7
|
import { sampler2d_ensure_uint8_RGBA } from "../sampler/sampler2d_ensure_uint8_RGBA.js";
|
|
8
|
+
import { CachingTextureAtlas } from "./CachingTextureAtlas.js";
|
|
9
|
+
import { TextureAtlas } from "./TextureAtlas.js";
|
|
10
10
|
|
|
11
11
|
export class ManagedAtlas {
|
|
12
12
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
|
|
2
1
|
import { CubeTextureLoader, LinearFilter, PMREMGenerator, sRGBEncoding, TextureLoader, UnsignedByteType } from "three";
|
|
3
|
-
import {
|
|
2
|
+
import { EXRLoader } from "three/examples/jsm/loaders/EXRLoader.js";
|
|
4
3
|
import { HDRCubeTextureLoader } from "three/examples/jsm/loaders/HDRCubeTextureLoader.js";
|
|
4
|
+
import { noop } from "../../../../core/function/noop.js";
|
|
5
5
|
import { computeFileExtension } from "../../../../core/path/computeFileExtension.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -2,8 +2,8 @@ import { DataTexture, UnsignedByteType } from "three";
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
5
|
-
* @param {ArrayLike<number>|Uint8Array} contents
|
|
6
|
-
* @param {Signal} cleanup_signal can be called to dispose of the texture
|
|
5
|
+
* @param {ArrayLike<number>|number[]|Uint8Array} contents
|
|
6
|
+
* @param {Signal} [cleanup_signal] can be called to dispose of the texture
|
|
7
7
|
* @returns {DataTexture}
|
|
8
8
|
*/
|
|
9
9
|
export function makeOnePixelTexture(contents, cleanup_signal) {
|
|
@@ -13,7 +13,9 @@ export function makeOnePixelTexture(contents, cleanup_signal) {
|
|
|
13
13
|
t.needsUpdate = true;
|
|
14
14
|
t.type = UnsignedByteType;
|
|
15
15
|
|
|
16
|
-
cleanup_signal
|
|
16
|
+
if (cleanup_signal !== undefined) {
|
|
17
|
+
cleanup_signal.addOne(t.dispose, t);
|
|
18
|
+
}
|
|
17
19
|
|
|
18
20
|
return t;
|
|
19
21
|
}
|
|
@@ -4,7 +4,8 @@ import { BitSet } from "../../../../core/binary/BitSet.js";
|
|
|
4
4
|
import { Cache } from "../../../../core/cache/Cache.js";
|
|
5
5
|
import { array_copy } from "../../../../core/collection/array/array_copy.js";
|
|
6
6
|
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
7
|
-
import { passThrough
|
|
7
|
+
import { passThrough } from "../../../../core/function/passThrough.js";
|
|
8
|
+
import { strictEquals } from "../../../../core/function/strictEquals.js";
|
|
8
9
|
import { max2 } from "../../../../core/math/max2.js";
|
|
9
10
|
import { min2 } from "../../../../core/math/min2.js";
|
|
10
11
|
import { Sampler2D } from "../sampler/Sampler2D.js";
|