@woosh/meep-engine 2.59.5 → 2.60.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 +102 -103
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +102 -103
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.js +1 -1
- package/package.json +1 -1
- package/src/core/bvh2/binary/IndexedBinaryBVH.js +2 -1
- package/src/core/bvh2/bvh3/ExplicitBinaryBoundingVolumeHierarchy.js +1 -1
- package/src/core/bvh2/serialization/serializeBinaryNode.js +4 -4
- package/src/core/collection/list/List.js +2 -2
- package/src/core/collection/map/HashMap.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +1 -1
- package/src/core/debug/matchers/DescribeAs.js +2 -2
- package/src/core/debug/matchers/IsIn.js +4 -1
- package/src/core/debug/matchers/matchers.js +1 -1
- package/src/core/events/signal/Signal.js +1 -1
- package/src/core/geom/2d/line/line_segment_compute_line_segment_intersection_vectors_array_2d.js +1 -1
- package/src/core/geom/2d/quad-tree/QuadTreeNode.js +2 -2
- package/src/core/geom/2d/quad-tree/qt_collect_by_circle.js +1 -1
- package/src/core/geom/3d/tetrahedra/TetrahedralMesh.js +1 -1
- package/src/core/geom/3d/tetrahedra/validate_tetrahedral_mesh.js +1 -1
- package/src/core/geom/packing/miniball/Miniball.js +0 -1
- package/src/core/geom/packing/miniball/Subspan.js +1 -3
- package/src/core/graph/coloring/colorizeGraph.js +1 -1
- package/src/core/localization/Localization.js +11 -11
- package/src/core/model/ModuleRegistry.js +4 -4
- package/src/core/primitives/strings/prefixTree/PrefixTree.js +2 -2
- package/src/core/process/buildPromiseChain.js +1 -1
- package/src/core/process/task/Task.js +3 -3
- package/src/core/process/worker/OnDemandWorkerManager.js +1 -1
- package/src/core/process/worker/WorkerProxy.js +1 -1
- package/src/core/process/worker/extractTransferables.js +1 -1
- package/src/engine/EngineConfiguration.js +0 -1
- package/src/engine/EngineHarness.js +1 -1
- package/src/engine/asset/loaders/material/computeTextureEquality.js +2 -2
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityBlueprint.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +4 -4
- package/src/engine/ecs/System.js +1 -1
- package/src/engine/ecs/parent/EntityNode.js +10 -10
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +1 -1
- package/src/engine/graphics/ecs/animation/animator/graph/definition/serialization/readAnimationGraphDefinitionFromJSON.js +4 -4
- package/src/engine/graphics/ecs/camera/CameraSystem.d.ts +2 -3
- package/src/engine/graphics/ecs/camera/CameraSystem.js +2 -3
- package/src/engine/graphics/ecs/mesh-v2/sample/prototypeShadedGeometry.js +3 -3
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +1 -1
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +1 -1
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +2 -2
- package/src/engine/graphics/particles/node-based/simulation/GLSLSimulationShader.js +1 -1
- package/src/engine/graphics/particles/node-based/simulation/TransformFeedback.js +1 -1
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +2 -2
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +1 -1
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +1 -1
- package/src/engine/graphics/render/view/CameraView.js +1 -1
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +1 -1
- package/src/engine/graphics/shaders/ClearShader.js +1 -1
- package/src/engine/graphics/shadows/testShadowMapRendering.js +1 -1
- package/src/engine/input/ecs/components/InputController.js +1 -1
- package/src/engine/knowledge/database/StaticKnowledgeDataTable.js +1 -1
- package/src/misc/makeMaterialIconCached.js +8 -1
|
@@ -118,7 +118,7 @@ function updateNN(NN, a, vertexCount, colors, colorNumber) {
|
|
|
118
118
|
* @param {number[]} NN
|
|
119
119
|
* @param {number[]} color
|
|
120
120
|
* @param {number} colorNumber
|
|
121
|
-
* @return {
|
|
121
|
+
* @return {number[]}
|
|
122
122
|
*/
|
|
123
123
|
function findSuitableY(vertexCount, a, NN, color, colorNumber) {
|
|
124
124
|
var temp, tmp_y, y = 0;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import {distance as levenshtein_distance} from "fastest-levenshtein";
|
|
2
|
+
import {parseTooltipString} from "../../view/tooltip/gml/parser/parseTooltipString.js";
|
|
3
|
+
import {assert} from "../assert.js";
|
|
4
|
+
import {Cache} from "../cache/Cache.js";
|
|
5
|
+
import {computeHashArray} from "../collection/array/computeHashArray.js";
|
|
4
6
|
import ObservedString from "../model/ObservedString.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { computeHashArray } from "../collection/array/computeHashArray.js";
|
|
10
|
-
import { LanguageMetadata } from "./LanguageMetadata.js";
|
|
7
|
+
import {seedVariablesIntoTemplateString} from "../parser/seedVariablesIntoTemplateString.js";
|
|
8
|
+
import {STRING_TEMPLATE_VARIABLE_REGEX} from "../parser/STRING_TEMPLATE_VARIABLE_REGEX.js";
|
|
9
|
+
import {computeStringHash} from "../primitives/strings/computeStringHash.js";
|
|
10
|
+
import {LanguageMetadata} from "./LanguageMetadata.js";
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Validation utility method
|
|
@@ -56,7 +56,7 @@ export class Localization {
|
|
|
56
56
|
this.debug = true;
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
|
-
* @type {Cache<string
|
|
59
|
+
* @type {Cache<Array<string>, string>}
|
|
60
60
|
* @private
|
|
61
61
|
*/
|
|
62
62
|
this.__failure_cache = new Cache({
|
|
@@ -176,7 +176,7 @@ export class Localization {
|
|
|
176
176
|
* @param {number} value
|
|
177
177
|
*/
|
|
178
178
|
formatIntegerByThousands(value) {
|
|
179
|
-
const formatter = new Intl.NumberFormat(this.locale.getValue(), {
|
|
179
|
+
const formatter = new Intl.NumberFormat(this.locale.getValue(), {useGrouping: true});
|
|
180
180
|
|
|
181
181
|
return formatter.format(value);
|
|
182
182
|
}
|
|
@@ -9,7 +9,7 @@ export class ModuleRegistry {
|
|
|
9
9
|
#modules = new Map();
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
|
-
* @type {Map<*,string
|
|
12
|
+
* @type {Map<*,Array<string>>}
|
|
13
13
|
*/
|
|
14
14
|
#reverse_lookup = new Map();
|
|
15
15
|
|
|
@@ -37,7 +37,7 @@ export class ModuleRegistry {
|
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
*
|
|
40
|
-
* @param {(name:string,
|
|
40
|
+
* @param {function(name:string,module:*):void} visitor
|
|
41
41
|
*/
|
|
42
42
|
traverse(visitor) {
|
|
43
43
|
this.#modules.forEach((klass, name) => visitor(name, klass));
|
|
@@ -55,7 +55,7 @@ export class ModuleRegistry {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
58
|
-
* @param {
|
|
58
|
+
* @param {string} name
|
|
59
59
|
* @returns {boolean}
|
|
60
60
|
*/
|
|
61
61
|
has(name) {
|
|
@@ -64,7 +64,7 @@ export class ModuleRegistry {
|
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* @template T
|
|
67
|
-
* @param {
|
|
67
|
+
* @param {string} name
|
|
68
68
|
* @param {T} module
|
|
69
69
|
* @returns {boolean}
|
|
70
70
|
*/
|
|
@@ -74,7 +74,7 @@ export class PrefixTree extends PrefixTreeNode {
|
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
76
|
*
|
|
77
|
-
* @param {[]} result
|
|
77
|
+
* @param {string[]} result
|
|
78
78
|
*/
|
|
79
79
|
collectValues(result) {
|
|
80
80
|
const children = this.children;
|
|
@@ -100,7 +100,7 @@ export class PrefixTree extends PrefixTreeNode {
|
|
|
100
100
|
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
103
|
-
* @param {[]} result
|
|
103
|
+
* @param {string[]} result
|
|
104
104
|
* @param {string} prefix
|
|
105
105
|
*/
|
|
106
106
|
findValuesByPrefix(result, prefix) {
|
|
@@ -5,7 +5,7 @@ import { assert } from "../assert.js";
|
|
|
5
5
|
*
|
|
6
6
|
* @param {Array<function(*):Promise>} factories
|
|
7
7
|
* @param {Promise} [head] chain head, promise to be resolved before rest of the links
|
|
8
|
-
* @param {
|
|
8
|
+
* @param {Array} [parameters] parameters are passed into each factory
|
|
9
9
|
* @returns {Promise}
|
|
10
10
|
*/
|
|
11
11
|
export function buildPromiseChain(
|
|
@@ -55,7 +55,7 @@ class Task {
|
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
57
|
*
|
|
58
|
-
* @type {function(Task, executor:
|
|
58
|
+
* @type {function(Task, executor:ConcurrentExecutor)}
|
|
59
59
|
*/
|
|
60
60
|
this.initialize = initializer;
|
|
61
61
|
|
|
@@ -149,7 +149,7 @@ class Task {
|
|
|
149
149
|
|
|
150
150
|
/**
|
|
151
151
|
*
|
|
152
|
-
* @param {(Task|TaskGroup)
|
|
152
|
+
* @param {Array<(Task|TaskGroup)>} tasks
|
|
153
153
|
*/
|
|
154
154
|
addDependencies(tasks) {
|
|
155
155
|
if (!Array.isArray(tasks)) {
|
|
@@ -205,7 +205,7 @@ class Task {
|
|
|
205
205
|
|
|
206
206
|
/**
|
|
207
207
|
*
|
|
208
|
-
* @param {(Task|TaskGroup)
|
|
208
|
+
* @param {Array<(Task|TaskGroup)>} tasks
|
|
209
209
|
* @return {Promise}
|
|
210
210
|
*/
|
|
211
211
|
static promiseAll(tasks) {
|
|
@@ -184,7 +184,7 @@ export class EngineHarness {
|
|
|
184
184
|
em.addSystem(new TopDownCameraControllerSystem());
|
|
185
185
|
}
|
|
186
186
|
if (em.getSystem(CameraSystem) === null) {
|
|
187
|
-
em.addSystem(new CameraSystem(engine.graphics
|
|
187
|
+
em.addSystem(new CameraSystem(engine.graphics))
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
if (em.getSystem(SoundListenerSystem) === null) {
|
package/src/engine/ecs/Entity.js
CHANGED
|
@@ -140,7 +140,7 @@ class Entity {
|
|
|
140
140
|
* @returns {Entity}
|
|
141
141
|
*/
|
|
142
142
|
add(componentInstance) {
|
|
143
|
-
if (componentInstance === undefined) {
|
|
143
|
+
if (componentInstance === undefined || componentInstance === null) {
|
|
144
144
|
throw new Error(`Can not add ${componentInstance} to Entity`);
|
|
145
145
|
}
|
|
146
146
|
|
|
@@ -381,8 +381,8 @@ export class EntityComponentDataset {
|
|
|
381
381
|
/**
|
|
382
382
|
* Convenience method for retrieving a collection of components for a given entity
|
|
383
383
|
* @param {number} entity ID of the entity
|
|
384
|
-
* @param {
|
|
385
|
-
* @returns {
|
|
384
|
+
* @param {Array} componentClasses Classes of components to extract
|
|
385
|
+
* @returns {Array}
|
|
386
386
|
*/
|
|
387
387
|
getComponents(entity, componentClasses) {
|
|
388
388
|
assert.ok(this.entityExists(entity), `Entity ${entity} doesn't exist`);
|
|
@@ -1094,7 +1094,7 @@ export class EntityComponentDataset {
|
|
|
1094
1094
|
* Performs traversal on a subset of entities which have specified components.
|
|
1095
1095
|
* @example traverseEntities([Transform,Renderable,Tag],function(transform, renderable, tag, entity){ ... }, this);
|
|
1096
1096
|
* @param {Array} classes
|
|
1097
|
-
* @param {function:boolean
|
|
1097
|
+
* @param {function(...args):boolean} visitor Visitor can return optional "false" to terminate traversal earlier
|
|
1098
1098
|
* @param {object} [thisArg] specifies context object on which callbacks are to be called, optional
|
|
1099
1099
|
*/
|
|
1100
1100
|
traverseEntities(classes, visitor, thisArg) {
|
|
@@ -1719,7 +1719,7 @@ export class EntityComponentDataset {
|
|
|
1719
1719
|
/**
|
|
1720
1720
|
* Main utility of this method is to facilitate serialization.
|
|
1721
1721
|
* @param {Array} componentClasses
|
|
1722
|
-
* @param {function(componentIndex:number,components:
|
|
1722
|
+
* @param {function(componentIndex:number,components:Array, componentCount:number)} visitor
|
|
1723
1723
|
*/
|
|
1724
1724
|
traverseEntitiesCompactedFiltered(componentClasses, visitor) {
|
|
1725
1725
|
|
package/src/engine/ecs/System.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { assert } from "../../../core/assert.js";
|
|
5
|
-
import { array_push_if_unique } from "../../../core/collection/array/array_push_if_unique.js";
|
|
6
|
-
import { Transform } from "../transform/Transform.js";
|
|
7
|
-
import { TransformAttachment, TransformAttachmentFlags } from "../transform-attachment/TransformAttachment.js";
|
|
1
|
+
import {assert} from "../../../core/assert.js";
|
|
2
|
+
import {array_push_if_unique} from "../../../core/collection/array/array_push_if_unique.js";
|
|
3
|
+
import {array_remove_first} from "../../../core/collection/array/array_remove_first.js";
|
|
8
4
|
import Signal from "../../../core/events/signal/Signal.js";
|
|
9
|
-
import
|
|
5
|
+
import Entity from "../Entity.js";
|
|
6
|
+
import {TransformAttachment, TransformAttachmentFlags} from "../transform-attachment/TransformAttachment.js";
|
|
7
|
+
import {Transform} from "../transform/Transform.js";
|
|
8
|
+
import {EntityNodeFlags} from "./EntityNodeFlags.js";
|
|
9
|
+
import {ParentEntity} from "./ParentEntity.js";
|
|
10
10
|
|
|
11
11
|
const DEFAULT_FLAGS = EntityNodeFlags.LiveManagement;
|
|
12
12
|
|
|
@@ -116,7 +116,7 @@ export class EntityNode {
|
|
|
116
116
|
|
|
117
117
|
/**
|
|
118
118
|
*
|
|
119
|
-
* @param {(EntityNode)
|
|
119
|
+
* @param {function(node:EntityNode):*} visitor
|
|
120
120
|
* @param {*} [context]
|
|
121
121
|
*/
|
|
122
122
|
traverseChildren(visitor, context) {
|
|
@@ -125,7 +125,7 @@ export class EntityNode {
|
|
|
125
125
|
|
|
126
126
|
/**
|
|
127
127
|
*
|
|
128
|
-
* @return {Readonly<EntityNode
|
|
128
|
+
* @return {Readonly<Array<EntityNode>>}
|
|
129
129
|
*/
|
|
130
130
|
get children() {
|
|
131
131
|
return this.__children;
|
|
@@ -92,7 +92,7 @@ function makeConfig(engine) {
|
|
|
92
92
|
new AnimationSystem(graphics.viewport.size),
|
|
93
93
|
new TopDownCameraControllerSystem(graphics),
|
|
94
94
|
new TopDownCameraLanderSystem(),
|
|
95
|
-
new CameraSystem(
|
|
95
|
+
new CameraSystem(engine.graphics),
|
|
96
96
|
new MeshSystem(engine),
|
|
97
97
|
new ClingToTerrainSystem(),
|
|
98
98
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -8,10 +8,10 @@ import { AnimationGraphDefinition } from "../AnimationGraphDefinition.js";
|
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
*
|
|
11
|
-
* @param {
|
|
12
|
-
* @param {
|
|
13
|
-
* @param {
|
|
14
|
-
* @param {
|
|
11
|
+
* @param {Array} states
|
|
12
|
+
* @param {Array} transitions
|
|
13
|
+
* @param {Array} clips
|
|
14
|
+
* @param {Array} notifications
|
|
15
15
|
* @param {number} startingState
|
|
16
16
|
*
|
|
17
17
|
* @returns {AnimationGraphDefinition}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import {EntityComponentDataset} from "../../../ecs/EntityComponentDataset";
|
|
1
2
|
import {System} from "../../../ecs/System";
|
|
2
|
-
import {Scene} from "three";
|
|
3
3
|
import {GraphicsEngine} from "../../GraphicsEngine";
|
|
4
|
-
import {EntityComponentDataset} from "../../../ecs/EntityComponentDataset";
|
|
5
4
|
import {Camera} from "./Camera";
|
|
6
5
|
|
|
7
6
|
export class CameraSystem extends System<Camera> {
|
|
8
|
-
constructor(
|
|
7
|
+
constructor(engine: GraphicsEngine)
|
|
9
8
|
|
|
10
9
|
public static getFirstActiveCamera(ecd: EntityComponentDataset): { entity: number, component: Camera | undefined }
|
|
11
10
|
}
|
|
@@ -21,14 +21,13 @@ import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js
|
|
|
21
21
|
export class CameraSystem extends System {
|
|
22
22
|
/**
|
|
23
23
|
*
|
|
24
|
-
* @param {THREE.Scene} scene
|
|
25
24
|
* @param {GraphicsEngine} graphics
|
|
26
25
|
* @constructor
|
|
27
26
|
*/
|
|
28
|
-
constructor(
|
|
27
|
+
constructor(graphics) {
|
|
29
28
|
super();
|
|
30
29
|
|
|
31
|
-
this.scene = scene;
|
|
30
|
+
this.scene = graphics.scene;
|
|
32
31
|
|
|
33
32
|
this.dependencies = [Camera, Transform];
|
|
34
33
|
|
|
@@ -100,9 +100,9 @@ async function main(engine) {
|
|
|
100
100
|
const geometry = randomFromArray(random, geometries);
|
|
101
101
|
const sg = ShadedGeometry.from(geometry, material);
|
|
102
102
|
|
|
103
|
-
sg.draw_method = DRAW_METHOD_PLAIN;
|
|
104
|
-
sg.setFlag(ShadedGeometryFlags.DrawMethodLocked);
|
|
105
|
-
|
|
103
|
+
// sg.draw_method = DRAW_METHOD_PLAIN;
|
|
104
|
+
// sg.setFlag(ShadedGeometryFlags.DrawMethodLocked);
|
|
105
|
+
sg.draw_method = DRAW_METHOD_INSTANCED;
|
|
106
106
|
// sg.draw_method = 2;
|
|
107
107
|
// sg.draw_method = DRAW_METHOD_INSTANCED;
|
|
108
108
|
// sg.draw_method = random() > 0.5 ? DRAW_METHOD_INSTANCED : 2;
|
|
@@ -102,7 +102,7 @@ function makeConfig(engine) {
|
|
|
102
102
|
new AnimationSystem(graphics.viewport.size),
|
|
103
103
|
new TopDownCameraControllerSystem(graphics),
|
|
104
104
|
new TopDownCameraLanderSystem(),
|
|
105
|
-
new CameraSystem(
|
|
105
|
+
new CameraSystem(engine.graphics),
|
|
106
106
|
new MeshSystem(engine),
|
|
107
107
|
new ClingToTerrainSystem(),
|
|
108
108
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -106,7 +106,7 @@ function makeConfig(engine) {
|
|
|
106
106
|
new AnimationSystem(graphics.viewport.size),
|
|
107
107
|
new TopDownCameraControllerSystem(graphics),
|
|
108
108
|
new TopDownCameraLanderSystem(),
|
|
109
|
-
new CameraSystem(
|
|
109
|
+
new CameraSystem(engine.graphics),
|
|
110
110
|
new MeshSystem(engine),
|
|
111
111
|
new ClingToTerrainSystem(),
|
|
112
112
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -38,14 +38,14 @@ function makeConfig(engine) {
|
|
|
38
38
|
const assetManager = engine.assetManager;
|
|
39
39
|
const devices = engine.devices;
|
|
40
40
|
|
|
41
|
-
config.
|
|
41
|
+
config.addManySystems(
|
|
42
42
|
new ScriptSystem(),
|
|
43
43
|
new PathFollowingSystem(),
|
|
44
44
|
new TagSystem(),
|
|
45
45
|
new TimerSystem(),
|
|
46
46
|
new TopDownCameraControllerSystem(graphics),
|
|
47
47
|
new TopDownCameraLanderSystem(),
|
|
48
|
-
new CameraSystem(
|
|
48
|
+
new CameraSystem(engine.graphics),
|
|
49
49
|
new MeshSystem(graphics, assetManager),
|
|
50
50
|
new TerrainSystem(graphics, assetManager),
|
|
51
51
|
new WaterSystem(graphics),
|
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -99,7 +99,7 @@ function makeConfig(engine) {
|
|
|
99
99
|
const guiSystem = new GUIElementSystem(engine.gui.view, engine);
|
|
100
100
|
const headsUpDisplaySystem = new HeadsUpDisplaySystem(graphics);
|
|
101
101
|
|
|
102
|
-
config.
|
|
102
|
+
config.addManySystems(
|
|
103
103
|
new TagSystem(),
|
|
104
104
|
new AttachmentSystem(),
|
|
105
105
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
@@ -108,7 +108,7 @@ function makeConfig(engine) {
|
|
|
108
108
|
guiSystem,
|
|
109
109
|
new AnimationSystem(graphics.viewport.size),
|
|
110
110
|
new TopDownCameraControllerSystem(graphics),
|
|
111
|
-
new CameraSystem(
|
|
111
|
+
new CameraSystem(engine.graphics),
|
|
112
112
|
new MeshSystem(engine),
|
|
113
113
|
new ClingToTerrainSystem(),
|
|
114
114
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -98,7 +98,7 @@ function makeConfig(engine) {
|
|
|
98
98
|
new AnimationSystem(graphics.viewport.size),
|
|
99
99
|
new TopDownCameraControllerSystem(graphics),
|
|
100
100
|
new TopDownCameraLanderSystem(),
|
|
101
|
-
new CameraSystem(
|
|
101
|
+
new CameraSystem(engine.graphics),
|
|
102
102
|
new MeshSystem(engine),
|
|
103
103
|
new ClingToTerrainSystem(),
|
|
104
104
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -126,7 +126,7 @@ function makeConfig(engine) {
|
|
|
126
126
|
new AnimationSystem(graphics.viewport.size),
|
|
127
127
|
new TopDownCameraControllerSystem(graphics),
|
|
128
128
|
new TopDownCameraLanderSystem(),
|
|
129
|
-
new CameraSystem(
|
|
129
|
+
new CameraSystem(engine.graphics),
|
|
130
130
|
new MeshSystem(engine),
|
|
131
131
|
new ClingToTerrainSystem(),
|
|
132
132
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -103,7 +103,7 @@ function makeConfig(engine) {
|
|
|
103
103
|
new AnimationSystem(graphics.viewport.size),
|
|
104
104
|
new TopDownCameraControllerSystem(graphics),
|
|
105
105
|
new TopDownCameraLanderSystem(),
|
|
106
|
-
new CameraSystem(
|
|
106
|
+
new CameraSystem(engine.graphics),
|
|
107
107
|
new MeshSystem(engine),
|
|
108
108
|
new ClingToTerrainSystem(),
|
|
109
109
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -79,7 +79,7 @@ function makeConfig(engine) {
|
|
|
79
79
|
guiSystem,
|
|
80
80
|
new AnimationSystem(graphics.viewport.size),
|
|
81
81
|
new TopDownCameraControllerSystem(graphics),
|
|
82
|
-
new CameraSystem(
|
|
82
|
+
new CameraSystem(engine.graphics),
|
|
83
83
|
new MeshSystem(engine),
|
|
84
84
|
new ClingToTerrainSystem(),
|
|
85
85
|
new TerrainSystem(graphics, assetManager),
|
|
@@ -4,9 +4,16 @@ import { computeMaterialHash } from "../engine/asset/loaders/material/computeMat
|
|
|
4
4
|
import { makeMaterialIcon } from "./makeMaterialIcon.js";
|
|
5
5
|
import { computeHashIntegerArray } from "../core/collection/array/computeHashIntegerArray.js";
|
|
6
6
|
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* @typedef {Object} CacheKey
|
|
10
|
+
* @property {number} size
|
|
11
|
+
* @property {Material} material
|
|
12
|
+
*/
|
|
13
|
+
|
|
7
14
|
/**
|
|
8
15
|
*
|
|
9
|
-
* @type {Cache<
|
|
16
|
+
* @type {Cache<CacheKey, Sampler2D>}
|
|
10
17
|
*/
|
|
11
18
|
const cache = new Cache({
|
|
12
19
|
maxWeight: 1024000,
|