@woosh/meep-engine 2.60.1 → 2.62.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 +20244 -20262
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +20244 -20262
- package/package.json +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/bvh2/BinaryNode.js +16 -13
- package/src/core/bvh2/LeafNode.js +6 -3
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.js +81 -0
- package/src/core/geom/3d/aabb/AABB3.js +24 -36
- package/src/core/geom/3d/aabb/aabb3_array_compute_from_sphere.js +22 -0
- package/src/core/geom/3d/aabb/aabb3_array_intersects_sphere.js +22 -0
- package/src/core/geom/3d/aabb/aabb3_array_intersects_sphere_array.js +11 -0
- package/src/core/geom/3d/aabb/aabb3_signed_distance_to_aabb3.js +28 -0
- package/src/core/geom/3d/aabb/serializeAABB3Quantized16Uint.js +19 -10
- 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/3d/tetrahedra/delaunay/Cavity.js +3 -4
- 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/foliage/ecs/Foliage2System.js +3 -0
- package/src/engine/ecs/foliage/ecs/InstancedMeshComponent.js +4 -1
- package/src/engine/ecs/foliage/ecs/convertInstancedMeshComponents2Entities.js +64 -0
- package/src/engine/ecs/foliage/ecs/{InstancedMeshUtils.js → optimizeIndividualMeshesEntitiesToInstances.js} +11 -70
- 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 +42 -46
- 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/testPathDisplaySystem.js +49 -52
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +52 -56
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +20 -22
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +43 -25
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +160 -180
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +37 -41
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +63 -67
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +46 -50
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +61 -65
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +48 -52
- package/src/engine/graphics/shadows/testShadowMapRendering.js +28 -32
- 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/sound/dB2Volume.js +8 -0
- package/src/engine/sound/ecs/emitter/SoundEmitter.js +125 -99
- package/src/engine/sound/ecs/emitter/SoundEmitterComponentContext.js +4 -42
- package/src/engine/sound/ecs/emitter/SoundEmitterSystem.js +31 -121
- package/src/engine/sound/volume2dB.js +8 -0
- package/src/generation/theme/ThemeEngine.js +19 -53
- 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
- package/src/engine/graphics/geometry/bvh/buffered/BVHFromBufferGeometry.js +0 -133
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -1,85 +1,83 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { mat4 } from "gl-matrix";
|
|
2
|
+
import { LineBasicMaterial } from "three";
|
|
3
|
+
import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
|
|
4
|
+
import { makeEngineOptionsModel } from "../../../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
5
|
+
import { enableEditor } from "../../../../../../../../editor/enableEditor.js";
|
|
6
|
+
import { makeHelperBoxGeometry } from "../../../../../../../../editor/process/symbolic/makeHelperBoxGeometry.js";
|
|
7
|
+
import { AABB3 } from "../../../../../../../core/geom/3d/aabb/AABB3.js";
|
|
8
|
+
import { TransformedShape3D } from "../../../../../../../core/geom/3d/shape/TransformedShape3D.js";
|
|
9
|
+
import { UnionShape3D } from "../../../../../../../core/geom/3d/shape/UnionShape3D.js";
|
|
10
|
+
import { UnitCubeShape3D } from "../../../../../../../core/geom/3d/shape/UnitCubeShape3D.js";
|
|
11
|
+
import { UnitSphereShape3D } from "../../../../../../../core/geom/3d/shape/UnitSphereShape3D.js";
|
|
12
|
+
import {
|
|
13
|
+
shape_to_visual_entity,
|
|
14
|
+
SHAPE_VISUAL_ENTITY_TAG
|
|
15
|
+
} from "../../../../../../../core/geom/3d/shape/util/shape_to_visual_entity.js";
|
|
16
|
+
import Vector1 from "../../../../../../../core/geom/Vector1.js";
|
|
17
|
+
import Vector2 from "../../../../../../../core/geom/Vector2.js";
|
|
18
|
+
import Vector3 from "../../../../../../../core/geom/Vector3.js";
|
|
19
|
+
import { clamp01 } from "../../../../../../../core/math/clamp01.js";
|
|
20
|
+
import { pingpong } from "../../../../../../../core/math/pingpong.js";
|
|
21
|
+
import { randomFloatBetween } from "../../../../../../../core/math/random/randomFloatBetween.js";
|
|
22
|
+
import { randomFromArray } from "../../../../../../../core/math/random/randomFromArray.js";
|
|
23
|
+
import { seededRandom } from "../../../../../../../core/math/random/seededRandom.js";
|
|
24
|
+
import { computeStatisticalMean } from "../../../../../../../core/math/statistics/computeStatisticalMean.js";
|
|
25
|
+
import ButtonView from "../../../../../../../view/elements/button/ButtonView.js";
|
|
26
|
+
import { CanvasView } from "../../../../../../../view/elements/CanvasView.js";
|
|
27
|
+
import EmptyView from "../../../../../../../view/elements/EmptyView.js";
|
|
28
|
+
import { AttachmentSystem } from "../../../../../../ecs/attachment/AttachmentSystem.js";
|
|
29
|
+
import Entity from "../../../../../../ecs/Entity.js";
|
|
30
|
+
import { pick } from "../../../../../../ecs/grid/pick.js";
|
|
31
|
+
import GUIElement from "../../../../../../ecs/gui/GUIElement.js";
|
|
3
32
|
import GUIElementSystem from "../../../../../../ecs/gui/GUIElementSystem.js";
|
|
33
|
+
import HeadsUpDisplay from "../../../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
4
34
|
import HeadsUpDisplaySystem from "../../../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import SoundControllerSystem from "../../../../../../sound/ecs/SoundControllerSystem.js";
|
|
9
|
-
import SoundListenerSystem from "../../../../../../sound/ecs/SoundListenerSystem.js";
|
|
35
|
+
import ViewportPosition from "../../../../../../ecs/gui/position/ViewportPosition.js";
|
|
36
|
+
import ViewportPositionSystem from "../../../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
37
|
+
import Renderable from "../../../../../../ecs/renderable/Renderable.js";
|
|
10
38
|
import AnimationSystem from "../../../../../../ecs/systems/AnimationSystem.js";
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { MeshSystem } from "../../../../../ecs/mesh/MeshSystem.js";
|
|
39
|
+
import RenderSystem from "../../../../../../ecs/systems/RenderSystem.js";
|
|
40
|
+
import TagSystem from "../../../../../../ecs/systems/TagSystem.js";
|
|
14
41
|
import ClingToTerrainSystem from "../../../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
15
42
|
import TerrainSystem from "../../../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
43
|
+
import { obtainTerrain } from "../../../../../../ecs/terrain/util/obtainTerrain.js";
|
|
44
|
+
import { Transform } from "../../../../../../ecs/transform/Transform.js";
|
|
45
|
+
import { EngineConfiguration } from "../../../../../../EngineConfiguration.js";
|
|
46
|
+
import { EngineHarness } from "../../../../../../EngineHarness.js";
|
|
47
|
+
import InputController from "../../../../../../input/ecs/components/InputController.js";
|
|
20
48
|
import InputControllerSystem from "../../../../../../input/ecs/systems/InputControllerSystem.js";
|
|
21
49
|
import { InputSystem } from "../../../../../../input/ecs/systems/InputSystem.js";
|
|
50
|
+
import { RepeatBehavior } from "../../../../../../intelligence/behavior/decorator/RepeatBehavior.js";
|
|
51
|
+
import { BehaviorComponent } from "../../../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
52
|
+
import { BehaviorSystem } from "../../../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
53
|
+
import { ActionBehavior } from "../../../../../../intelligence/behavior/primitive/ActionBehavior.js";
|
|
54
|
+
import { SoundEmitterSystem } from "../../../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
55
|
+
import SoundControllerSystem from "../../../../../../sound/ecs/SoundControllerSystem.js";
|
|
56
|
+
import SoundListenerSystem from "../../../../../../sound/ecs/SoundListenerSystem.js";
|
|
57
|
+
import { CameraSystem } from "../../../../../ecs/camera/CameraSystem.js";
|
|
58
|
+
import TopDownCameraController from "../../../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
59
|
+
import TopDownCameraControllerSystem from "../../../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
22
60
|
import MeshHighlightSystem from "../../../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
23
61
|
import LightSystem from "../../../../../ecs/light/LightSystem.js";
|
|
24
|
-
import {
|
|
62
|
+
import { DrawMode } from "../../../../../ecs/mesh-v2/DrawMode.js";
|
|
63
|
+
import { ShadedGeometry } from "../../../../../ecs/mesh-v2/ShadedGeometry.js";
|
|
64
|
+
import { ShadedGeometrySystem } from "../../../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
65
|
+
import Mesh from "../../../../../ecs/mesh/Mesh.js";
|
|
66
|
+
import { MeshSystem } from "../../../../../ecs/mesh/MeshSystem.js";
|
|
25
67
|
import { PathDisplaySystem } from "../../../../../ecs/path/PathDisplaySystem.js";
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import { enableEditor } from "../../../../../../../../editor/enableEditor.js";
|
|
68
|
+
import Trail2DSystem from "../../../../../ecs/trail2d/Trail2DSystem.js";
|
|
69
|
+
import { load_and_set_cubemap_v0 } from "../../../../../load_and_set_cubemap_v0.js";
|
|
29
70
|
import {
|
|
30
71
|
AmbientOcclusionPostProcessEffect
|
|
31
72
|
} from "../../../../../render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import Entity from "../../../../../../ecs/Entity.js";
|
|
35
|
-
import { Transform } from "../../../../../../ecs/transform/Transform.js";
|
|
36
|
-
import Mesh from "../../../../../ecs/mesh/Mesh.js";
|
|
37
|
-
import { AABB3 } from "../../../../../../../core/geom/3d/aabb/AABB3.js";
|
|
38
|
-
import { ParticleVolume } from "./ParticleVolume.js";
|
|
73
|
+
import convertSampler2D2Canvas from "../../../../../texture/sampler/Sampler2D2Canvas.js";
|
|
74
|
+
import { threeUpdateTransform } from "../../../../../util/threeUpdateTransform.js";
|
|
39
75
|
import { ParticleEmitterSystem } from "../../../../ecs/ParticleEmitterSystem.js";
|
|
40
|
-
import { BehaviorComponent } from "../../../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
41
|
-
import { RepeatBehavior } from "../../../../../../intelligence/behavior/decorator/RepeatBehavior.js";
|
|
42
|
-
import { ActionBehavior } from "../../../../../../intelligence/behavior/primitive/ActionBehavior.js";
|
|
43
|
-
import { pingpong } from "../../../../../../../core/math/pingpong.js";
|
|
44
76
|
import { ParameterLookupTable } from "../../parameter/ParameterLookupTable.js";
|
|
45
|
-
import
|
|
46
|
-
import EmptyView from "../../../../../../../view/elements/EmptyView.js";
|
|
47
|
-
import HeadsUpDisplay from "../../../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
48
|
-
import ViewportPosition from "../../../../../../ecs/gui/position/ViewportPosition.js";
|
|
49
|
-
import { CanvasView } from "../../../../../../../view/elements/CanvasView.js";
|
|
50
|
-
import convertSampler2D2Canvas from "../../../../../texture/sampler/Sampler2D2Canvas.js";
|
|
51
|
-
import Vector1 from "../../../../../../../core/geom/Vector1.js";
|
|
52
|
-
import { UnitCubeShape3D } from "../../../../../../../core/geom/3d/shape/UnitCubeShape3D.js";
|
|
53
|
-
import { ShadedGeometrySystem } from "../../../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
77
|
+
import { RGBA_LUT_HEATMAP_IR } from "../../parameter/sample/RGBA_LUT_HEATMAP_IR.js";
|
|
54
78
|
import { lut_to_sampler } from "./lut_to_sampler.js";
|
|
55
|
-
import {
|
|
56
|
-
shape_to_visual_entity,
|
|
57
|
-
SHAPE_VISUAL_ENTITY_TAG
|
|
58
|
-
} from "../../../../../../../core/geom/3d/shape/util/shape_to_visual_entity.js";
|
|
59
|
-
import { seededRandom } from "../../../../../../../core/math/random/seededRandom.js";
|
|
60
|
-
import { TransformedShape3D } from "../../../../../../../core/geom/3d/shape/TransformedShape3D.js";
|
|
61
|
-
import { mat4 } from "gl-matrix";
|
|
62
|
-
import { UnionShape3D } from "../../../../../../../core/geom/3d/shape/UnionShape3D.js";
|
|
63
|
-
import { ShadedGeometry } from "../../../../../ecs/mesh-v2/ShadedGeometry.js";
|
|
64
|
-
import { DrawMode } from "../../../../../ecs/mesh-v2/DrawMode.js";
|
|
65
|
-
import { makeHelperBoxGeometry } from "../../../../../../../../editor/process/symbolic/makeHelperBoxGeometry.js";
|
|
66
|
-
import { LineBasicMaterial } from "three";
|
|
67
|
-
import Renderable from "../../../../../../ecs/renderable/Renderable.js";
|
|
68
|
-
import { TransformControls } from "three/examples/jsm/controls/TransformControls.js";
|
|
69
|
-
import { threeUpdateTransform } from "../../../../../util/threeUpdateTransform.js";
|
|
70
|
-
import InputController from "../../../../../../input/ecs/components/InputController.js";
|
|
71
|
-
import { computeStatisticalMean } from "../../../../../../../core/math/statistics/computeStatisticalMean.js";
|
|
72
|
-
import ButtonView from "../../../../../../../view/elements/button/ButtonView.js";
|
|
73
|
-
import { UnitSphereShape3D } from "../../../../../../../core/geom/3d/shape/UnitSphereShape3D.js";
|
|
74
|
-
import TopDownCameraController from "../../../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
75
|
-
import { randomFloatBetween } from "../../../../../../../core/math/random/randomFloatBetween.js";
|
|
76
|
-
import { obtainTerrain } from "../../../../../../ecs/terrain/util/obtainTerrain.js";
|
|
77
|
-
import { pick } from "../../../../../../ecs/grid/pick.js";
|
|
78
|
-
import { clamp01 } from "../../../../../../../core/math/clamp01.js";
|
|
79
|
-
import { randomFromArray } from "../../../../../../../core/math/random/randomFromArray.js";
|
|
79
|
+
import { ParticleVolume } from "./ParticleVolume.js";
|
|
80
80
|
import { SamplingFunctionKind } from "./SamplingFunctionKind.js";
|
|
81
|
-
import { RGBA_LUT_HEATMAP_IR } from "../../parameter/sample/RGBA_LUT_HEATMAP_IR.js";
|
|
82
|
-
import { load_and_set_cubemap_v0 } from "../../../../../load_and_set_cubemap_v0.js";
|
|
83
81
|
|
|
84
82
|
const engineHarness = new EngineHarness();
|
|
85
83
|
|
|
@@ -113,9 +111,7 @@ function makeConfig(engine) {
|
|
|
113
111
|
new ClingToTerrainSystem(),
|
|
114
112
|
new TerrainSystem(graphics, assetManager),
|
|
115
113
|
new Trail2DSystem(engine),
|
|
116
|
-
new Foliage2System(assetManager, graphics),
|
|
117
114
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
118
|
-
new SynchronizePositionSystem(),
|
|
119
115
|
new InputControllerSystem(devices),
|
|
120
116
|
new InputSystem(devices),
|
|
121
117
|
new MeshHighlightSystem(engine),
|
|
@@ -1,68 +1,66 @@
|
|
|
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 { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
22
|
+
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
3
23
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
4
24
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
25
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
26
|
+
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
27
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
28
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
29
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
5
30
|
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
31
|
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
9
|
-
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
10
32
|
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
33
|
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
34
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
22
35
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
36
|
+
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
37
|
+
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
38
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
27
39
|
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
28
|
-
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
29
|
-
import SynchronizePositionSystem from "../../../../ecs/systems/SynchronizePositionSystem.js";
|
|
30
40
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
41
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
31
42
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
32
43
|
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
33
|
-
import
|
|
34
|
-
import
|
|
44
|
+
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
45
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
46
|
+
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
47
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
48
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
35
49
|
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
36
50
|
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
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";
|
|
51
|
+
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
52
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
53
|
+
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
54
|
+
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
55
|
+
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
49
56
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
DoubleSide,
|
|
53
|
-
LinearFilter,
|
|
54
|
-
Mesh as ThreeMesh,
|
|
55
|
-
OrthographicCamera,
|
|
56
|
-
PlaneBufferGeometry,
|
|
57
|
-
Scene,
|
|
58
|
-
ShaderMaterial,
|
|
59
|
-
UniformsUtils,
|
|
60
|
-
WebGLRenderTarget
|
|
61
|
-
} from "three";
|
|
62
|
-
import { AmbientOcclusionPostProcessEffect } from "../simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
57
|
+
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
63
58
|
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
64
|
-
import
|
|
59
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
60
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
65
61
|
import { load_and_set_cubemap_v0 } from "../../../load_and_set_cubemap_v0.js";
|
|
62
|
+
import { StandardFrameBuffers } from "../../../StandardFrameBuffers.js";
|
|
63
|
+
import { AmbientOcclusionPostProcessEffect } from "../simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
66
64
|
|
|
67
65
|
const engineHarness = new EngineHarness();
|
|
68
66
|
|
|
@@ -104,11 +102,9 @@ function makeConfig(engine) {
|
|
|
104
102
|
new TerrainSystem(graphics, assetManager),
|
|
105
103
|
new WaterSystem(graphics),
|
|
106
104
|
new Trail2DSystem(engine),
|
|
107
|
-
new Foliage2System(assetManager, graphics),
|
|
108
105
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
109
106
|
new GridPosition2TransformSystem(),
|
|
110
107
|
new Transform2GridPositionSystem(),
|
|
111
|
-
new SynchronizePositionSystem(),
|
|
112
108
|
new GridPositionSystem(),
|
|
113
109
|
new InputControllerSystem(devices),
|
|
114
110
|
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,78 @@ import {
|
|
|
49
7
|
OctahedronBufferGeometry,
|
|
50
8
|
TorusKnotBufferGeometry
|
|
51
9
|
} from "three";
|
|
52
|
-
import
|
|
10
|
+
import FacingDirectionSystem from "../../../../../../../model/game/ecs/system/FacingDirectionSystem.js";
|
|
53
11
|
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
12
|
+
import { OrbitingBehavior } from "../../../../../../../model/game/util/behavior/OrbitingBehavior.js";
|
|
54
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";
|
|
57
|
-
import
|
|
58
|
-
import {
|
|
59
|
-
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
60
|
-
import { ForwardPlusRenderingPlugin } from "./ForwardPlusRenderingPlugin.js";
|
|
61
|
-
import { OrbitingBehavior } from "../../../../../../../model/game/util/behavior/OrbitingBehavior.js";
|
|
62
|
-
import { BehaviorComponent } from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
63
|
-
import { Light } from "../../../ecs/light/Light.js";
|
|
64
|
-
import { LightType } from "../../../ecs/light/LightType.js";
|
|
65
|
-
import { parse_color } from "../../../../../core/color/parse_color.js";
|
|
66
|
-
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
67
|
-
import { makeHelperSphereGeometry } from "../../../../../../editor/process/symbolic/makeHelperSphereGeometry.js";
|
|
68
|
-
import TopDownCameraController from "../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
69
|
-
import ThreeFactory from "../../../three/ThreeFactory.js";
|
|
70
|
-
import { JsonAssetLoader } from "../../../../asset/loaders/JsonAssetLoader.js";
|
|
71
|
-
import { TextureAssetLoader } from "../../../../asset/loaders/texture/TextureAssetLoader.js";
|
|
18
|
+
import { randomFloatBetween } from "../../../../../core/math/random/randomFloatBetween.js";
|
|
19
|
+
import { seededRandom } from "../../../../../core/math/random/seededRandom.js";
|
|
72
20
|
import { GameAssetType } from "../../../../asset/GameAssetType.js";
|
|
73
21
|
import { GLTFAssetLoader } from "../../../../asset/loaders/GLTFAssetLoader.js";
|
|
74
22
|
import { ImageRGBADataLoader } from "../../../../asset/loaders/image/ImageRGBADataLoader.js";
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import
|
|
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";
|
|
26
|
+
import Entity from "../../../../ecs/Entity.js";
|
|
79
27
|
import { FogOfWar } from "../../../../ecs/fow/FogOfWar.js";
|
|
80
28
|
import { FogOfWarRevealer } from "../../../../ecs/fow/FogOfWarRevealer.js";
|
|
29
|
+
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
30
|
+
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
31
|
+
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
32
|
+
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
33
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
34
|
+
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
35
|
+
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
36
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
37
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
38
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
39
|
+
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
40
|
+
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
41
|
+
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
42
|
+
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
81
43
|
import Team from "../../../../ecs/team/Team.js";
|
|
82
|
-
import
|
|
44
|
+
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
45
|
+
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
83
46
|
import { obtainTerrain } from "../../../../ecs/terrain/util/obtainTerrain.js";
|
|
47
|
+
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
48
|
+
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
49
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
50
|
+
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
51
|
+
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
52
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
53
|
+
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
54
|
+
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
55
|
+
import { BehaviorComponent } from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
56
|
+
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
57
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
58
|
+
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
59
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
60
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
61
|
+
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
62
|
+
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
63
|
+
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
64
|
+
import TopDownCameraController from "../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
65
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
66
|
+
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
67
|
+
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
68
|
+
import { Light } from "../../../ecs/light/Light.js";
|
|
69
|
+
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
70
|
+
import { LightType } from "../../../ecs/light/LightType.js";
|
|
71
|
+
import { ShadedGeometrySystem } from "../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
72
|
+
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
73
|
+
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
74
|
+
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
75
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
76
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
77
|
+
import { ParticleEmitterSystem } from "../../../particles/ecs/ParticleEmitterSystem.js";
|
|
78
|
+
import { ParticleEmitter } from "../../../particles/particular/engine/emitter/ParticleEmitter.js";
|
|
79
|
+
import ThreeFactory from "../../../three/ThreeFactory.js";
|
|
80
|
+
import { AmbientOcclusionPostProcessEffect } from "../../buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
81
|
+
import { ForwardPlusRenderingPlugin } from "./ForwardPlusRenderingPlugin.js";
|
|
84
82
|
|
|
85
83
|
const geo_light_center_octahedron = new BoxBufferGeometry(0.1, 0.1, 0.1);
|
|
86
84
|
const engineHarness = new EngineHarness();
|
|
@@ -132,11 +130,9 @@ function makeConfig(engine) {
|
|
|
132
130
|
new TerrainSystem(graphics, assetManager),
|
|
133
131
|
new WaterSystem(graphics),
|
|
134
132
|
new Trail2DSystem(engine),
|
|
135
|
-
new Foliage2System(assetManager, graphics),
|
|
136
133
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
137
134
|
new GridPosition2TransformSystem(),
|
|
138
135
|
new Transform2GridPositionSystem(),
|
|
139
|
-
new SynchronizePositionSystem(),
|
|
140
136
|
new GridPositionSystem(),
|
|
141
137
|
new InputControllerSystem(devices),
|
|
142
138
|
new InputSystem(devices),
|
|
@@ -1,73 +1,71 @@
|
|
|
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 { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
21
|
+
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
22
|
+
import GUIElement from "../../../../ecs/gui/GUIElement.js";
|
|
3
23
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
24
|
+
import HeadsUpDisplay from "../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
4
25
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
26
|
+
import ViewportPosition from "../../../../ecs/gui/position/ViewportPosition.js";
|
|
27
|
+
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
28
|
+
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
29
|
+
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
30
|
+
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
31
|
+
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
5
32
|
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
33
|
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
9
|
-
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
10
34
|
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
35
|
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
36
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
22
37
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import {
|
|
26
|
-
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
38
|
+
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
39
|
+
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
40
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
27
41
|
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
28
|
-
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
29
|
-
import SynchronizePositionSystem from "../../../../ecs/systems/SynchronizePositionSystem.js";
|
|
30
42
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
43
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
31
44
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
32
45
|
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
33
|
-
import
|
|
34
|
-
import
|
|
46
|
+
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
47
|
+
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
48
|
+
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
49
|
+
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
50
|
+
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
35
51
|
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
36
52
|
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
37
|
-
import {
|
|
38
|
-
import
|
|
39
|
-
import {
|
|
40
|
-
import
|
|
41
|
-
import
|
|
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";
|
|
53
|
+
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
54
|
+
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
55
|
+
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
56
|
+
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
57
|
+
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
48
58
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
59
|
+
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
49
60
|
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
61
|
+
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
62
|
+
import WaterSystem from "../../../ecs/water/WaterSystem.js";
|
|
63
|
+
import { load_and_set_cubemap_v0 } from "../../../load_and_set_cubemap_v0.js";
|
|
50
64
|
import { StandardFrameBuffers } from "../../../StandardFrameBuffers.js";
|
|
65
|
+
import { Sampler2D } from "../../../texture/sampler/Sampler2D.js";
|
|
51
66
|
import { HierarchicalZBuffer } from "./buffer/HierarchicalZBuffer.js";
|
|
52
|
-
import ViewportPosition from "../../../../ecs/gui/position/ViewportPosition.js";
|
|
53
|
-
import GUIElement from "../../../../ecs/gui/GUIElement.js";
|
|
54
|
-
import { MetricCollection } from "../../../../development/performance/MetricCollection.js";
|
|
55
|
-
import { MetricStatistics } from "../../../../development/performance/MetricStatistics.js";
|
|
56
67
|
import { buildCanvasViewFromTexture } from "./buildCanvasViewFromTexture.js";
|
|
57
68
|
import { BatchOcclusionQuery } from "./query/BatchOcclusionQuery.js";
|
|
58
|
-
import HeadsUpDisplay from "../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
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";
|
|
71
69
|
|
|
72
70
|
const engineHarness = new EngineHarness();
|
|
73
71
|
|
|
@@ -109,11 +107,9 @@ function makeConfig(engine) {
|
|
|
109
107
|
new TerrainSystem(graphics, assetManager),
|
|
110
108
|
new WaterSystem(graphics),
|
|
111
109
|
new Trail2DSystem(engine),
|
|
112
|
-
new Foliage2System(assetManager, graphics),
|
|
113
110
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
114
111
|
new GridPosition2TransformSystem(),
|
|
115
112
|
new Transform2GridPositionSystem(),
|
|
116
|
-
new SynchronizePositionSystem(),
|
|
117
113
|
new GridPositionSystem(),
|
|
118
114
|
new InputControllerSystem(devices),
|
|
119
115
|
new InputSystem(devices),
|