@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.
Files changed (65) hide show
  1. package/build/meep.cjs +20211 -20240
  2. package/build/meep.min.js +1 -1
  3. package/build/meep.module.js +20211 -20240
  4. package/package.json +1 -1
  5. package/src/core/binary/BitSet.js +1 -1
  6. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +30 -182
  7. package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.spec.js +27 -1
  8. package/src/core/geom/ConicRay.js +16 -21
  9. package/src/core/geom/ConicRay.spec.js +24 -0
  10. package/src/core/geom/packing/miniball/Miniball.js +68 -117
  11. package/src/core/geom/packing/miniball/Miniball.spec.js +3 -3
  12. package/src/core/geom/packing/miniball/Subspan.js +47 -34
  13. package/src/core/geom/packing/miniball/miniball_compute_quality.js +64 -0
  14. package/src/core/math/bessel_3.js +1 -0
  15. package/src/core/math/random/randomBytes.js +2 -2
  16. package/src/core/math/sqr.js +8 -0
  17. package/src/core/model/node-graph/Connection.js +21 -23
  18. package/src/core/model/node-graph/DataType.js +16 -17
  19. package/src/core/model/node-graph/NodeGraph.js +49 -50
  20. package/src/core/model/node-graph/node/NodeDescription.js +42 -44
  21. package/src/core/model/node-graph/node/NodeInstance.js +59 -60
  22. package/src/core/model/node-graph/node/NodeInstancePortReference.js +27 -29
  23. package/src/core/model/node-graph/node/NodeRegistry.js +16 -18
  24. package/src/core/model/node-graph/node/Port.js +35 -37
  25. package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +27 -13
  26. package/src/core/path/computePathDirectory.spec.js +8 -0
  27. package/src/core/process/BaseProcess.d.ts +5 -0
  28. package/src/core/process/WatchDog.js +76 -75
  29. package/src/core/process/action/AsynchronousAction.js +24 -22
  30. package/src/core/process/executor/profile/Profile.js +34 -24
  31. package/src/core/process/executor/profile/TraceEvent.js +75 -75
  32. package/src/core/process/worker/OnDemandWorkerManager.js +27 -30
  33. package/src/core/process/worker/WorkerBuilder.js +149 -149
  34. package/src/core/process/worker/WorkerProxy.js +25 -21
  35. package/src/core/process/worker/extractTransferables.js +2 -2
  36. package/src/engine/Engine.js +58 -53
  37. package/src/engine/EngineConfiguration.d.ts +4 -4
  38. package/src/engine/ecs/EntityManager.js +517 -614
  39. package/src/engine/ecs/System.js +2 -2
  40. package/src/engine/ecs/transform/Transform.d.ts +7 -5
  41. package/src/engine/ecs/transform/Transform.js +30 -16
  42. package/src/engine/ecs/validateSystem.js +89 -0
  43. package/src/engine/graphics/GraphicsEngine.js +433 -483
  44. package/src/engine/graphics/camera/testClippingPlaneComputation.js +46 -48
  45. package/src/engine/graphics/ecs/camera/Camera.js +11 -11
  46. package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
  47. package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -2
  48. package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +2 -2
  49. package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +60 -62
  50. package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +20 -22
  51. package/src/engine/graphics/geometry/instancing/InstancedMeshGroup.js +15 -4
  52. package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +156 -180
  53. package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +69 -71
  54. package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +51 -53
  55. package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +67 -69
  56. package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +56 -58
  57. package/src/engine/graphics/shadows/testShadowMapRendering.js +30 -34
  58. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.spec.js +22 -20
  59. package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.js +10 -13
  60. package/src/engine/graphics/texture/virtual/VirtualTexture.spec.js +1 -1
  61. package/src/engine/plugin/EnginePluginManager.d.ts +6 -1
  62. package/src/engine/ecs/components/ClingToHeightMap.js +0 -19
  63. package/src/engine/ecs/components/SynchronizePosition.js +0 -15
  64. package/src/engine/ecs/systems/ClingToHeightMapSystem.js +0 -170
  65. package/src/engine/ecs/systems/SynchronizePositionSystem.js +0 -43
