@woosh/meep-engine 2.60.0 → 2.61.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 +20211 -20240
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +20211 -20240
- package/package.json +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +30 -182
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.spec.js +27 -1
- package/src/core/geom/ConicRay.js +16 -21
- package/src/core/geom/ConicRay.spec.js +24 -0
- package/src/core/geom/packing/miniball/Miniball.js +68 -117
- package/src/core/geom/packing/miniball/Miniball.spec.js +3 -3
- package/src/core/geom/packing/miniball/Subspan.js +47 -34
- package/src/core/geom/packing/miniball/miniball_compute_quality.js +64 -0
- package/src/core/math/bessel_3.js +1 -0
- package/src/core/math/random/randomBytes.js +2 -2
- package/src/core/math/sqr.js +8 -0
- package/src/core/model/node-graph/Connection.js +21 -23
- package/src/core/model/node-graph/DataType.js +16 -17
- package/src/core/model/node-graph/NodeGraph.js +49 -50
- package/src/core/model/node-graph/node/NodeDescription.js +42 -44
- package/src/core/model/node-graph/node/NodeInstance.js +59 -60
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +27 -29
- package/src/core/model/node-graph/node/NodeRegistry.js +16 -18
- package/src/core/model/node-graph/node/Port.js +35 -37
- package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +27 -13
- package/src/core/path/computePathDirectory.spec.js +8 -0
- package/src/core/process/BaseProcess.d.ts +5 -0
- package/src/core/process/WatchDog.js +76 -75
- package/src/core/process/action/AsynchronousAction.js +24 -22
- package/src/core/process/executor/profile/Profile.js +34 -24
- package/src/core/process/executor/profile/TraceEvent.js +75 -75
- package/src/core/process/worker/OnDemandWorkerManager.js +27 -30
- package/src/core/process/worker/WorkerBuilder.js +149 -149
- package/src/core/process/worker/WorkerProxy.js +25 -21
- package/src/core/process/worker/extractTransferables.js +2 -2
- package/src/engine/Engine.js +58 -53
- package/src/engine/EngineConfiguration.d.ts +4 -4
- package/src/engine/ecs/EntityManager.js +517 -614
- package/src/engine/ecs/System.js +2 -2
- package/src/engine/ecs/transform/Transform.d.ts +7 -5
- package/src/engine/ecs/transform/Transform.js +30 -16
- package/src/engine/ecs/validateSystem.js +89 -0
- package/src/engine/graphics/GraphicsEngine.js +433 -483
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +46 -48
- package/src/engine/graphics/ecs/camera/Camera.js +11 -11
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +2 -2
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +60 -62
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +20 -22
- package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +15 -4
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +156 -180
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +69 -71
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +51 -53
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +67 -69
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +56 -58
- package/src/engine/graphics/shadows/testShadowMapRendering.js +30 -34
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.spec.js +22 -20
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.js +10 -13
- package/src/engine/graphics/texture/virtual/VirtualTexture.spec.js +1 -1
- package/src/engine/plugin/EnginePluginManager.d.ts +6 -1
- package/src/engine/ecs/components/ClingToHeightMap.js +0 -19
- package/src/engine/ecs/components/SynchronizePosition.js +0 -15
- package/src/engine/ecs/systems/ClingToHeightMapSystem.js +0 -170
- package/src/engine/ecs/systems/SynchronizePositionSystem.js +0 -43
|
@@ -1,68 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
DoubleSide,
|
|
3
|
+
LinearFilter,
|
|
4
|
+
Mesh as ThreeMesh,
|
|
5
|
+
OrthographicCamera,
|
|
6
|
+
PlaneBufferGeometry,
|
|
7
|
+
Scene,
|
|
8
|
+
ShaderMaterial,
|
|
9
|
+
UniformsUtils,
|
|
10
|
+
WebGLRenderTarget
|
|
11
|
+
} from "three";
|
|
12
|
+
import {CopyShader} from "three/examples/jsm/shaders/CopyShader.js";
|
|
13
|
+
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
14
|
+
import {makeEngineOptionsModel} from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
15
|
+
import {enableEditor} from "../../../../../../editor/enableEditor.js";
|
|
16
|
+
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
17
|
+
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
18
|
+
import {CanvasView} from "../../../../../view/elements/CanvasView.js";
|
|
19
|
+
import {AttachmentSystem} from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
20
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
21
|
+
import {Foliage2System} from "../../../../ecs/foliage/ecs/Foliage2System.js";
|
|
22
|
+
import {FogOfWarRevealerSystem} from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
23
|
+
import {FogOfWarSystem} from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
3
24
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
4
25
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
26
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
27
|
+
import {InverseKinematicsSystem} from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
28
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
29
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
30
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
5
31
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
6
|
-
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
7
|
-
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
8
32
|
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
9
|
-
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
10
33
|
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
11
|
-
import { AttachmentSystem } from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
12
|
-
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
13
|
-
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
14
|
-
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
15
34
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
16
|
-
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
17
|
-
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
18
|
-
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
19
|
-
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
20
|
-
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
21
35
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
22
36
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
28
|
-
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
29
|
-
import SynchronizePositionSystem from "../../../../ecs/systems/SynchronizePositionSystem.js";
|
|
37
|
+
import {Transform} from "../../../../ecs/transform/Transform.js";
|
|
38
|
+
import {EngineConfiguration} from "../../../../EngineConfiguration.js";
|
|
39
|
+
import {EngineHarness} from "../../../../EngineHarness.js";
|
|
40
|
+
import {GridPosition2TransformSystem} from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
30
41
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
42
|
+
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
31
43
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
32
|
-
import {
|
|
44
|
+
import {InputSystem} from "../../../../input/ecs/systems/InputSystem.js";
|
|
45
|
+
import {BehaviorSystem} from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
46
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
47
|
+
import {SoundEmitterSystem} from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
48
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
49
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
50
|
+
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
51
|
+
import {AnimationGraphSystem} from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
52
|
+
import {CameraSystem} from "../../../ecs/camera/CameraSystem.js";
|
|
53
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
54
|
+
import {TopDownCameraLanderSystem} from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
33
55
|
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
34
56
|
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
35
|
-
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
36
|
-
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
37
|
-
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
38
|
-
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
39
|
-
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
40
|
-
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
41
|
-
import { CanvasView } from "../../../../../view/elements/CanvasView.js";
|
|
42
|
-
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
43
|
-
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
44
|
-
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
45
|
-
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
46
|
-
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
47
|
-
import Entity from "../../../../ecs/Entity.js";
|
|
48
|
-
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
49
57
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
Scene,
|
|
58
|
-
ShaderMaterial,
|
|
59
|
-
UniformsUtils,
|
|
60
|
-
WebGLRenderTarget
|
|
61
|
-
} from "three";
|
|
62
|
-
import { AmbientOcclusionPostProcessEffect } from "../simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
63
|
-
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
64
|
-
import { StandardFrameBuffers } from "../../../StandardFrameBuffers.js";
|
|
65
|
-
import { load_and_set_cubemap_v0 } from "../../../load_and_set_cubemap_v0.js";
|
|
58
|
+
import {MeshSystem} from "../../../ecs/mesh/MeshSystem.js";
|
|
59
|
+
import {PathDisplaySystem} from "../../../ecs/path/PathDisplaySystem.js";
|
|
60
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
61
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
62
|
+
import {load_and_set_cubemap_v0} from "../../../load_and_set_cubemap_v0.js";
|
|
63
|
+
import {StandardFrameBuffers} from "../../../StandardFrameBuffers.js";
|
|
64
|
+
import {AmbientOcclusionPostProcessEffect} from "../simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
66
65
|
|
|
67
66
|
const engineHarness = new EngineHarness();
|
|
68
67
|
|
|
@@ -108,7 +107,6 @@ function makeConfig(engine) {
|
|
|
108
107
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
109
108
|
new GridPosition2TransformSystem(),
|
|
110
109
|
new Transform2GridPositionSystem(),
|
|
111
|
-
new SynchronizePositionSystem(),
|
|
112
110
|
new GridPositionSystem(),
|
|
113
111
|
new InputControllerSystem(devices),
|
|
114
112
|
new InputSystem(devices),
|
|
@@ -1,45 +1,3 @@
|
|
|
1
|
-
import { seededRandom } from "../../../../../core/math/random/seededRandom.js";
|
|
2
|
-
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
3
|
-
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
4
|
-
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
5
|
-
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
6
|
-
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
7
|
-
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
8
|
-
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
9
|
-
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
10
|
-
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
11
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
12
|
-
import { AttachmentSystem } from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
13
|
-
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
14
|
-
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
15
|
-
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
16
|
-
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
17
|
-
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
18
|
-
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
19
|
-
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
20
|
-
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
21
|
-
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
22
|
-
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
23
|
-
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
24
|
-
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
25
|
-
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
26
|
-
import { Foliage2System } from "../../../../ecs/foliage/ecs/Foliage2System.js";
|
|
27
|
-
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
28
|
-
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
29
|
-
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
30
|
-
import SynchronizePositionSystem from "../../../../ecs/systems/SynchronizePositionSystem.js";
|
|
31
|
-
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
32
|
-
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
33
|
-
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
34
|
-
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
35
|
-
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
36
|
-
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
37
|
-
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
38
|
-
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
39
|
-
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
40
|
-
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
41
|
-
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
42
|
-
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
43
1
|
import {
|
|
44
2
|
BoxBufferGeometry,
|
|
45
3
|
Group,
|
|
@@ -49,38 +7,79 @@ import {
|
|
|
49
7
|
OctahedronBufferGeometry,
|
|
50
8
|
TorusKnotBufferGeometry
|
|
51
9
|
} from "three";
|
|
52
|
-
import
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
10
|
+
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
11
|
+
import {makeEngineOptionsModel} from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
12
|
+
import {OrbitingBehavior} from "../../../../../../../model/game/util/behavior/OrbitingBehavior.js";
|
|
13
|
+
import {enableEditor} from "../../../../../../editor/enableEditor.js";
|
|
14
|
+
import {makeHelperSphereGeometry} from "../../../../../../editor/process/symbolic/makeHelperSphereGeometry.js";
|
|
15
|
+
import {parse_color} from "../../../../../core/color/parse_color.js";
|
|
55
16
|
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
56
17
|
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
18
|
+
import {randomFloatBetween} from "../../../../../core/math/random/randomFloatBetween.js";
|
|
19
|
+
import {seededRandom} from "../../../../../core/math/random/seededRandom.js";
|
|
20
|
+
import {GameAssetType} from "../../../../asset/GameAssetType.js";
|
|
21
|
+
import {GLTFAssetLoader} from "../../../../asset/loaders/GLTFAssetLoader.js";
|
|
22
|
+
import {ImageRGBADataLoader} from "../../../../asset/loaders/image/ImageRGBADataLoader.js";
|
|
23
|
+
import {JsonAssetLoader} from "../../../../asset/loaders/JsonAssetLoader.js";
|
|
24
|
+
import {TextureAssetLoader} from "../../../../asset/loaders/texture/TextureAssetLoader.js";
|
|
25
|
+
import {AttachmentSystem} from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
57
26
|
import Entity from "../../../../ecs/Entity.js";
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
27
|
+
import {Foliage2System} from "../../../../ecs/foliage/ecs/Foliage2System.js";
|
|
28
|
+
import {FogOfWar} from "../../../../ecs/fow/FogOfWar.js";
|
|
29
|
+
import {FogOfWarRevealer} from "../../../../ecs/fow/FogOfWarRevealer.js";
|
|
30
|
+
import {FogOfWarRevealerSystem} from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
31
|
+
import {FogOfWarSystem} from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
32
|
+
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
33
|
+
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
34
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
35
|
+
import {InverseKinematicsSystem} from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
66
36
|
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
67
|
-
import
|
|
37
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
38
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
39
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
40
|
+
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
41
|
+
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
42
|
+
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
43
|
+
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
44
|
+
import Team from "../../../../ecs/team/Team.js";
|
|
45
|
+
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
46
|
+
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
47
|
+
import {obtainTerrain} from "../../../../ecs/terrain/util/obtainTerrain.js";
|
|
48
|
+
import {Transform} from "../../../../ecs/transform/Transform.js";
|
|
49
|
+
import {EngineConfiguration} from "../../../../EngineConfiguration.js";
|
|
50
|
+
import {EngineHarness} from "../../../../EngineHarness.js";
|
|
51
|
+
import {GridPosition2TransformSystem} from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
52
|
+
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
53
|
+
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
54
|
+
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
55
|
+
import {InputSystem} from "../../../../input/ecs/systems/InputSystem.js";
|
|
56
|
+
import {BehaviorComponent} from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
57
|
+
import {BehaviorSystem} from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
58
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
59
|
+
import {SoundEmitterSystem} from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
60
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
61
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
62
|
+
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
63
|
+
import {AnimationGraphSystem} from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
64
|
+
import {CameraSystem} from "../../../ecs/camera/CameraSystem.js";
|
|
68
65
|
import TopDownCameraController from "../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
66
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
67
|
+
import {TopDownCameraLanderSystem} from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
68
|
+
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
69
|
+
import {Light} from "../../../ecs/light/Light.js";
|
|
70
|
+
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
71
|
+
import {LightType} from "../../../ecs/light/LightType.js";
|
|
72
|
+
import {ShadedGeometrySystem} from "../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
73
|
+
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
74
|
+
import {MeshSystem} from "../../../ecs/mesh/MeshSystem.js";
|
|
75
|
+
import {PathDisplaySystem} from "../../../ecs/path/PathDisplaySystem.js";
|
|
76
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
77
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
78
|
+
import {ParticleEmitterSystem} from "../../../particles/ecs/ParticleEmitterSystem.js";
|
|
79
|
+
import {ParticleEmitter} from "../../../particles/particular/engine/emitter/ParticleEmitter.js";
|
|
69
80
|
import ThreeFactory from "../../../three/ThreeFactory.js";
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import { GameAssetType } from "../../../../asset/GameAssetType.js";
|
|
73
|
-
import { GLTFAssetLoader } from "../../../../asset/loaders/GLTFAssetLoader.js";
|
|
74
|
-
import { ImageRGBADataLoader } from "../../../../asset/loaders/image/ImageRGBADataLoader.js";
|
|
75
|
-
import { randomFloatBetween } from "../../../../../core/math/random/randomFloatBetween.js";
|
|
76
|
-
import { ParticleEmitter } from "../../../particles/particular/engine/emitter/ParticleEmitter.js";
|
|
77
|
-
import { ParticleEmitterSystem } from "../../../particles/ecs/ParticleEmitterSystem.js";
|
|
78
|
-
import { ShadedGeometrySystem } from "../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
79
|
-
import { FogOfWar } from "../../../../ecs/fow/FogOfWar.js";
|
|
80
|
-
import { FogOfWarRevealer } from "../../../../ecs/fow/FogOfWarRevealer.js";
|
|
81
|
-
import Team from "../../../../ecs/team/Team.js";
|
|
82
|
-
import { AmbientOcclusionPostProcessEffect } from "../../buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
83
|
-
import { obtainTerrain } from "../../../../ecs/terrain/util/obtainTerrain.js";
|
|
81
|
+
import {AmbientOcclusionPostProcessEffect} from "../../buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
82
|
+
import {ForwardPlusRenderingPlugin} from "./ForwardPlusRenderingPlugin.js";
|
|
84
83
|
|
|
85
84
|
const geo_light_center_octahedron = new BoxBufferGeometry(0.1, 0.1, 0.1);
|
|
86
85
|
const engineHarness = new EngineHarness();
|
|
@@ -136,7 +135,6 @@ function makeConfig(engine) {
|
|
|
136
135
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
137
136
|
new GridPosition2TransformSystem(),
|
|
138
137
|
new Transform2GridPositionSystem(),
|
|
139
|
-
new SynchronizePositionSystem(),
|
|
140
138
|
new GridPositionSystem(),
|
|
141
139
|
new InputControllerSystem(devices),
|
|
142
140
|
new InputSystem(devices),
|
|
@@ -1,73 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import {mat4} from "gl-matrix";
|
|
2
|
+
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
3
|
+
import {makeEngineOptionsModel} from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
4
|
+
import {enableEditor} from "../../../../../../editor/enableEditor.js";
|
|
5
|
+
import {AABB3} from "../../../../../core/geom/3d/aabb/AABB3.js";
|
|
6
|
+
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
7
|
+
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
8
|
+
import {clamp} from "../../../../../core/math/clamp.js";
|
|
9
|
+
import {inverseLerp} from "../../../../../core/math/inverseLerp.js";
|
|
10
|
+
import {max2} from "../../../../../core/math/max2.js";
|
|
11
|
+
import {min2} from "../../../../../core/math/min2.js";
|
|
12
|
+
import {randomFloatBetween} from "../../../../../core/math/random/randomFloatBetween.js";
|
|
13
|
+
import {seededRandom} from "../../../../../core/math/random/seededRandom.js";
|
|
14
|
+
import {number_pretty_print} from "../../../../../core/primitives/numbers/number_pretty_print.js";
|
|
15
|
+
import LabelView from "../../../../../view/common/LabelView.js";
|
|
16
|
+
import {MetricCollection} from "../../../../development/performance/MetricCollection.js";
|
|
17
|
+
import {MetricStatistics} from "../../../../development/performance/MetricStatistics.js";
|
|
18
|
+
import {AttachmentSystem} from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
19
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
20
|
+
import {Foliage2System} from "../../../../ecs/foliage/ecs/Foliage2System.js";
|
|
21
|
+
import {FogOfWarRevealerSystem} from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
22
|
+
import {FogOfWarSystem} from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
23
|
+
import GUIElement from "../../../../ecs/gui/GUIElement.js";
|
|
3
24
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
25
|
+
import HeadsUpDisplay from "../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
4
26
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
27
|
+
import ViewportPosition from "../../../../ecs/gui/position/ViewportPosition.js";
|
|
28
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
29
|
+
import {InverseKinematicsSystem} from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
30
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
31
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
32
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
5
33
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
6
|
-
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
7
|
-
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
8
34
|
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
9
|
-
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
10
35
|
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
11
|
-
import { AttachmentSystem } from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
12
|
-
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
13
|
-
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
14
|
-
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
15
36
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
16
|
-
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
17
|
-
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
18
|
-
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
19
|
-
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
20
|
-
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
21
37
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
22
38
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
28
|
-
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
29
|
-
import SynchronizePositionSystem from "../../../../ecs/systems/SynchronizePositionSystem.js";
|
|
39
|
+
import {Transform} from "../../../../ecs/transform/Transform.js";
|
|
40
|
+
import {EngineConfiguration} from "../../../../EngineConfiguration.js";
|
|
41
|
+
import {EngineHarness} from "../../../../EngineHarness.js";
|
|
42
|
+
import {GridPosition2TransformSystem} from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
30
43
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
44
|
+
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
31
45
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
32
|
-
import {
|
|
46
|
+
import {InputSystem} from "../../../../input/ecs/systems/InputSystem.js";
|
|
47
|
+
import {BehaviorSystem} from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
48
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
49
|
+
import {SoundEmitterSystem} from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
50
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
51
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
52
|
+
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
53
|
+
import {AnimationGraphSystem} from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
54
|
+
import {CameraSystem} from "../../../ecs/camera/CameraSystem.js";
|
|
55
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
56
|
+
import {TopDownCameraLanderSystem} from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
33
57
|
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
34
58
|
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
35
|
-
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
36
|
-
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
37
|
-
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
38
|
-
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
39
|
-
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
40
|
-
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
41
|
-
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
42
|
-
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
43
|
-
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
44
|
-
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
45
|
-
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
46
|
-
import Entity from "../../../../ecs/Entity.js";
|
|
47
|
-
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
48
59
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import
|
|
59
|
-
import LabelView from "../../../../../view/common/LabelView.js";
|
|
60
|
-
import { seededRandom } from "../../../../../core/math/random/seededRandom.js";
|
|
61
|
-
import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
|
|
62
|
-
import { inverseLerp } from "../../../../../core/math/inverseLerp.js";
|
|
63
|
-
import { clamp } from "../../../../../core/math/clamp.js";
|
|
64
|
-
import { max2 } from "../../../../../core/math/max2.js";
|
|
65
|
-
import { min2 } from "../../../../../core/math/min2.js";
|
|
66
|
-
import { mat4 } from "gl-matrix";
|
|
67
|
-
import { randomFloatBetween } from "../../../../../core/math/random/randomFloatBetween.js";
|
|
68
|
-
import { load_and_set_cubemap_v0 } from "../../../load_and_set_cubemap_v0.js";
|
|
69
|
-
import { number_pretty_print } from "../../../../../core/primitives/numbers/number_pretty_print.js";
|
|
70
|
-
import { AABB3 } from "../../../../../core/geom/3d/aabb/AABB3.js";
|
|
60
|
+
import {MeshSystem} from "../../../ecs/mesh/MeshSystem.js";
|
|
61
|
+
import {PathDisplaySystem} from "../../../ecs/path/PathDisplaySystem.js";
|
|
62
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
63
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
64
|
+
import {load_and_set_cubemap_v0} from "../../../load_and_set_cubemap_v0.js";
|
|
65
|
+
import {StandardFrameBuffers} from "../../../StandardFrameBuffers.js";
|
|
66
|
+
import {Sampler2D} from "../../../texture/sampler/Sampler2D.js";
|
|
67
|
+
import {HierarchicalZBuffer} from "./buffer/HierarchicalZBuffer.js";
|
|
68
|
+
import {buildCanvasViewFromTexture} from "./buildCanvasViewFromTexture.js";
|
|
69
|
+
import {BatchOcclusionQuery} from "./query/BatchOcclusionQuery.js";
|
|
71
70
|
|
|
72
71
|
const engineHarness = new EngineHarness();
|
|
73
72
|
|
|
@@ -113,7 +112,6 @@ function makeConfig(engine) {
|
|
|
113
112
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
114
113
|
new GridPosition2TransformSystem(),
|
|
115
114
|
new Transform2GridPositionSystem(),
|
|
116
|
-
new SynchronizePositionSystem(),
|
|
117
115
|
new GridPositionSystem(),
|
|
118
116
|
new InputControllerSystem(devices),
|
|
119
117
|
new InputSystem(devices),
|
|
@@ -1,45 +1,42 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
1
|
+
import Army from "../../../../../model/game/ecs/component/army/Army.js";
|
|
2
|
+
import {initializeGameBinarySerializationRegistry} from "../../../../../model/game/GameBinarySerializationRegistry.js";
|
|
3
|
+
import {enableEditor} from "../../../../editor/enableEditor.js";
|
|
4
|
+
import Vector2 from "../../../core/geom/Vector2.js";
|
|
5
|
+
import {ArrayBufferLoader} from "../../asset/loaders/ArrayBufferLoader.js";
|
|
6
|
+
import {AttachmentSystem} from "../../ecs/attachment/AttachmentSystem.js";
|
|
7
|
+
import {SerializationMetadata} from "../../ecs/components/SerializationMetadata.js";
|
|
8
|
+
import Entity from "../../ecs/Entity.js";
|
|
9
|
+
import {Foliage2System} from "../../ecs/foliage/ecs/Foliage2System.js";
|
|
10
|
+
import GUIElement from "../../ecs/gui/GUIElement.js";
|
|
5
11
|
import GUIElementSystem from "../../ecs/gui/GUIElementSystem.js";
|
|
6
12
|
import HeadsUpDisplaySystem from "../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { SoundEmitterSystem } from "../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
10
|
-
import SoundControllerSystem from "../../sound/ecs/SoundControllerSystem.js";
|
|
11
|
-
import SoundListenerSystem from "../../sound/ecs/SoundListenerSystem.js";
|
|
13
|
+
import ViewportPosition from "../../ecs/gui/position/ViewportPosition.js";
|
|
14
|
+
import ViewportPositionSystem from "../../ecs/gui/position/ViewportPositionSystem.js";
|
|
12
15
|
import AnimationSystem from "../../ecs/systems/AnimationSystem.js";
|
|
13
|
-
import
|
|
14
|
-
import { CameraSystem } from "../ecs/camera/CameraSystem.js";
|
|
16
|
+
import TagSystem from "../../ecs/systems/TagSystem.js";
|
|
15
17
|
import ClingToTerrainSystem from "../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
16
18
|
import TerrainSystem from "../../ecs/terrain/ecs/TerrainSystem.js";
|
|
17
|
-
import
|
|
18
|
-
import {
|
|
19
|
-
import ViewportPositionSystem from "../../ecs/gui/position/ViewportPositionSystem.js";
|
|
20
|
-
import SynchronizePositionSystem from "../../ecs/systems/SynchronizePositionSystem.js";
|
|
19
|
+
import {EngineConfiguration} from "../../EngineConfiguration.js";
|
|
20
|
+
import {EngineHarness} from "../../EngineHarness.js";
|
|
21
21
|
import InputControllerSystem from "../../input/ecs/systems/InputControllerSystem.js";
|
|
22
|
-
import {
|
|
22
|
+
import {InputSystem} from "../../input/ecs/systems/InputSystem.js";
|
|
23
|
+
import {BehaviorSystem} from "../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
24
|
+
import {loadSerializedScene} from "../../scene/SerializedScene.js";
|
|
25
|
+
import {SoundEmitterSystem} from "../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
26
|
+
import SoundControllerSystem from "../../sound/ecs/SoundControllerSystem.js";
|
|
27
|
+
import SoundListenerSystem from "../../sound/ecs/SoundListenerSystem.js";
|
|
28
|
+
import {CameraSystem} from "../ecs/camera/CameraSystem.js";
|
|
29
|
+
import TopDownCameraControllerSystem from "../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
23
30
|
import MeshHighlightSystem from "../ecs/highlight/system/MeshHighlightSystem.js";
|
|
24
31
|
import LightSystem from "../ecs/light/LightSystem.js";
|
|
25
|
-
import {
|
|
26
|
-
import { PathDisplaySystem } from "../ecs/path/PathDisplaySystem.js";
|
|
27
|
-
import { ParticleEmitterSystem } from "../particles/ecs/ParticleEmitterSystem.js";
|
|
28
|
-
import { ShadedGeometrySystem } from "../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
29
|
-
import { ArrayBufferLoader } from "../../asset/loaders/ArrayBufferLoader.js";
|
|
30
|
-
import {
|
|
31
|
-
initializeGameBinarySerializationRegistry
|
|
32
|
-
} from "../../../../../model/game/GameBinarySerializationRegistry.js";
|
|
33
|
-
import WaterSystem from "../ecs/water/WaterSystem.js";
|
|
34
|
-
import Army from "../../../../../model/game/ecs/component/army/Army.js";
|
|
32
|
+
import {ShadedGeometrySystem} from "../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
35
33
|
import Mesh from "../ecs/mesh/Mesh.js";
|
|
36
|
-
import
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import {
|
|
42
|
-
import { SerializationMetadata } from "../../ecs/components/SerializationMetadata.js";
|
|
34
|
+
import {MeshSystem} from "../ecs/mesh/MeshSystem.js";
|
|
35
|
+
import {PathDisplaySystem} from "../ecs/path/PathDisplaySystem.js";
|
|
36
|
+
import Trail2DSystem from "../ecs/trail2d/Trail2DSystem.js";
|
|
37
|
+
import WaterSystem from "../ecs/water/WaterSystem.js";
|
|
38
|
+
import {ParticleEmitterSystem} from "../particles/ecs/ParticleEmitterSystem.js";
|
|
39
|
+
import {buildCanvasViewFromTexture} from "../render/visibility/hiz/buildCanvasViewFromTexture.js";
|
|
43
40
|
|
|
44
41
|
const eh = new EngineHarness();
|
|
45
42
|
|
|
@@ -86,7 +83,6 @@ function makeConfig(engine) {
|
|
|
86
83
|
new Trail2DSystem(engine),
|
|
87
84
|
new Foliage2System(assetManager, graphics),
|
|
88
85
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
89
|
-
new SynchronizePositionSystem(),
|
|
90
86
|
new InputControllerSystem(devices),
|
|
91
87
|
new InputSystem(devices),
|
|
92
88
|
new MeshHighlightSystem(engine),
|
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import {Sampler2D} from "../Sampler2D.js";
|
|
2
|
+
import {sampler2d_scale_down_lanczos} from "./sampler2d_scale_down_lanczos.js";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
describe.skip("currently broken", () => {
|
|
5
|
+
test("scale down 2x2 to 1x1 single channel", () => {
|
|
6
|
+
const input = new Sampler2D([1, 2, 3, 4], 1, 2, 2);
|
|
7
|
+
const output = new Sampler2D([7], 1, 1, 1);
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
sampler2d_scale_down_lanczos(input, output);
|
|
9
10
|
|
|
10
|
-
|
|
11
|
-
});
|
|
11
|
+
expect(output.readChannel(0, 0, 0)).toBeCloseTo(2.5);
|
|
12
|
+
});
|
|
12
13
|
|
|
13
|
-
test("scale down 3x1 to 1x1", () => {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
test("scale down 3x1 to 1x1", () => {
|
|
15
|
+
const input = new Sampler2D([1, 2, 3], 1, 3, 1);
|
|
16
|
+
const output = new Sampler2D([7], 1, 1, 1);
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
sampler2d_scale_down_lanczos(input, output);
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
});
|
|
20
|
+
expect(output.readChannel(0, 0, 0)).toBeCloseTo(2);
|
|
21
|
+
});
|
|
21
22
|
|
|
22
|
-
test("scale down 1x3 to 1x1", () => {
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
test("scale down 1x3 to 1x1", () => {
|
|
24
|
+
const input = new Sampler2D([1, 2, 3], 1, 1, 3);
|
|
25
|
+
const output = new Sampler2D([7], 1, 1, 1);
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
sampler2d_scale_down_lanczos(input, output);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
});
|
|
29
|
+
expect(output.readChannel(0, 0, 0)).toBeCloseTo(2);
|
|
30
|
+
});
|
|
31
|
+
});
|