@woosh/meep-engine 2.61.0 → 2.63.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 +1277 -1259
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +1277 -1259
- package/package.json +1 -1
- package/src/core/binary/EncodingBinaryBuffer.js +7 -43
- package/src/core/binary/EncodingBinaryBuffer.spec.js +16 -0
- package/src/core/bvh2/BinaryNode.js +16 -13
- package/src/core/bvh2/LeafNode.js +6 -3
- package/src/core/bvh2/bvh3/EBBVHLeafProxy.js +4 -2
- package/src/core/bvh2/bvh3/query/bvh_query_user_data_overlaps_sphere.js +81 -0
- package/src/core/cache/LoadingCache.js +4 -1
- package/src/core/collection/map/BiMap.js +49 -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/tetrahedra/delaunay/Cavity.js +3 -4
- package/src/engine/ecs/components/Tag.d.ts +2 -0
- package/src/engine/ecs/components/Tag.js +19 -28
- package/src/engine/ecs/components/Tag.spec.js +47 -0
- 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/fow/FogOfWar.js +4 -0
- package/src/engine/ecs/fow/FogOfWarEditor.js +3 -0
- package/src/engine/ecs/terrain/TerrainPreview.js +45 -44
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrain.js +22 -4
- package/src/engine/ecs/terrain/tiles/TerrainTile.js +17 -12
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +25 -27
- package/src/engine/graphics/ecs/mesh/Mesh.d.ts +0 -4
- package/src/engine/graphics/ecs/mesh/Mesh.js +0 -11
- package/src/engine/graphics/ecs/mesh/MeshSystem.js +57 -67
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +49 -52
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +40 -42
- package/src/engine/graphics/particles/ecs/ParticleEmitterSystem.js +43 -25
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +10 -6
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +37 -41
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +44 -46
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +24 -26
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +40 -42
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +36 -38
- package/src/engine/graphics/shadows/testShadowMapRendering.js +19 -19
- package/src/engine/grid/ORTHOGONAL_NEIGHBOURHOOD_MASK.js +11 -0
- 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/core/binary/stringToByteArray.js +0 -24
- package/src/engine/graphics/geometry/bvh/buffered/BVHFromBufferGeometry.js +0 -133
- package/src/engine/save/storage/LocalStorage.js +0 -148
- package/src/engine/save/storage/MsgPackCodec.js +0 -22
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {Box3, BufferGeometry, Frustum, Points, PointsMaterial} from 'three';
|
|
2
|
+
import {assert} from "../../../../../../core/assert.js";
|
|
3
|
+
import {EBBVHLeafProxy} from "../../../../../../core/bvh2/bvh3/EBBVHLeafProxy.js";
|
|
4
|
+
import {computeHashIntegerArray} from "../../../../../../core/collection/array/computeHashIntegerArray.js";
|
|
2
5
|
import List from "../../../../../../core/collection/list/List.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { Box3, BufferGeometry, Frustum, Points, PointsMaterial } from 'three';
|
|
7
|
-
import { ParticlePool } from "./ParticlePool.js";
|
|
8
|
-
import { ParticleParameter } from "../parameter/ParticleParameter.js";
|
|
9
|
-
import { ParameterSet } from "../parameter/ParameterSet.js";
|
|
10
|
-
import { assert } from "../../../../../../core/assert.js";
|
|
11
|
-
import { LeafNode } from "../../../../../../core/bvh2/LeafNode.js";
|
|
12
|
-
import { ParticleLayer } from "./ParticleLayer.js";
|
|
13
|
-
import { ParticleParameters } from "./ParticleParameters.js";
|
|
14
|
-
import { BlendingType } from "../../../../texture/sampler/BlendingType.js";
|
|
6
|
+
import {AABB3} from "../../../../../../core/geom/3d/aabb/AABB3.js";
|
|
7
|
+
import {aabb3_array_combine} from "../../../../../../core/geom/3d/aabb/aabb3_array_combine.js";
|
|
8
|
+
import {compose_matrix4_array} from "../../../../../../core/geom/3d/compose_matrix4_array.js";
|
|
15
9
|
import Quaternion from "../../../../../../core/geom/Quaternion.js";
|
|
16
|
-
import {
|
|
17
|
-
import
|
|
10
|
+
import {v3_dot_array_array} from "../../../../../../core/geom/vec3/v3_dot_array_array.js";
|
|
11
|
+
import Vector3 from "../../../../../../core/geom/Vector3.js";
|
|
12
|
+
import {lerp} from "../../../../../../core/math/lerp.js";
|
|
13
|
+
import {max2} from "../../../../../../core/math/max2.js";
|
|
14
|
+
import {min2} from "../../../../../../core/math/min2.js";
|
|
15
|
+
import {frustum_from_camera} from "../../../../ecs/camera/frustum_from_camera.js";
|
|
16
|
+
import {BlendingType} from "../../../../texture/sampler/BlendingType.js";
|
|
17
|
+
import {ParameterSet} from "../parameter/ParameterSet.js";
|
|
18
|
+
import {ParticleParameter} from "../parameter/ParticleParameter.js";
|
|
19
|
+
import {update_parameters} from "../simulator/update_parameters.js";
|
|
20
|
+
import {computeEmissionFunction} from "./computeEmissionFunction.js";
|
|
18
21
|
import {
|
|
19
22
|
PARTICLE_ATTRIBUTE_AGE,
|
|
20
23
|
PARTICLE_ATTRIBUTE_BLEND,
|
|
@@ -28,13 +31,11 @@ import {
|
|
|
28
31
|
PARTICLE_ATTRIBUTE_UV,
|
|
29
32
|
PARTICLE_ATTRIBUTE_VELOCITY
|
|
30
33
|
} from "./PARTICLE_ATTRIBUTES.js";
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { v3_dot_array_array } from "../../../../../../core/geom/vec3/v3_dot_array_array.js";
|
|
37
|
-
import { compose_matrix4_array } from "../../../../../../core/geom/3d/compose_matrix4_array.js";
|
|
34
|
+
import {ParticleEmitterFlag} from "./ParticleEmitterFlag.js";
|
|
35
|
+
import {ParticleLayer} from "./ParticleLayer.js";
|
|
36
|
+
import {ParticleParameters} from "./ParticleParameters.js";
|
|
37
|
+
import {ParticlePool} from "./ParticlePool.js";
|
|
38
|
+
import {PARTICULAR_PARTICLE_SPECIFICATION} from "./PARTICULAR_PARTICLE_SPECIFICATION.js";
|
|
38
39
|
|
|
39
40
|
const EMPTY_GEOMETRY = new BufferGeometry();
|
|
40
41
|
|
|
@@ -111,7 +112,13 @@ function write_particle_patch_uv(patch, particles, ref) {
|
|
|
111
112
|
);
|
|
112
113
|
}
|
|
113
114
|
|
|
115
|
+
let id_counter = 0;
|
|
116
|
+
|
|
114
117
|
export class ParticleEmitter {
|
|
118
|
+
/**
|
|
119
|
+
* @type {number}
|
|
120
|
+
*/
|
|
121
|
+
id = id_counter++;
|
|
115
122
|
|
|
116
123
|
/**
|
|
117
124
|
* @private
|
|
@@ -160,13 +167,14 @@ export class ParticleEmitter {
|
|
|
160
167
|
mesh = null;
|
|
161
168
|
|
|
162
169
|
/**
|
|
163
|
-
*
|
|
164
|
-
* @type {
|
|
170
|
+
* @readonly
|
|
171
|
+
* @type {EBBVHLeafProxy}
|
|
165
172
|
*/
|
|
166
|
-
|
|
173
|
+
bvh_leaf = new EBBVHLeafProxy();
|
|
174
|
+
|
|
167
175
|
|
|
168
176
|
/**
|
|
169
|
-
*
|
|
177
|
+
* Upper-bound of bounds for an individual particle
|
|
170
178
|
* @type {AABB3}
|
|
171
179
|
*/
|
|
172
180
|
particleBounds = new AABB3(Infinity, Infinity, Infinity, -Infinity, -Infinity, -Infinity);
|
|
@@ -542,21 +550,9 @@ export class ParticleEmitter {
|
|
|
542
550
|
const ebb = this.emissionBounds;
|
|
543
551
|
const pbb = this.particleBounds;
|
|
544
552
|
|
|
545
|
-
|
|
546
|
-
const bounds_y0 = min2(ebb.y0, pbb.y0);
|
|
547
|
-
const bounds_z0 = min2(ebb.z0, pbb.z0);
|
|
548
|
-
|
|
549
|
-
const bounds_x1 = max2(ebb.x1, pbb.x1);
|
|
550
|
-
const bounds_y1 = max2(ebb.y1, pbb.y1);
|
|
551
|
-
const bounds_z1 = max2(ebb.z1, pbb.z1);
|
|
553
|
+
aabb3_array_combine(this.bvh_leaf.bounds, ebb, pbb);
|
|
552
554
|
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
bvhLeaf.setBounds(bounds_x0, bounds_y0, bounds_z0, bounds_x1, bounds_y1, bounds_z1);
|
|
556
|
-
|
|
557
|
-
if (bvhLeaf.parentNode !== null) {
|
|
558
|
-
bvhLeaf.parentNode.bubbleRefit();
|
|
559
|
-
}
|
|
555
|
+
this.bvh_leaf.write_bounds();
|
|
560
556
|
|
|
561
557
|
}
|
|
562
558
|
|
|
@@ -1221,7 +1217,7 @@ ParticleEmitter.SERIALIZABLE_FLAGS = SERIALIZABLE_FLAGS;
|
|
|
1221
1217
|
|
|
1222
1218
|
const matrix4 = new Float32Array(16);
|
|
1223
1219
|
|
|
1224
|
-
const defaultPointsMaterial = new PointsMaterial({
|
|
1220
|
+
const defaultPointsMaterial = new PointsMaterial({color: 0xFFFFFF});
|
|
1225
1221
|
|
|
1226
1222
|
const frustum = new Frustum();
|
|
1227
1223
|
|
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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";
|
|
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
12
|
import {
|
|
13
13
|
shape_to_visual_entity,
|
|
14
14
|
SHAPE_VISUAL_ENTITY_TAG
|
|
@@ -16,19 +16,18 @@ import {
|
|
|
16
16
|
import Vector1 from "../../../../../../../core/geom/Vector1.js";
|
|
17
17
|
import Vector2 from "../../../../../../../core/geom/Vector2.js";
|
|
18
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";
|
|
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
25
|
import ButtonView from "../../../../../../../view/elements/button/ButtonView.js";
|
|
26
|
-
import {CanvasView} from "../../../../../../../view/elements/CanvasView.js";
|
|
26
|
+
import { CanvasView } from "../../../../../../../view/elements/CanvasView.js";
|
|
27
27
|
import EmptyView from "../../../../../../../view/elements/EmptyView.js";
|
|
28
|
-
import {AttachmentSystem} from "../../../../../../ecs/attachment/AttachmentSystem.js";
|
|
28
|
+
import { AttachmentSystem } from "../../../../../../ecs/attachment/AttachmentSystem.js";
|
|
29
29
|
import Entity from "../../../../../../ecs/Entity.js";
|
|
30
|
-
import {
|
|
31
|
-
import {pick} from "../../../../../../ecs/grid/pick.js";
|
|
30
|
+
import { pick } from "../../../../../../ecs/grid/pick.js";
|
|
32
31
|
import GUIElement from "../../../../../../ecs/gui/GUIElement.js";
|
|
33
32
|
import GUIElementSystem from "../../../../../../ecs/gui/GUIElementSystem.js";
|
|
34
33
|
import HeadsUpDisplay from "../../../../../../ecs/gui/hud/HeadsUpDisplay.js";
|
|
@@ -41,44 +40,44 @@ import RenderSystem from "../../../../../../ecs/systems/RenderSystem.js";
|
|
|
41
40
|
import TagSystem from "../../../../../../ecs/systems/TagSystem.js";
|
|
42
41
|
import ClingToTerrainSystem from "../../../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
43
42
|
import TerrainSystem from "../../../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
44
|
-
import {obtainTerrain} from "../../../../../../ecs/terrain/util/obtainTerrain.js";
|
|
45
|
-
import {Transform} from "../../../../../../ecs/transform/Transform.js";
|
|
46
|
-
import {EngineConfiguration} from "../../../../../../EngineConfiguration.js";
|
|
47
|
-
import {EngineHarness} from "../../../../../../EngineHarness.js";
|
|
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";
|
|
48
47
|
import InputController from "../../../../../../input/ecs/components/InputController.js";
|
|
49
48
|
import InputControllerSystem from "../../../../../../input/ecs/systems/InputControllerSystem.js";
|
|
50
|
-
import {InputSystem} from "../../../../../../input/ecs/systems/InputSystem.js";
|
|
51
|
-
import {RepeatBehavior} from "../../../../../../intelligence/behavior/decorator/RepeatBehavior.js";
|
|
52
|
-
import {BehaviorComponent} from "../../../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
53
|
-
import {BehaviorSystem} from "../../../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
54
|
-
import {ActionBehavior} from "../../../../../../intelligence/behavior/primitive/ActionBehavior.js";
|
|
55
|
-
import {SoundEmitterSystem} from "../../../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
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";
|
|
56
55
|
import SoundControllerSystem from "../../../../../../sound/ecs/SoundControllerSystem.js";
|
|
57
56
|
import SoundListenerSystem from "../../../../../../sound/ecs/SoundListenerSystem.js";
|
|
58
|
-
import {CameraSystem} from "../../../../../ecs/camera/CameraSystem.js";
|
|
57
|
+
import { CameraSystem } from "../../../../../ecs/camera/CameraSystem.js";
|
|
59
58
|
import TopDownCameraController from "../../../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
60
59
|
import TopDownCameraControllerSystem from "../../../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
61
60
|
import MeshHighlightSystem from "../../../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
62
61
|
import LightSystem from "../../../../../ecs/light/LightSystem.js";
|
|
63
|
-
import {DrawMode} from "../../../../../ecs/mesh-v2/DrawMode.js";
|
|
64
|
-
import {ShadedGeometry} from "../../../../../ecs/mesh-v2/ShadedGeometry.js";
|
|
65
|
-
import {ShadedGeometrySystem} from "../../../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
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";
|
|
66
65
|
import Mesh from "../../../../../ecs/mesh/Mesh.js";
|
|
67
|
-
import {MeshSystem} from "../../../../../ecs/mesh/MeshSystem.js";
|
|
68
|
-
import {PathDisplaySystem} from "../../../../../ecs/path/PathDisplaySystem.js";
|
|
66
|
+
import { MeshSystem } from "../../../../../ecs/mesh/MeshSystem.js";
|
|
67
|
+
import { PathDisplaySystem } from "../../../../../ecs/path/PathDisplaySystem.js";
|
|
69
68
|
import Trail2DSystem from "../../../../../ecs/trail2d/Trail2DSystem.js";
|
|
70
|
-
import {load_and_set_cubemap_v0} from "../../../../../load_and_set_cubemap_v0.js";
|
|
69
|
+
import { load_and_set_cubemap_v0 } from "../../../../../load_and_set_cubemap_v0.js";
|
|
71
70
|
import {
|
|
72
71
|
AmbientOcclusionPostProcessEffect
|
|
73
72
|
} from "../../../../../render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
74
73
|
import convertSampler2D2Canvas from "../../../../../texture/sampler/Sampler2D2Canvas.js";
|
|
75
|
-
import {threeUpdateTransform} from "../../../../../util/threeUpdateTransform.js";
|
|
76
|
-
import {ParticleEmitterSystem} from "../../../../ecs/ParticleEmitterSystem.js";
|
|
77
|
-
import {ParameterLookupTable} from "../../parameter/ParameterLookupTable.js";
|
|
78
|
-
import {RGBA_LUT_HEATMAP_IR} from "../../parameter/sample/RGBA_LUT_HEATMAP_IR.js";
|
|
79
|
-
import {lut_to_sampler} from "./lut_to_sampler.js";
|
|
80
|
-
import {ParticleVolume} from "./ParticleVolume.js";
|
|
81
|
-
import {SamplingFunctionKind} from "./SamplingFunctionKind.js";
|
|
74
|
+
import { threeUpdateTransform } from "../../../../../util/threeUpdateTransform.js";
|
|
75
|
+
import { ParticleEmitterSystem } from "../../../../ecs/ParticleEmitterSystem.js";
|
|
76
|
+
import { ParameterLookupTable } from "../../parameter/ParameterLookupTable.js";
|
|
77
|
+
import { RGBA_LUT_HEATMAP_IR } from "../../parameter/sample/RGBA_LUT_HEATMAP_IR.js";
|
|
78
|
+
import { lut_to_sampler } from "./lut_to_sampler.js";
|
|
79
|
+
import { ParticleVolume } from "./ParticleVolume.js";
|
|
80
|
+
import { SamplingFunctionKind } from "./SamplingFunctionKind.js";
|
|
82
81
|
|
|
83
82
|
const engineHarness = new EngineHarness();
|
|
84
83
|
|
|
@@ -112,7 +111,6 @@ function makeConfig(engine) {
|
|
|
112
111
|
new ClingToTerrainSystem(),
|
|
113
112
|
new TerrainSystem(graphics, assetManager),
|
|
114
113
|
new Trail2DSystem(engine),
|
|
115
|
-
new Foliage2System(assetManager, graphics),
|
|
116
114
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
117
115
|
new InputControllerSystem(devices),
|
|
118
116
|
new InputSystem(devices),
|
|
@@ -9,22 +9,21 @@ import {
|
|
|
9
9
|
UniformsUtils,
|
|
10
10
|
WebGLRenderTarget
|
|
11
11
|
} from "three";
|
|
12
|
-
import {CopyShader} from "three/examples/jsm/shaders/CopyShader.js";
|
|
12
|
+
import { CopyShader } from "three/examples/jsm/shaders/CopyShader.js";
|
|
13
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";
|
|
14
|
+
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
15
|
+
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
16
16
|
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
17
17
|
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
18
|
-
import {CanvasView} from "../../../../../view/elements/CanvasView.js";
|
|
19
|
-
import {AttachmentSystem} from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
18
|
+
import { CanvasView } from "../../../../../view/elements/CanvasView.js";
|
|
19
|
+
import { AttachmentSystem } from "../../../../ecs/attachment/AttachmentSystem.js";
|
|
20
20
|
import Entity from "../../../../ecs/Entity.js";
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {FogOfWarSystem} from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
21
|
+
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
22
|
+
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
24
23
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
25
24
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
26
25
|
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
27
|
-
import {InverseKinematicsSystem} from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
26
|
+
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
28
27
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
29
28
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
30
29
|
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
@@ -34,34 +33,34 @@ import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
|
34
33
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
35
34
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
36
35
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.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";
|
|
36
|
+
import { Transform } from "../../../../ecs/transform/Transform.js";
|
|
37
|
+
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
38
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
39
|
+
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
41
40
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
42
|
-
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
41
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
43
42
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
44
|
-
import {InputSystem} from "../../../../input/ecs/systems/InputSystem.js";
|
|
45
|
-
import {BehaviorSystem} from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
43
|
+
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
44
|
+
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
46
45
|
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
47
|
-
import {SoundEmitterSystem} from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
46
|
+
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
48
47
|
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
49
48
|
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
50
49
|
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
51
|
-
import {AnimationGraphSystem} from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
52
|
-
import {CameraSystem} from "../../../ecs/camera/CameraSystem.js";
|
|
50
|
+
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
51
|
+
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
53
52
|
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
54
|
-
import {TopDownCameraLanderSystem} from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
53
|
+
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
55
54
|
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
56
55
|
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
57
56
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
58
|
-
import {MeshSystem} from "../../../ecs/mesh/MeshSystem.js";
|
|
59
|
-
import {PathDisplaySystem} from "../../../ecs/path/PathDisplaySystem.js";
|
|
57
|
+
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
58
|
+
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
60
59
|
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
61
60
|
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";
|
|
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";
|
|
65
64
|
|
|
66
65
|
const engineHarness = new EngineHarness();
|
|
67
66
|
|
|
@@ -103,7 +102,6 @@ function makeConfig(engine) {
|
|
|
103
102
|
new TerrainSystem(graphics, assetManager),
|
|
104
103
|
new WaterSystem(graphics),
|
|
105
104
|
new Trail2DSystem(engine),
|
|
106
|
-
new Foliage2System(assetManager, graphics),
|
|
107
105
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
108
106
|
new GridPosition2TransformSystem(),
|
|
109
107
|
new Transform2GridPositionSystem(),
|
|
@@ -8,31 +8,30 @@ import {
|
|
|
8
8
|
TorusKnotBufferGeometry
|
|
9
9
|
} from "three";
|
|
10
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";
|
|
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";
|
|
16
16
|
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
17
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";
|
|
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";
|
|
26
26
|
import Entity from "../../../../ecs/Entity.js";
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {FogOfWarSystem} from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
27
|
+
import { FogOfWar } from "../../../../ecs/fow/FogOfWar.js";
|
|
28
|
+
import { FogOfWarRevealer } from "../../../../ecs/fow/FogOfWarRevealer.js";
|
|
29
|
+
import { FogOfWarRevealerSystem } from "../../../../ecs/fow/FogOfWarRevealerSystem.js";
|
|
30
|
+
import { FogOfWarSystem } from "../../../../ecs/fow/FogOfWarSystem.js";
|
|
32
31
|
import GUIElementSystem from "../../../../ecs/gui/GUIElementSystem.js";
|
|
33
32
|
import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
34
33
|
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
35
|
-
import {InverseKinematicsSystem} from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
34
|
+
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
36
35
|
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
37
36
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
38
37
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
@@ -44,42 +43,42 @@ import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
|
44
43
|
import Team from "../../../../ecs/team/Team.js";
|
|
45
44
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
46
45
|
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";
|
|
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";
|
|
52
51
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
53
|
-
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
52
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
54
53
|
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";
|
|
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";
|
|
58
57
|
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
59
|
-
import {SoundEmitterSystem} from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
58
|
+
import { SoundEmitterSystem } from "../../../../sound/ecs/emitter/SoundEmitterSystem.js";
|
|
60
59
|
import SoundControllerSystem from "../../../../sound/ecs/SoundControllerSystem.js";
|
|
61
60
|
import SoundListenerSystem from "../../../../sound/ecs/SoundListenerSystem.js";
|
|
62
61
|
import AnimationControllerSystem from "../../../ecs/animation/AnimationControllerSystem.js";
|
|
63
|
-
import {AnimationGraphSystem} from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
64
|
-
import {CameraSystem} from "../../../ecs/camera/CameraSystem.js";
|
|
62
|
+
import { AnimationGraphSystem } from "../../../ecs/animation/animator/AnimationGraphSystem.js";
|
|
63
|
+
import { CameraSystem } from "../../../ecs/camera/CameraSystem.js";
|
|
65
64
|
import TopDownCameraController from "../../../ecs/camera/topdown/TopDownCameraController.js";
|
|
66
65
|
import TopDownCameraControllerSystem from "../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
|
|
67
|
-
import {TopDownCameraLanderSystem} from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
66
|
+
import { TopDownCameraLanderSystem } from "../../../ecs/camera/topdown/TopDownCameraLanderSystem.js";
|
|
68
67
|
import MeshHighlightSystem from "../../../ecs/highlight/system/MeshHighlightSystem.js";
|
|
69
|
-
import {Light} from "../../../ecs/light/Light.js";
|
|
68
|
+
import { Light } from "../../../ecs/light/Light.js";
|
|
70
69
|
import LightSystem from "../../../ecs/light/LightSystem.js";
|
|
71
|
-
import {LightType} from "../../../ecs/light/LightType.js";
|
|
72
|
-
import {ShadedGeometrySystem} from "../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
70
|
+
import { LightType } from "../../../ecs/light/LightType.js";
|
|
71
|
+
import { ShadedGeometrySystem } from "../../../ecs/mesh-v2/ShadedGeometrySystem.js";
|
|
73
72
|
import Mesh from "../../../ecs/mesh/Mesh.js";
|
|
74
|
-
import {MeshSystem} from "../../../ecs/mesh/MeshSystem.js";
|
|
75
|
-
import {PathDisplaySystem} from "../../../ecs/path/PathDisplaySystem.js";
|
|
73
|
+
import { MeshSystem } from "../../../ecs/mesh/MeshSystem.js";
|
|
74
|
+
import { PathDisplaySystem } from "../../../ecs/path/PathDisplaySystem.js";
|
|
76
75
|
import Trail2DSystem from "../../../ecs/trail2d/Trail2DSystem.js";
|
|
77
76
|
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";
|
|
77
|
+
import { ParticleEmitterSystem } from "../../../particles/ecs/ParticleEmitterSystem.js";
|
|
78
|
+
import { ParticleEmitter } from "../../../particles/particular/engine/emitter/ParticleEmitter.js";
|
|
80
79
|
import ThreeFactory from "../../../three/ThreeFactory.js";
|
|
81
|
-
import {AmbientOcclusionPostProcessEffect} from "../../buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
82
|
-
import {ForwardPlusRenderingPlugin} from "./ForwardPlusRenderingPlugin.js";
|
|
80
|
+
import { AmbientOcclusionPostProcessEffect } from "../../buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
|
|
81
|
+
import { ForwardPlusRenderingPlugin } from "./ForwardPlusRenderingPlugin.js";
|
|
83
82
|
|
|
84
83
|
const geo_light_center_octahedron = new BoxBufferGeometry(0.1, 0.1, 0.1);
|
|
85
84
|
const engineHarness = new EngineHarness();
|
|
@@ -131,7 +130,6 @@ function makeConfig(engine) {
|
|
|
131
130
|
new TerrainSystem(graphics, assetManager),
|
|
132
131
|
new WaterSystem(graphics),
|
|
133
132
|
new Trail2DSystem(engine),
|
|
134
|
-
new Foliage2System(assetManager, graphics),
|
|
135
133
|
new ViewportPositionSystem(graphics.viewport.size),
|
|
136
134
|
new GridPosition2TransformSystem(),
|
|
137
135
|
new Transform2GridPositionSystem(),
|