@@ -1,267 +1,243 @@
1
- import { ShaderManager } from "./shader/ShaderManager.js";
2
- import { BinaryNode } from "../../../../../core/bvh2/BinaryNode.js";
1
+ import {BinaryNode} from "../../../../../core/bvh2/BinaryNode.js";
3
2
  import List from "../../../../../core/collection/list/List.js";
4
- import { ParticleEmitterFlag } from "./emitter/ParticleEmitterFlag.js";
5
- import { SimulationStepFixedPhysics } from "./simulator/SimulationStepFixedPhysics.js";
6
- import { SimulationStepCurlNoiseAcceleration } from "./simulator/SimulationStepCurlNoiseAcceleration.js";
7
- import { SimulationStepApplyForce } from "./simulator/SimulationStepApplyForce.js";
8
- import { SimulationStepCurlNoiseVelocity } from "./simulator/SimulationStepCurlNoiseVelocity.js";
9
-
10
-
11
- /**
12
- *
13
- * @param {AssetManager} assetManager
14
- * @param {MaterialManager} material_manager
15
- * @constructor
16
- */
17
- function ParticularEngine(assetManager, material_manager) {
18
- this.shaderManager = new ShaderManager(assetManager, material_manager);
3
+ import {ParticleEmitterFlag} from "./emitter/ParticleEmitterFlag.js";
4
+ import {ShaderManager} from "./shader/ShaderManager.js";
5
+ import {SimulationStepApplyForce} from "./simulator/SimulationStepApplyForce.js";
6
+ import {SimulationStepCurlNoiseAcceleration} from "./simulator/SimulationStepCurlNoiseAcceleration.js";
7
+ import {SimulationStepCurlNoiseVelocity} from "./simulator/SimulationStepCurlNoiseVelocity.js";
8
+ import {SimulationStepFixedPhysics} from "./simulator/SimulationStepFixedPhysics.js";
19
9
 
10
+
11
+ export class ParticularEngine {
20
12
  /**
21
13
  *
22
14
  * @type {THREE.Camera|null}
23
15
  */
24
- this.camera = null;
16
+ camera = null;
25
17
 
26
18
  /**
27
19
  * Managed emitters
28
20
  * @type {List.<ParticleEmitter>}
29
21
  */
30
- this.emitters = new List();
22
+ emitters = new List();
31
23
 
32
- this.bvh = new BinaryNode();
33
- this.bvh.setNegativelyInfiniteBounds();
24
+ bvh = new BinaryNode();
34
25
 
35
26
 
36
27
  /**
37
28
  *
38
29
  * @type {AbstractSimulationStep[]}
39
30
  */
40
- this.steps = [
31
+ steps = [
41
32
  new SimulationStepFixedPhysics(),
42
33
  new SimulationStepCurlNoiseAcceleration(),
43
34
  new SimulationStepCurlNoiseVelocity(),
44
35
  new SimulationStepApplyForce()
45
36
  ];
46
- }
47
-
48
- /**
49
- *
50
- * @param {ParticleEmitter} emitter
51
- */
52
- ParticularEngine.prototype.add = function (emitter) {
53
- if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
54
- emitter.build();
55
- }
56
37
 
57
- //mark sprites for update as their UVs might have changed since last usage
58
- emitter.setFlag(ParticleEmitterFlag.SpritesNeedUpdate);
38
+ /**
39
+ *
40
+ * @param {AssetManager} assetManager
41
+ * @param {MaterialManager} material_manager
42
+ * @constructor
43
+ */
44
+ constructor(assetManager, material_manager) {
45
+ this.shaderManager = new ShaderManager(assetManager, material_manager);
59
46
 
60
- this.emitters.add(emitter);
47
+ this.bvh.setNegativelyInfiniteBounds();
48
+ }
61
49
 
62
- this.shaderManager.register(emitter);
50
+ /**
51
+ *
52
+ * @param {ParticleEmitter} emitter
53
+ */
54
+ add(emitter) {
55
+ if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
56
+ emitter.build();
57
+ }
63
58
 
64
- this.bvh.insertNode(emitter.bvhLeaf);
65
- };
59
+ //mark sprites for update as their UVs might have changed since last usage
60
+ emitter.setFlag(ParticleEmitterFlag.SpritesNeedUpdate);
66
61
 
67
- /**
68
- *
69
- * @param {ParticleEmitter} emitter
70
- */
71
- ParticularEngine.prototype.remove = function (emitter) {
72
- const emitters = this.emitters;
62
+ this.emitters.add(emitter);
73
63
 
74
- const i = emitters.indexOf(emitter);
64
+ this.shaderManager.register(emitter);
75
65
 
76
- if (i !== -1) {
77
- emitters.remove(i);
66
+ this.bvh.insertNode(emitter.bvhLeaf);
78
67
  }
79
68
 
80
- this.shaderManager.deregister(emitter);
81
-
82
- emitter.bvhLeaf.disconnect();
83
- };
69
+ /**
70
+ *
71
+ * @param {ParticleEmitter} emitter
72
+ * @returns {boolean}
73
+ */
74
+ remove(emitter) {
84
75
 
85
- /**
86
- *
87
- * @param {THREE.Camera} camera
88
- */
89
- ParticularEngine.prototype.setCamera = function (camera) {
90
- this.camera = camera;
91
- this.shaderManager.setCamera(camera);
92
- };
76
+ const removed = this.emitters.removeOneOf(emitter);
93
77
 
94
- ParticularEngine.prototype.setDepthTexture = function (texture) {
95
- this.shaderManager.setDepthTexture(texture);
96
- };
78
+ if (!removed) {
79
+ return false;
80
+ }
97
81
 
98
- ParticularEngine.prototype.setViewportSize = function (x, y) {
99
- this.shaderManager.setViewportSize(x, y);
100
- };
82
+ this.shaderManager.deregister(emitter);
101
83
 
102
- /**
103
- * @private
104
- * @param {ParticleEmitter} emitter
105
- * @param {number} timeDelta
106
- */
107
- ParticularEngine.prototype.advanceEmitter = function (emitter, timeDelta) {
108
- let i, j;
84
+ emitter.bvhLeaf.disconnect();
109
85
 
86
+ return true;
87
+ }
110
88
 
111
89
  /**
112
90
  *
113
- * @type {List<ParticleLayer>}
91
+ * @param {THREE.Camera} camera
114
92
  */
115
- const layers = emitter.layers;
116
-
117
- const layer_count = layers.length;
93
+ setCamera(camera) {
94
+ this.camera = camera;
95
+ this.shaderManager.setCamera(camera);
96
+ }
118
97
 
119
- let step_mask = 0;
98
+ setDepthTexture(texture) {
99
+ this.shaderManager.setDepthTexture(texture);
100
+ }
120
101
 
121
- const steps = this.steps;
102
+ setViewportSize(x, y) {
103
+ this.shaderManager.setViewportSize(x, y);
104
+ }
122
105
 
123
- for (j = 0; j < layer_count; j++) {
124
- const particleLayer = layers.get(j);
106
+ /**
107
+ * @private
108
+ * @param {ParticleEmitter} emitter
109
+ * @param {number} timeDelta
110
+ */
111
+ advanceEmitter(emitter, timeDelta) {
112
+ let i, j;
125
113
 
126
- const simulationStepDefinitions = particleLayer.steps;
127
114
 
128
- const n = simulationStepDefinitions.length;
115
+ /**
116
+ *
117
+ * @type {List<ParticleLayer>}
118
+ */
119
+ const layers = emitter.layers;
129
120
 
130
- for (i = 0; i < n; i++) {
131
- /**
132
- *
133
- * @type {SimulationStepDefinition}
134
- */
135
- const stepDefinition = simulationStepDefinitions.get(i);
121
+ const layer_count = layers.length;
136
122
 
137
- const type = stepDefinition.type;
123
+ let step_mask = 0;
138
124
 
139
- step_mask |= 1 << type;
125
+ const steps = this.steps;
140
126
 
141
- const step = steps[type];
127
+ for (j = 0; j < layer_count; j++) {
128
+ const particleLayer = layers.get(j);
142
129
 
143
- if (step === undefined) {
144
- // no step definition
145
- continue;
146
- }
130
+ const simulationStepDefinitions = particleLayer.steps;
147
131
 
148
- step.emitter = emitter;
149
- step.timeDelta = timeDelta;
150
- step.particles = emitter.particles;
151
- step.layer_parameters[j] = stepDefinition.parameters;
152
- step.includeLayer(j);
132
+ const n = simulationStepDefinitions.length;
153
133
 
154
- }
155
- }
134
+ for (i = 0; i < n; i++) {
135
+ /**
136
+ *
137
+ * @type {SimulationStepDefinition}
138
+ */
139
+ const stepDefinition = simulationStepDefinitions.get(i);
156
140
 
157
- // apply simulation steps
158
- const step_index_limit = steps.length;
141
+ const type = stepDefinition.type;
159
142
 
160
- for (i = 0; i < step_index_limit; i++) {
161
- const m = 1 << i;
162
- const is_used = (step_mask & m) !== 0;
143
+ step_mask |= 1 << type;
163
144
 
164
- if (is_used) {
165
- const step = steps[i];
145
+ const step = steps[type];
166
146
 
167
- step.layer_count = layer_count;
147
+ if (step === undefined) {
148
+ // no step definition
149
+ continue;
150
+ }
168
151
 
169
- step.execute();
152
+ step.emitter = emitter;
153
+ step.timeDelta = timeDelta;
154
+ step.particles = emitter.particles;
155
+ step.layer_parameters[j] = stepDefinition.parameters;
156
+ step.includeLayer(j);
170
157
 
171
- step.clear();
158
+ }
172
159
  }
173
- }
174
160
 
175
- emitter.advance(timeDelta);
161
+ // apply simulation steps
162
+ const step_index_limit = steps.length;
176
163
 
177
- };
164
+ for (i = 0; i < step_index_limit; i++) {
165
+ const m = 1 << i;
166
+ const is_used = (step_mask & m) !== 0;
178
167
 
179
- /**
180
- * @private
181
- * @param {ParticleEmitter} emitter
182
- * @param {number} timeDelta
183
- */
184
- ParticularEngine.prototype.updateEmitter = function (emitter, timeDelta) {
185
- if (emitter.getFlag(ParticleEmitterFlag.Sleeping)) {
186
- emitter.sleepTime += timeDelta;
187
- } else {
168
+ if (is_used) {
169
+ const step = steps[i];
188
170
 
189
- if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
190
- emitter.initialize();
191
- }
171
+ step.layer_count = layer_count;
192
172
 
193
- if (emitter.sleepTime > 0) {
194
- //emitter was sleeping, need to catch up the simulation
195
- const maxParticleLife = emitter.computeMaxEmittingParticleLife();
173
+ step.execute();
196
174
 
197
- let wakingTime = Math.min(emitter.sleepTime, maxParticleLife - timeDelta);
175
+ step.clear();
176
+ }
177
+ }
198
178
 
199
- const minWakingIncrement = 0.15;
179
+ emitter.advance(timeDelta);
200
180
 
201
- const maxWakingSteps = 10;
181
+ }
202
182
 
203
- const wakingIncrement = Math.max(wakingTime / maxWakingSteps, minWakingIncrement);
183
+ /**
184
+ * @private
185
+ * @param {ParticleEmitter} emitter
186
+ * @param {number} timeDelta
187
+ */
188
+ updateEmitter(emitter, timeDelta) {
189
+ if (emitter.getFlag(ParticleEmitterFlag.Sleeping)) {
190
+ emitter.sleepTime += timeDelta;
191
+ } else {
204
192
 
205
- while (wakingTime > 0) {
206
- const wakingStep = Math.min(wakingIncrement, wakingTime);
193
+ if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
194
+ emitter.initialize();
195
+ }
207
196
 
208
- this.advanceEmitter(emitter, wakingStep);
197
+ if (emitter.sleepTime > 0) {
198
+ //emitter was sleeping, need to catch up the simulation
199
+ const maxParticleLife = emitter.computeMaxEmittingParticleLife();
209
200
 
210
- wakingTime -= wakingStep;
211
- }
201
+ let wakingTime = Math.min(emitter.sleepTime, maxParticleLife - timeDelta);
212
202
 
213
- //consume the sleep time
214
- emitter.sleepTime = 0;
215
- }
216
- //advance simulation
217
- this.advanceEmitter(emitter, timeDelta);
203
+ const minWakingIncrement = 0.15;
218
204
 
219
- //update bounding box
220
- emitter.computeBoundingBox();
221
- }
222
- };
205
+ const maxWakingSteps = 10;
223
206
 
224
- ParticularEngine.prototype.update = function () {
225
- const emitters = this.emitters;
207
+ const wakingIncrement = Math.max(wakingTime / maxWakingSteps, minWakingIncrement);
226
208
 
227
- const numEmitters = emitters.length;
209
+ while (wakingTime > 0) {
210
+ const wakingStep = Math.min(wakingIncrement, wakingTime);
228
211
 
229
- for (let i = 0; i < numEmitters; i++) {
230
- const emitter = emitters.get(i);
231
- if (!emitter.getFlag(ParticleEmitterFlag.Sleeping)) {
212
+ this.advanceEmitter(emitter, wakingStep);
232
213
 
233
- emitter.update();
234
- }
235
- }
236
- };
214
+ wakingTime -= wakingStep;
215
+ }
237
216
 
238
- ParticularEngine.prototype.sortParticles = function () {
239
- const emitters = this.emitters;
217
+ //consume the sleep time
218
+ emitter.sleepTime = 0;
219
+ }
240
220
 
241
- const numEmitters = emitters.length;
221
+ //advance simulation
222
+ this.advanceEmitter(emitter, timeDelta);
242
223
 
243
- for (let i = 0; i < numEmitters; i++) {
244
- const emitter = emitters.get(i);
245
- if (!emitter.getFlag(ParticleEmitterFlag.Sleeping) && emitter.getFlag(ParticleEmitterFlag.DepthSorting)) {
246
- //sort particles by position from camera
247
- emitter.sort(this.camera);
224
+ //update bounding box
225
+ emitter.computeBoundingBox();
248
226
  }
249
227
  }
250
- };
251
228
 
252
- /**
253
- *
254
- * @param {number} timeDelta
255
- */
256
- ParticularEngine.prototype.advance = function (timeDelta) {
257
- const emitters = this.emitters;
229
+ /**
230
+ *
231
+ * @param {number} timeDelta
232
+ */
233
+ advance(timeDelta) {
234
+ const emitters = this.emitters;
258
235
 
259
- const numEmitters = emitters.length;
236
+ const numEmitters = emitters.length;
260
237
 
261
- for (let i = 0; i < numEmitters; i++) {
262
- const emitter = emitters.get(i);
263
- this.updateEmitter(emitter, timeDelta);
238
+ for (let i = 0; i < numEmitters; i++) {
239
+ const emitter = emitters.get(i);
240
+ this.updateEmitter(emitter, timeDelta);
241
+ }
264
242
  }
265
- };
266
-
267
- export { ParticularEngine };
243
+ }
@@ -1,85 +1,84 @@
1
- import { EngineHarness } from "../../../../../../EngineHarness.js";
2
- import { EngineConfiguration } from "../../../../../../EngineConfiguration.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
+ 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 {Foliage2System} from "../../../../../../ecs/foliage/ecs/Foliage2System.js";
31
+ import {pick} from "../../../../../../ecs/grid/pick.js";
32
+ import GUIElement from "../../../../../../ecs/gui/GUIElement.js";
3
33
  import GUIElementSystem from "../../../../../../ecs/gui/GUIElementSystem.js";
34
+ import HeadsUpDisplay from "../../../../../../ecs/gui/hud/HeadsUpDisplay.js";
4
35
  import HeadsUpDisplaySystem from "../../../../../../ecs/gui/hud/HeadsUpDisplaySystem.js";
5
- import TagSystem from "../../../../../../ecs/systems/TagSystem.js";
6
- import { AttachmentSystem } from "../../../../../../ecs/attachment/AttachmentSystem.js";
7
- import { SoundEmitterSystem } from "../../../../../../sound/ecs/emitter/SoundEmitterSystem.js";
8
- import SoundControllerSystem from "../../../../../../sound/ecs/SoundControllerSystem.js";
9
- import SoundListenerSystem from "../../../../../../sound/ecs/SoundListenerSystem.js";
36
+ import ViewportPosition from "../../../../../../ecs/gui/position/ViewportPosition.js";
37
+ import ViewportPositionSystem from "../../../../../../ecs/gui/position/ViewportPositionSystem.js";
38
+ import Renderable from "../../../../../../ecs/renderable/Renderable.js";
10
39
  import AnimationSystem from "../../../../../../ecs/systems/AnimationSystem.js";
11
- import TopDownCameraControllerSystem from "../../../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
12
- import { CameraSystem } from "../../../../../ecs/camera/CameraSystem.js";
13
- import { MeshSystem } from "../../../../../ecs/mesh/MeshSystem.js";
40
+ import RenderSystem from "../../../../../../ecs/systems/RenderSystem.js";
41
+ import TagSystem from "../../../../../../ecs/systems/TagSystem.js";
14
42
  import ClingToTerrainSystem from "../../../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
15
43
  import TerrainSystem from "../../../../../../ecs/terrain/ecs/TerrainSystem.js";
16
- import Trail2DSystem from "../../../../../ecs/trail2d/Trail2DSystem.js";
17
- import { Foliage2System } from "../../../../../../ecs/foliage/ecs/Foliage2System.js";
18
- import ViewportPositionSystem from "../../../../../../ecs/gui/position/ViewportPositionSystem.js";
19
- import SynchronizePositionSystem from "../../../../../../ecs/systems/SynchronizePositionSystem.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";
48
+ import InputController from "../../../../../../input/ecs/components/InputController.js";
20
49
  import InputControllerSystem from "../../../../../../input/ecs/systems/InputControllerSystem.js";
21
- import { InputSystem } from "../../../../../../input/ecs/systems/InputSystem.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";
56
+ import SoundControllerSystem from "../../../../../../sound/ecs/SoundControllerSystem.js";
57
+ import SoundListenerSystem from "../../../../../../sound/ecs/SoundListenerSystem.js";
58
+ import {CameraSystem} from "../../../../../ecs/camera/CameraSystem.js";
59
+ import TopDownCameraController from "../../../../../ecs/camera/topdown/TopDownCameraController.js";
60
+ import TopDownCameraControllerSystem from "../../../../../ecs/camera/topdown/TopDownCameraControllerSystem.js";
22
61
  import MeshHighlightSystem from "../../../../../ecs/highlight/system/MeshHighlightSystem.js";
23
62
  import LightSystem from "../../../../../ecs/light/LightSystem.js";
24
- import { BehaviorSystem } from "../../../../../../intelligence/behavior/ecs/BehaviorSystem.js";
25
- import { PathDisplaySystem } from "../../../../../ecs/path/PathDisplaySystem.js";
26
- import RenderSystem from "../../../../../../ecs/systems/RenderSystem.js";
27
- import { makeEngineOptionsModel } from "../../../../../../../../../model/game/options/makeEngineOptionsModel.js";
28
- import { enableEditor } from "../../../../../../../../editor/enableEditor.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";
66
+ import Mesh from "../../../../../ecs/mesh/Mesh.js";
67
+ import {MeshSystem} from "../../../../../ecs/mesh/MeshSystem.js";
68
+ import {PathDisplaySystem} from "../../../../../ecs/path/PathDisplaySystem.js";
69
+ import Trail2DSystem from "../../../../../ecs/trail2d/Trail2DSystem.js";
70
+ import {load_and_set_cubemap_v0} from "../../../../../load_and_set_cubemap_v0.js";
29
71
  import {
30
72
  AmbientOcclusionPostProcessEffect
31
73
  } from "../../../../../render/buffer/simple-fx/ao/AmbientOcclusionPostProcessEffect.js";
32
- import Vector2 from "../../../../../../../core/geom/Vector2.js";
33
- import Vector3 from "../../../../../../../core/geom/Vector3.js";
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";
39
- 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
- import { ParameterLookupTable } from "../../parameter/ParameterLookupTable.js";
45
- import GUIElement from "../../../../../../ecs/gui/GUIElement.js";
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
74
  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";
54
- 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";
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";
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";
83
82
 
84
83
  const engineHarness = new EngineHarness();
85
84
 
@@ -115,7 +114,6 @@ function makeConfig(engine) {
115
114
  new Trail2DSystem(engine),
116
115
  new Foliage2System(assetManager, graphics),
117
116
  new ViewportPositionSystem(graphics.viewport.size),
118
- new SynchronizePositionSystem(),
119
117
  new InputControllerSystem(devices),
120
118
  new InputSystem(devices),
121
119
  new MeshHighlightSystem(engine),