@woosh/meep-engine 2.59.6 → 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 +90 -91
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +90 -91
- 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/map/HashMap.js +1 -1
- package/src/core/collection/table/RowFirstTableSpec.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/process/task/Task.js +3 -3
- package/src/engine/EngineConfiguration.js +0 -1
- package/src/engine/EngineHarness.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +2 -2
- package/src/engine/ecs/parent/EntityNode.js +10 -10
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +1 -1
- 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/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/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/misc/makeMaterialIconCached.js +8 -1
|
@@ -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),
|
|
@@ -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
|
|
|
@@ -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,
|