@woosh/meep-engine 2.60.1 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/meep.cjs +20117 -20157
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +20117 -20157
- package/package.json +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.js +30 -182
- package/src/core/geom/3d/sphere/harmonics/sh3_dering_optimize_positive.spec.js +27 -1
- package/src/core/geom/ConicRay.js +16 -21
- package/src/core/geom/ConicRay.spec.js +24 -0
- package/src/core/geom/packing/miniball/Miniball.js +68 -117
- package/src/core/geom/packing/miniball/Miniball.spec.js +3 -3
- package/src/core/geom/packing/miniball/Subspan.js +47 -34
- package/src/core/geom/packing/miniball/miniball_compute_quality.js +64 -0
- package/src/core/math/bessel_3.js +1 -0
- package/src/core/math/random/randomBytes.js +2 -2
- package/src/core/math/sqr.js +8 -0
- package/src/core/model/node-graph/Connection.js +21 -23
- package/src/core/model/node-graph/DataType.js +16 -17
- package/src/core/model/node-graph/NodeGraph.js +49 -50
- package/src/core/model/node-graph/node/NodeDescription.js +42 -44
- package/src/core/model/node-graph/node/NodeInstance.js +59 -60
- package/src/core/model/node-graph/node/NodeInstancePortReference.js +27 -29
- package/src/core/model/node-graph/node/NodeRegistry.js +16 -18
- package/src/core/model/node-graph/node/Port.js +35 -37
- package/src/core/model/node-graph/node/parameter/NodeParameterDescription.js +27 -13
- package/src/core/path/computePathDirectory.spec.js +8 -0
- package/src/core/process/BaseProcess.d.ts +5 -0
- package/src/core/process/WatchDog.js +76 -75
- package/src/core/process/action/AsynchronousAction.js +24 -22
- package/src/core/process/executor/profile/Profile.js +34 -24
- package/src/core/process/executor/profile/TraceEvent.js +75 -75
- package/src/core/process/worker/OnDemandWorkerManager.js +27 -30
- package/src/core/process/worker/WorkerBuilder.js +149 -149
- package/src/core/process/worker/WorkerProxy.js +25 -21
- package/src/core/process/worker/extractTransferables.js +2 -2
- package/src/engine/Engine.js +58 -53
- package/src/engine/EngineConfiguration.d.ts +4 -4
- package/src/engine/ecs/EntityManager.js +517 -614
- package/src/engine/ecs/System.js +2 -2
- package/src/engine/ecs/transform/Transform.d.ts +7 -5
- package/src/engine/ecs/transform/Transform.js +30 -16
- package/src/engine/ecs/validateSystem.js +89 -0
- package/src/engine/graphics/GraphicsEngine.js +433 -483
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +46 -48
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +2 -2
- package/src/engine/graphics/ecs/mesh-v2/aggregate/SGMeshSystem.js +2 -2
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +60 -62
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +20 -22
- package/src/engine/graphics/particles/particular/engine/ParticularEngine.js +156 -180
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +69 -71
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +51 -53
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +67 -69
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +56 -58
- package/src/engine/graphics/shadows/testShadowMapRendering.js +30 -34
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.spec.js +22 -20
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_linear.js +10 -13
- package/src/engine/graphics/texture/virtual/VirtualTexture.spec.js +1 -1
- package/src/engine/plugin/EnginePluginManager.d.ts +6 -1
- package/src/engine/ecs/components/ClingToHeightMap.js +0 -19
- package/src/engine/ecs/components/SynchronizePosition.js +0 -15
- package/src/engine/ecs/systems/ClingToHeightMapSystem.js +0 -170
- package/src/engine/ecs/systems/SynchronizePositionSystem.js +0 -43
|
@@ -1,267 +1,243 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
-
|
|
16
|
+
camera = null;
|
|
25
17
|
|
|
26
18
|
/**
|
|
27
19
|
* Managed emitters
|
|
28
20
|
* @type {List.<ParticleEmitter>}
|
|
29
21
|
*/
|
|
30
|
-
|
|
22
|
+
emitters = new List();
|
|
31
23
|
|
|
32
|
-
|
|
33
|
-
this.bvh.setNegativelyInfiniteBounds();
|
|
24
|
+
bvh = new BinaryNode();
|
|
34
25
|
|
|
35
26
|
|
|
36
27
|
/**
|
|
37
28
|
*
|
|
38
29
|
* @type {AbstractSimulationStep[]}
|
|
39
30
|
*/
|
|
40
|
-
|
|
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
|
-
|
|
58
|
-
|
|
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
|
-
|
|
47
|
+
this.bvh.setNegativelyInfiniteBounds();
|
|
48
|
+
}
|
|
61
49
|
|
|
62
|
-
|
|
50
|
+
/**
|
|
51
|
+
*
|
|
52
|
+
* @param {ParticleEmitter} emitter
|
|
53
|
+
*/
|
|
54
|
+
add(emitter) {
|
|
55
|
+
if (!emitter.getFlag(ParticleEmitterFlag.Built)) {
|
|
56
|
+
emitter.build();
|
|
57
|
+
}
|
|
63
58
|
|
|
64
|
-
|
|
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
|
-
|
|
64
|
+
this.shaderManager.register(emitter);
|
|
75
65
|
|
|
76
|
-
|
|
77
|
-
emitters.remove(i);
|
|
66
|
+
this.bvh.insertNode(emitter.bvhLeaf);
|
|
78
67
|
}
|
|
79
68
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
78
|
+
if (!removed) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
97
81
|
|
|
98
|
-
|
|
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
|
-
* @
|
|
91
|
+
* @param {THREE.Camera} camera
|
|
114
92
|
*/
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
93
|
+
setCamera(camera) {
|
|
94
|
+
this.camera = camera;
|
|
95
|
+
this.shaderManager.setCamera(camera);
|
|
96
|
+
}
|
|
118
97
|
|
|
119
|
-
|
|
98
|
+
setDepthTexture(texture) {
|
|
99
|
+
this.shaderManager.setDepthTexture(texture);
|
|
100
|
+
}
|
|
120
101
|
|
|
121
|
-
|
|
102
|
+
setViewportSize(x, y) {
|
|
103
|
+
this.shaderManager.setViewportSize(x, y);
|
|
104
|
+
}
|
|
122
105
|
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* @type {List<ParticleLayer>}
|
|
118
|
+
*/
|
|
119
|
+
const layers = emitter.layers;
|
|
129
120
|
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
*
|
|
133
|
-
* @type {SimulationStepDefinition}
|
|
134
|
-
*/
|
|
135
|
-
const stepDefinition = simulationStepDefinitions.get(i);
|
|
121
|
+
const layer_count = layers.length;
|
|
136
122
|
|
|
137
|
-
|
|
123
|
+
let step_mask = 0;
|
|
138
124
|
|
|
139
|
-
|
|
125
|
+
const steps = this.steps;
|
|
140
126
|
|
|
141
|
-
|
|
127
|
+
for (j = 0; j < layer_count; j++) {
|
|
128
|
+
const particleLayer = layers.get(j);
|
|
142
129
|
|
|
143
|
-
|
|
144
|
-
// no step definition
|
|
145
|
-
continue;
|
|
146
|
-
}
|
|
130
|
+
const simulationStepDefinitions = particleLayer.steps;
|
|
147
131
|
|
|
148
|
-
|
|
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
|
-
|
|
158
|
-
const step_index_limit = steps.length;
|
|
141
|
+
const type = stepDefinition.type;
|
|
159
142
|
|
|
160
|
-
|
|
161
|
-
const m = 1 << i;
|
|
162
|
-
const is_used = (step_mask & m) !== 0;
|
|
143
|
+
step_mask |= 1 << type;
|
|
163
144
|
|
|
164
|
-
|
|
165
|
-
const step = steps[i];
|
|
145
|
+
const step = steps[type];
|
|
166
146
|
|
|
167
|
-
|
|
147
|
+
if (step === undefined) {
|
|
148
|
+
// no step definition
|
|
149
|
+
continue;
|
|
150
|
+
}
|
|
168
151
|
|
|
169
|
-
|
|
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
|
-
|
|
158
|
+
}
|
|
172
159
|
}
|
|
173
|
-
}
|
|
174
160
|
|
|
175
|
-
|
|
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
|
-
|
|
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
|
-
|
|
190
|
-
emitter.initialize();
|
|
191
|
-
}
|
|
171
|
+
step.layer_count = layer_count;
|
|
192
172
|
|
|
193
|
-
|
|
194
|
-
//emitter was sleeping, need to catch up the simulation
|
|
195
|
-
const maxParticleLife = emitter.computeMaxEmittingParticleLife();
|
|
173
|
+
step.execute();
|
|
196
174
|
|
|
197
|
-
|
|
175
|
+
step.clear();
|
|
176
|
+
}
|
|
177
|
+
}
|
|
198
178
|
|
|
199
|
-
|
|
179
|
+
emitter.advance(timeDelta);
|
|
200
180
|
|
|
201
|
-
|
|
181
|
+
}
|
|
202
182
|
|
|
203
|
-
|
|
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
|
-
|
|
206
|
-
|
|
193
|
+
if (!emitter.getFlag(ParticleEmitterFlag.Initialized)) {
|
|
194
|
+
emitter.initialize();
|
|
195
|
+
}
|
|
207
196
|
|
|
208
|
-
|
|
197
|
+
if (emitter.sleepTime > 0) {
|
|
198
|
+
//emitter was sleeping, need to catch up the simulation
|
|
199
|
+
const maxParticleLife = emitter.computeMaxEmittingParticleLife();
|
|
209
200
|
|
|
210
|
-
wakingTime
|
|
211
|
-
}
|
|
201
|
+
let wakingTime = Math.min(emitter.sleepTime, maxParticleLife - timeDelta);
|
|
212
202
|
|
|
213
|
-
|
|
214
|
-
emitter.sleepTime = 0;
|
|
215
|
-
}
|
|
216
|
-
//advance simulation
|
|
217
|
-
this.advanceEmitter(emitter, timeDelta);
|
|
203
|
+
const minWakingIncrement = 0.15;
|
|
218
204
|
|
|
219
|
-
|
|
220
|
-
emitter.computeBoundingBox();
|
|
221
|
-
}
|
|
222
|
-
};
|
|
205
|
+
const maxWakingSteps = 10;
|
|
223
206
|
|
|
224
|
-
|
|
225
|
-
const emitters = this.emitters;
|
|
207
|
+
const wakingIncrement = Math.max(wakingTime / maxWakingSteps, minWakingIncrement);
|
|
226
208
|
|
|
227
|
-
|
|
209
|
+
while (wakingTime > 0) {
|
|
210
|
+
const wakingStep = Math.min(wakingIncrement, wakingTime);
|
|
228
211
|
|
|
229
|
-
|
|
230
|
-
const emitter = emitters.get(i);
|
|
231
|
-
if (!emitter.getFlag(ParticleEmitterFlag.Sleeping)) {
|
|
212
|
+
this.advanceEmitter(emitter, wakingStep);
|
|
232
213
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
}
|
|
236
|
-
};
|
|
214
|
+
wakingTime -= wakingStep;
|
|
215
|
+
}
|
|
237
216
|
|
|
238
|
-
|
|
239
|
-
|
|
217
|
+
//consume the sleep time
|
|
218
|
+
emitter.sleepTime = 0;
|
|
219
|
+
}
|
|
240
220
|
|
|
241
|
-
|
|
221
|
+
//advance simulation
|
|
222
|
+
this.advanceEmitter(emitter, timeDelta);
|
|
242
223
|
|
|
243
|
-
|
|
244
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @param {number} timeDelta
|
|
232
|
+
*/
|
|
233
|
+
advance(timeDelta) {
|
|
234
|
+
const emitters = this.emitters;
|
|
258
235
|
|
|
259
|
-
|
|
236
|
+
const numEmitters = emitters.length;
|
|
260
237
|
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
+
}
|
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -1,85 +1,84 @@
|
|
|
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 {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
|
|
6
|
-
import
|
|
7
|
-
import
|
|
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
|
|
12
|
-
import
|
|
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
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import
|
|
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 {
|
|
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 {
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import {
|
|
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
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
|
|
57
|
-
|
|
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),
|