@woosh/meep-engine 2.75.8 → 2.75.9
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/bundle-worker-terrain.js +1 -1
- package/build/meep.cjs +784 -982
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +784 -982
- package/editor/actions/concrete/ModifyPatchSampler2DAction.js +6 -3
- package/editor/actions/concrete/PatchTerrainTextureAction.js +6 -3
- package/editor/process/EditorProcess.js +12 -16
- package/editor/process/ProcessEngine.js +9 -10
- package/package.json +1 -1
- package/src/core/binary/dec2hex.js +1 -1
- package/src/{engine/ecs/ik/IKMath.js → core/geom/vec3/v3_computeOffsetVector.js} +1 -1
- package/src/core/math/newton_solver_1d.js +13 -4
- package/src/core/math/solveQuadratic.js +5 -3
- package/src/core/math/spline/catmull_rom_compute_T.js +19 -0
- package/src/{engine/navigation/ecs/components → core/math/spline}/computeCatmullRomSpline.js +3 -3
- package/src/{engine/navigation/ecs/components → core/math/spline}/computeCatmullRomSplineUniformDistance.js +3 -3
- package/src/core/math/spline/computeNonuniformCatmullRomSplineSample.js +109 -0
- package/src/core/math/spline/interpolate_bicubic.js +12 -0
- package/src/core/math/spline/spline_catmullrom_1d.js +120 -0
- package/src/engine/control/ControlContext.js +25 -27
- package/src/engine/ecs/EntityManager.js +12 -9
- package/src/engine/ecs/EntityObserver.js +26 -22
- package/src/engine/ecs/binding/ComponentPropertyPath.js +12 -12
- package/src/engine/ecs/components/Motion.js +5 -7
- package/src/engine/ecs/components/SerializationMetadata.js +5 -3
- package/src/engine/ecs/dynamic_actions/actions/definition/AbstractActionDescription.js +0 -2
- package/src/engine/ecs/dynamic_actions/actions/definition/ActionSequenceDescription.js +7 -9
- package/src/engine/ecs/dynamic_actions/actions/definition/DelayActionDescription.js +3 -5
- package/src/engine/ecs/dynamic_actions/actions/definition/SendRequestActionDescription.js +6 -8
- package/src/engine/ecs/dynamic_actions/actions/definition/SpeakLineActionDescription.js +14 -17
- package/src/engine/ecs/dynamic_actions/actions/definition/WeightedRandomActionDescription.js +8 -11
- package/src/engine/ecs/dynamic_actions/actions/definition/WriteToBlackboardActionDescription.js +15 -18
- package/src/engine/ecs/ik/OneBoneSurfaceAlignmentSolver.js +7 -7
- package/src/engine/ecs/ik/TwoBoneInverseKinematicsSolver.js +6 -6
- package/src/engine/ecs/parent/EntityNode.js +39 -37
- package/src/engine/ecs/speaker/VoiceSystem.js +36 -39
- package/src/engine/ecs/system/SystemEntityContext.js +25 -23
- package/src/engine/ecs/tag/find_entities_with_tag.js +18 -0
- package/src/engine/ecs/terrain/TerrainClouds.js +23 -24
- package/src/engine/ecs/terrain/ecs/splat/SplatMapMaterialPatch.js +5 -2
- package/src/engine/ecs/terrain/overlay/TerrainOverlay.js +15 -14
- package/src/engine/ecs/tooltip/TooltipComponent.js +6 -7
- package/src/engine/graphics/camera/testClippingPlaneComputation.js +0 -4
- package/src/engine/graphics/ecs/path/testPathDisplaySystem.js +1 -5
- package/src/engine/graphics/ecs/path/tube/prototypeAnimatedPathMask.js +2 -6
- package/src/engine/graphics/ecs/water2/shader/testWaterShader.js +12 -14
- package/src/engine/graphics/material/optimization/MaterialOptimizationContext.js +22 -20
- package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js +3 -4
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +0 -4
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +0 -4
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +0 -4
- package/src/engine/graphics/shadows/testShadowMapRendering.js +0 -2
- package/src/engine/graphics/texture/atlas/TextureAtlas.js +13 -11
- package/src/engine/graphics/texture/sampler/Sampler2D.js +15 -366
- package/src/engine/graphics/texture/sampler/Sampler2D.spec.js +0 -31
- package/src/engine/graphics/texture/sampler/sampler2d_copy_with_margins.js +166 -0
- package/src/engine/graphics/texture/sampler/sampler2d_copy_with_margins.spec.js +31 -0
- package/src/engine/graphics/texture/sampler/sampler2d_paint.js +81 -0
- package/src/engine/graphics/texture/sampler/sampler2d_sub_copy_same_item_size.js +50 -0
- package/src/engine/navigation/ecs/components/Path.js +10 -9
- package/src/engine/physics/computeInterceptPoint.js +44 -0
- package/src/engine/plugin/EnginePlugin.js +1 -2
- package/src/engine/ecs/components/AlignToVelocity.js +0 -9
- package/src/engine/ecs/components/CharacterController.js +0 -31
- package/src/engine/ecs/components/PhysicalBody.js +0 -51
- package/src/engine/ecs/components/Steering.js +0 -111
- package/src/engine/ecs/components/SteeringSerializationAdapter.js +0 -34
- package/src/engine/ecs/systems/AlignToVelocitySystem.js +0 -51
- package/src/engine/ecs/systems/CharacterControlSystem.js +0 -134
- package/src/engine/ecs/systems/PhysicsSystem.js +0 -89
- package/src/engine/ecs/systems/PropertySetSystem.js +0 -18
- package/src/engine/ecs/systems/SteeringSystem.js +0 -171
- package/src/engine/ecs/systems/TagSystem.d.ts +0 -5
- package/src/engine/ecs/systems/TagSystem.js +0 -31
- package/src/engine/graphics/texture/sampler/bicubic.js +0 -59
- package/src/engine/graphics/texture/sampler/bicubic.spec.js +0 -13
- package/src/engine/navigation/ecs/components/computeNonuniformCatmullRomSplineSample.js +0 -242
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
import Vector4 from '../../../../core/geom/Vector4.js';
|
|
7
|
-
import canvas2Sampler2D from "../../../graphics/texture/Canvas2Sampler2D.js";
|
|
8
|
-
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
9
|
-
import Vector1 from "../../../../core/geom/Vector1.js";
|
|
10
|
-
import { assert } from "../../../../core/assert.js";
|
|
11
|
-
import ObservedString from "../../../../core/model/ObservedString.js";
|
|
12
6
|
import { ClampToEdgeWrapping, DataTexture, NearestFilter } from "three";
|
|
13
|
-
import {
|
|
14
|
-
import { sampler2d_scale } from "../../../graphics/texture/sampler/resize/sampler2d_scale.js";
|
|
15
|
-
import { uint82float } from "../../../../core/binary/uint82float.js";
|
|
7
|
+
import { assert } from "../../../../core/assert.js";
|
|
16
8
|
import { float2uint8 } from "../../../../core/binary/float2uint8.js";
|
|
17
|
-
import {
|
|
9
|
+
import { uint82float } from "../../../../core/binary/uint82float.js";
|
|
18
10
|
import { array_copy } from "../../../../core/collection/array/array_copy.js";
|
|
11
|
+
import { isTypedArray } from "../../../../core/collection/array/typed/isTypedArray.js";
|
|
12
|
+
import Vector1 from "../../../../core/geom/Vector1.js";
|
|
13
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
14
|
+
import Vector4 from '../../../../core/geom/Vector4.js';
|
|
15
|
+
import ObservedString from "../../../../core/model/ObservedString.js";
|
|
16
|
+
import canvas2Sampler2D from "../../../graphics/texture/Canvas2Sampler2D.js";
|
|
17
|
+
import { sampler2d_scale } from "../../../graphics/texture/sampler/resize/sampler2d_scale.js";
|
|
18
|
+
import { Sampler2D } from "../../../graphics/texture/sampler/Sampler2D.js";
|
|
19
|
+
import { sampler2d_paint } from "../../../graphics/texture/sampler/sampler2d_paint.js";
|
|
19
20
|
import { WHITE_PIXEL_DATA_URL } from "../../../graphics/WHITE_PIXEL_DATA_URL.js";
|
|
20
21
|
|
|
21
22
|
class Context {
|
|
@@ -69,7 +70,7 @@ export class TerrainOverlay {
|
|
|
69
70
|
*/
|
|
70
71
|
this.size = new Vector2(size.x, size.y);
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
/**
|
|
73
74
|
*
|
|
74
75
|
* @type {ObservedString}
|
|
75
76
|
*/
|
|
@@ -120,7 +121,7 @@ export class TerrainOverlay {
|
|
|
120
121
|
*
|
|
121
122
|
* @returns {string}
|
|
122
123
|
*/
|
|
123
|
-
get baseTileImage(){
|
|
124
|
+
get baseTileImage() {
|
|
124
125
|
return this.stack.length === 0 ? this.tileImage.getValue() : this.stack[0].tileImage
|
|
125
126
|
}
|
|
126
127
|
|
|
@@ -128,7 +129,7 @@ export class TerrainOverlay {
|
|
|
128
129
|
*
|
|
129
130
|
* @param {string} v
|
|
130
131
|
*/
|
|
131
|
-
set baseTileImage(v){
|
|
132
|
+
set baseTileImage(v) {
|
|
132
133
|
if (this.stack.length === 0) {
|
|
133
134
|
this.tileImage.set(v);
|
|
134
135
|
} else {
|
|
@@ -316,7 +317,7 @@ export class TerrainOverlay {
|
|
|
316
317
|
const scaled_source = Sampler2D.uint8(4, dWidth, dHeight);
|
|
317
318
|
sampler2d_scale(source, scaled_source);
|
|
318
319
|
|
|
319
|
-
this
|
|
320
|
+
sampler2d_paint(this, scaled_source, 0, 0, dx, dy, dWidth, dHeight);
|
|
320
321
|
|
|
321
322
|
this.texture.needsUpdate = true;
|
|
322
323
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { computeStringHash } from "../../../core/primitives/strings/computeStringHash.js";
|
|
2
2
|
|
|
3
3
|
export class TooltipComponent {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
*
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
key = '';
|
|
11
10
|
|
|
12
11
|
hash() {
|
|
13
12
|
return computeStringHash(this.key);
|
|
@@ -21,8 +21,6 @@ import RenderSystem from "../../ecs/renderable/RenderSystem.js";
|
|
|
21
21
|
import AnimationSystem from "../../ecs/systems/AnimationSystem.js";
|
|
22
22
|
import MotionSystem from "../../ecs/systems/MotionSystem.js";
|
|
23
23
|
import ScriptSystem from "../../ecs/systems/ScriptSystem.js";
|
|
24
|
-
import SteeringSystem from "../../ecs/systems/SteeringSystem.js";
|
|
25
|
-
import TagSystem from "../../ecs/systems/TagSystem.js";
|
|
26
24
|
import TimerSystem from "../../ecs/systems/TimerSystem.js";
|
|
27
25
|
import ClingToTerrainSystem from "../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
28
26
|
import TerrainSystem from "../../ecs/terrain/ecs/TerrainSystem.js";
|
|
@@ -76,9 +74,7 @@ function makeConfig(engine) {
|
|
|
76
74
|
new ScriptSystem(),
|
|
77
75
|
new FacingDirectionSystem(),
|
|
78
76
|
new PathFollowingSystem(),
|
|
79
|
-
new SteeringSystem(),
|
|
80
77
|
new MotionSystem(),
|
|
81
|
-
new TagSystem(),
|
|
82
78
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
83
79
|
new SoundControllerSystem(),
|
|
84
80
|
new SoundListenerSystem(sound.context),
|
|
@@ -3,6 +3,7 @@ import FacingDirectionSystem from "../../../../../../model/game/ecs/system/Facin
|
|
|
3
3
|
import { makeEngineOptionsModel } from "../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
4
4
|
import { enableEditor } from "../../../../../editor/enableEditor.js";
|
|
5
5
|
import Vector3 from "../../../../core/geom/Vector3.js";
|
|
6
|
+
import { computeCatmullRomSpline } from "../../../../core/math/spline/computeCatmullRomSpline.js";
|
|
6
7
|
import { CanvasView } from "../../../../view/elements/CanvasView.js";
|
|
7
8
|
import { GameAssetType } from "../../../asset/GameAssetType.js";
|
|
8
9
|
import { GLTFAssetLoader } from "../../../asset/loaders/GLTFAssetLoader.js";
|
|
@@ -20,8 +21,6 @@ import { InverseKinematicsSystem } from "../../../ecs/ik/InverseKinematicsSystem
|
|
|
20
21
|
import AnimationSystem from "../../../ecs/systems/AnimationSystem.js";
|
|
21
22
|
import MotionSystem from "../../../ecs/systems/MotionSystem.js";
|
|
22
23
|
import ScriptSystem from "../../../ecs/systems/ScriptSystem.js";
|
|
23
|
-
import SteeringSystem from "../../../ecs/systems/SteeringSystem.js";
|
|
24
|
-
import TagSystem from "../../../ecs/systems/TagSystem.js";
|
|
25
24
|
import TimerSystem from "../../../ecs/systems/TimerSystem.js";
|
|
26
25
|
import ClingToTerrainSystem from "../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
27
26
|
import TerrainSystem from "../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
@@ -31,7 +30,6 @@ import { EngineHarness } from "../../../EngineHarness.js";
|
|
|
31
30
|
import InputControllerSystem from "../../../input/ecs/systems/InputControllerSystem.js";
|
|
32
31
|
import { InputSystem } from "../../../input/ecs/systems/InputSystem.js";
|
|
33
32
|
import { BehaviorSystem } from "../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
34
|
-
import { computeCatmullRomSpline } from "../../../navigation/ecs/components/computeCatmullRomSpline.js";
|
|
35
33
|
import { InterpolationType } from "../../../navigation/ecs/components/InterpolationType.js";
|
|
36
34
|
import Path from "../../../navigation/ecs/components/Path.js";
|
|
37
35
|
import PathFollowingSystem from "../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
@@ -91,9 +89,7 @@ function makeConfig(engine) {
|
|
|
91
89
|
new ScriptSystem(),
|
|
92
90
|
new FacingDirectionSystem(),
|
|
93
91
|
new PathFollowingSystem(),
|
|
94
|
-
new SteeringSystem(),
|
|
95
92
|
new MotionSystem(),
|
|
96
|
-
new TagSystem(),
|
|
97
93
|
new AttachmentSystem(),
|
|
98
94
|
new TimerSystem(),
|
|
99
95
|
guiSystem,
|
|
@@ -3,6 +3,7 @@ import { makeEngineOptionsModel } from "../../../../../../../model/game/options/
|
|
|
3
3
|
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
4
4
|
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
5
5
|
import { pingpong } from "../../../../../core/math/pingpong.js";
|
|
6
|
+
import { computeCatmullRomSpline } from "../../../../../core/math/spline/computeCatmullRomSpline.js";
|
|
6
7
|
import { CanvasView } from "../../../../../view/elements/CanvasView.js";
|
|
7
8
|
import { GameAssetType } from "../../../../asset/GameAssetType.js";
|
|
8
9
|
import { GLTFAssetLoader } from "../../../../asset/loaders/GLTFAssetLoader.js";
|
|
@@ -20,8 +21,6 @@ import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSys
|
|
|
20
21
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
21
22
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
22
23
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
23
|
-
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
24
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
25
24
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
26
25
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
27
26
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
@@ -35,7 +34,6 @@ import InputControllerSystem from "../../../../input/ecs/systems/InputController
|
|
|
35
34
|
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
36
35
|
import { BehaviorComponent } from "../../../../intelligence/behavior/ecs/BehaviorComponent.js";
|
|
37
36
|
import { BehaviorSystem } from "../../../../intelligence/behavior/ecs/BehaviorSystem.js";
|
|
38
|
-
import { computeCatmullRomSpline } from "../../../../navigation/ecs/components/computeCatmullRomSpline.js";
|
|
39
37
|
import { InterpolationType } from "../../../../navigation/ecs/components/InterpolationType.js";
|
|
40
38
|
import Path from "../../../../navigation/ecs/components/Path.js";
|
|
41
39
|
import { PathEvents } from "../../../../navigation/ecs/components/PathEvents.js";
|
|
@@ -92,9 +90,7 @@ function makeConfig(engine) {
|
|
|
92
90
|
new ScriptSystem(),
|
|
93
91
|
new FacingDirectionSystem(),
|
|
94
92
|
new PathFollowingSystem(),
|
|
95
|
-
new SteeringSystem(),
|
|
96
93
|
new MotionSystem(),
|
|
97
|
-
new TagSystem(),
|
|
98
94
|
new AttachmentSystem(),
|
|
99
95
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
100
96
|
new SoundControllerSystem(),
|
|
@@ -322,7 +318,7 @@ function sample_style_tube() {
|
|
|
322
318
|
|
|
323
319
|
|
|
324
320
|
function main(engine) {
|
|
325
|
-
EngineHarness.buildBasics({engine});
|
|
321
|
+
EngineHarness.buildBasics({ engine });
|
|
326
322
|
|
|
327
323
|
const _p = new Path();
|
|
328
324
|
_p.interpolation = InterpolationType.CatmullRom;
|
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
import SimplexNoise from 'simplex-noise';
|
|
2
|
-
import {makeEngineOptionsModel} from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
3
|
-
import {enableEditor} from "../../../../../../editor/enableEditor.js";
|
|
2
|
+
import { makeEngineOptionsModel } from "../../../../../../../model/game/options/makeEngineOptionsModel.js";
|
|
3
|
+
import { enableEditor } from "../../../../../../editor/enableEditor.js";
|
|
4
4
|
import Vector2 from "../../../../../core/geom/Vector2.js";
|
|
5
5
|
import Vector3 from "../../../../../core/geom/Vector3.js";
|
|
6
|
-
import {seededRandom} from "../../../../../core/math/random/seededRandom.js";
|
|
6
|
+
import { seededRandom } from "../../../../../core/math/random/seededRandom.js";
|
|
7
7
|
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
8
8
|
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
9
9
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
10
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
11
10
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
12
11
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
13
|
-
import {obtainTerrain} from "../../../../ecs/terrain/util/obtainTerrain.js";
|
|
14
|
-
import {EngineConfiguration} from "../../../../EngineConfiguration.js";
|
|
15
|
-
import {EngineHarness} from "../../../../EngineHarness.js";
|
|
16
|
-
import {GridPosition2TransformSystem} from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
12
|
+
import { obtainTerrain } from "../../../../ecs/terrain/util/obtainTerrain.js";
|
|
13
|
+
import { EngineConfiguration } from "../../../../EngineConfiguration.js";
|
|
14
|
+
import { EngineHarness } from "../../../../EngineHarness.js";
|
|
15
|
+
import { GridPosition2TransformSystem } from "../../../../grid/grid2transform/GridPosition2TransformSystem.js";
|
|
17
16
|
import GridPositionSystem from "../../../../grid/position/GridPositionSystem.js";
|
|
18
|
-
import {Transform2GridPositionSystem} from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
17
|
+
import { Transform2GridPositionSystem } from "../../../../grid/transform2grid/Transform2GridPositionSystem.js";
|
|
19
18
|
import InputControllerSystem from "../../../../input/ecs/systems/InputControllerSystem.js";
|
|
20
|
-
import {InputSystem} from "../../../../input/ecs/systems/InputSystem.js";
|
|
19
|
+
import { InputSystem } from "../../../../input/ecs/systems/InputSystem.js";
|
|
21
20
|
import PathFollowingSystem from "../../../../navigation/ecs/path_following/PathFollowingSystem.js";
|
|
22
|
-
import {CameraSystem} from "../../camera/CameraSystem.js";
|
|
21
|
+
import { CameraSystem } from "../../camera/CameraSystem.js";
|
|
23
22
|
import TopDownCameraControllerSystem from "../../camera/topdown/TopDownCameraControllerSystem.js";
|
|
24
|
-
import {TopDownCameraLanderSystem} from "../../camera/topdown/TopDownCameraLanderSystem.js";
|
|
23
|
+
import { TopDownCameraLanderSystem } from "../../camera/topdown/TopDownCameraLanderSystem.js";
|
|
25
24
|
import MeshHighlightSystem from "../../highlight/system/MeshHighlightSystem.js";
|
|
26
25
|
import LightSystem from "../../light/LightSystem.js";
|
|
27
|
-
import {MeshSystem} from "../../mesh/MeshSystem.js";
|
|
26
|
+
import { MeshSystem } from "../../mesh/MeshSystem.js";
|
|
28
27
|
import WaterSystem from "../../water/WaterSystem.js";
|
|
29
28
|
|
|
30
29
|
const engineHarness = new EngineHarness();
|
|
@@ -40,7 +39,6 @@ function makeConfig(engine) {
|
|
|
40
39
|
config.addManySystems(
|
|
41
40
|
new ScriptSystem(),
|
|
42
41
|
new PathFollowingSystem(),
|
|
43
|
-
new TagSystem(),
|
|
44
42
|
new TimerSystem(),
|
|
45
43
|
new TopDownCameraControllerSystem(graphics),
|
|
46
44
|
new TopDownCameraLanderSystem(),
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
import { traverseThreeObject } from "../../ecs/highlight/renderer/traverseThreeObject.js";
|
|
2
|
-
import { TextureAttachmentsByMaterialType } from "../../../asset/loaders/material/TextureAttachmensByMaterialType.js";
|
|
3
|
-
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
4
|
-
import AABB2 from "../../../../core/geom/AABB2.js";
|
|
5
|
-
import { MaxRectanglesPacker } from "../../../../core/geom/packing/max-rect/MaxRectangles.js";
|
|
6
|
-
import { Sampler2D } from "../../texture/sampler/Sampler2D.js";
|
|
7
|
-
import { array_push_if_unique } from "../../../../core/collection/array/array_push_if_unique.js";
|
|
8
|
-
import { computeMaterialHash } from "../../../asset/loaders/material/computeMaterialHash.js";
|
|
9
|
-
import { computeMaterialEquality } from "../../../asset/loaders/material/computeMaterialEquality.js";
|
|
10
|
-
import { collectIteratorValueToArray } from "../../../../core/collection/collectIteratorValueToArray.js";
|
|
11
1
|
import {
|
|
12
2
|
AdditiveBlending,
|
|
13
3
|
ClampToEdgeWrapping,
|
|
@@ -17,21 +7,32 @@ import {
|
|
|
17
7
|
MultiplyBlending,
|
|
18
8
|
NormalBlending
|
|
19
9
|
} from "three";
|
|
20
|
-
import { convertTexture2Sampler2D } from "../../texture/sampler/convertTexture2Sampler2D.js";
|
|
21
|
-
import { BUFFER_GEOMETRY_UVS } from "./BUFFER_GEOMETRY_UVS.js";
|
|
22
|
-
import { is_compliant_mesh } from "./is_compliant_mesh.js";
|
|
23
|
-
import { MaterialDescriptor } from "./MaterialDescriptor.js";
|
|
24
|
-
import { computeThreeTextureTypeFromDataType } from "../../texture/computeThreeTextureTypeFromDataType.js";
|
|
25
|
-
import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
|
|
26
10
|
import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
|
|
27
11
|
import {
|
|
28
12
|
compute_typed_array_constructor_from_data_type
|
|
29
13
|
} from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
|
|
30
|
-
import {
|
|
14
|
+
import { array_push_if_unique } from "../../../../core/collection/array/array_push_if_unique.js";
|
|
15
|
+
import { typedArrayToDataType } from "../../../../core/collection/array/typed/typedArrayToDataType.js";
|
|
16
|
+
import { collectIteratorValueToArray } from "../../../../core/collection/collectIteratorValueToArray.js";
|
|
17
|
+
import { HashMap } from "../../../../core/collection/map/HashMap.js";
|
|
18
|
+
import AABB2 from "../../../../core/geom/AABB2.js";
|
|
19
|
+
import { MaxRectanglesPacker } from "../../../../core/geom/packing/max-rect/MaxRectangles.js";
|
|
20
|
+
import { computeMaterialEquality } from "../../../asset/loaders/material/computeMaterialEquality.js";
|
|
21
|
+
import { computeMaterialHash } from "../../../asset/loaders/material/computeMaterialHash.js";
|
|
22
|
+
import { TextureAttachmentsByMaterialType } from "../../../asset/loaders/material/TextureAttachmensByMaterialType.js";
|
|
23
|
+
import { traverseThreeObject } from "../../ecs/highlight/renderer/traverseThreeObject.js";
|
|
31
24
|
import { channelCountToThreeTextureFormat } from "../../texture/channelCountToThreeTextureFormat.js";
|
|
32
|
-
import {
|
|
33
|
-
import { sampler2d_copy_channel_data } from "../../texture/sampler/sampler2d_copy_channel_data.js";
|
|
25
|
+
import { computeThreeTextureTypeFromDataType } from "../../texture/computeThreeTextureTypeFromDataType.js";
|
|
34
26
|
import { normalized_internal_format } from "../../texture/normalized_internal_format.js";
|
|
27
|
+
import { convertTexture2Sampler2D } from "../../texture/sampler/convertTexture2Sampler2D.js";
|
|
28
|
+
import { copy_Sampler2D_channel_data } from "../../texture/sampler/copy_Sampler2D_channel_data.js";
|
|
29
|
+
import { Sampler2D } from "../../texture/sampler/Sampler2D.js";
|
|
30
|
+
import { sampler2d_copy_channel_data } from "../../texture/sampler/sampler2d_copy_channel_data.js";
|
|
31
|
+
import { sampler2d_sub_copy_same_item_size } from "../../texture/sampler/sampler2d_sub_copy_same_item_size.js";
|
|
32
|
+
import { BUFFER_GEOMETRY_UVS } from "./BUFFER_GEOMETRY_UVS.js";
|
|
33
|
+
import { is_compliant_mesh } from "./is_compliant_mesh.js";
|
|
34
|
+
import { MaterialDescriptor } from "./MaterialDescriptor.js";
|
|
35
|
+
import { prepare_atlas_texture } from "./prepare_atlas_texture.js";
|
|
35
36
|
|
|
36
37
|
const ATLAS_PATCH_BORDER = 0;
|
|
37
38
|
|
|
@@ -605,7 +606,8 @@ export class MaterialOptimizationContext {
|
|
|
605
606
|
|
|
606
607
|
const patch = uv_context.atlas_patch;
|
|
607
608
|
|
|
608
|
-
|
|
609
|
+
sampler2d_sub_copy_same_item_size(
|
|
610
|
+
atlas_sampler,
|
|
609
611
|
source_sampler,
|
|
610
612
|
0, 0,
|
|
611
613
|
patch.x0, patch.y0, patch.getWidth(), patch.getHeight()
|
package/src/engine/graphics/particles/particular/engine/utils/volume/prototypeParticleVolume.js
CHANGED
|
@@ -37,7 +37,7 @@ import ViewportPositionSystem from "../../../../../../ecs/gui/position/ViewportP
|
|
|
37
37
|
import Renderable from "../../../../../../ecs/renderable/Renderable.js";
|
|
38
38
|
import AnimationSystem from "../../../../../../ecs/systems/AnimationSystem.js";
|
|
39
39
|
import RenderSystem from "../../../../../../ecs/systems/RenderSystem.js";
|
|
40
|
-
import
|
|
40
|
+
import { find_entities_with_tag } from "../../../../../../ecs/tag/find_entities_with_tag.js";
|
|
41
41
|
import ClingToTerrainSystem from "../../../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
42
42
|
import TerrainSystem from "../../../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
43
43
|
import { obtainTerrain } from "../../../../../../ecs/terrain/util/obtainTerrain.js";
|
|
@@ -98,7 +98,6 @@ function makeConfig(engine) {
|
|
|
98
98
|
const headsUpDisplaySystem = new HeadsUpDisplaySystem(graphics);
|
|
99
99
|
|
|
100
100
|
config.addManySystems(
|
|
101
|
-
new TagSystem(),
|
|
102
101
|
new AttachmentSystem(),
|
|
103
102
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
104
103
|
new SoundControllerSystem(),
|
|
@@ -204,7 +203,7 @@ heatmap_lut_discrete.write(
|
|
|
204
203
|
*/
|
|
205
204
|
function make_shape_vis_toggle(engine) {
|
|
206
205
|
const ecd = engine.entityManager.dataset;
|
|
207
|
-
const entities =
|
|
206
|
+
const entities = find_entities_with_tag(SHAPE_VISUAL_ENTITY_TAG, ecd);
|
|
208
207
|
|
|
209
208
|
|
|
210
209
|
const builders = entities.map(e => Entity.readFromDataset(e, ecd));
|
|
@@ -947,7 +946,7 @@ function make_box_editor(engine, transform = new Transform()) {
|
|
|
947
946
|
r_controls.boundingBox.setBounds(0, 0, 0, 1, 1, 1);
|
|
948
947
|
|
|
949
948
|
// make camera controller holder
|
|
950
|
-
const entity =
|
|
949
|
+
const entity = find_entities_with_tag('CameraController', ecd)[0];
|
|
951
950
|
|
|
952
951
|
const camera_controls = Entity.readFromDataset(entity, ecd);
|
|
953
952
|
|
|
@@ -28,8 +28,6 @@ import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
|
28
28
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
29
29
|
import RenderSystem from "../../../../ecs/systems/RenderSystem.js";
|
|
30
30
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
31
|
-
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
32
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
33
31
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
34
32
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
35
33
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
@@ -84,9 +82,7 @@ function makeConfig(engine) {
|
|
|
84
82
|
new ScriptSystem(),
|
|
85
83
|
new FacingDirectionSystem(),
|
|
86
84
|
new PathFollowingSystem(),
|
|
87
|
-
new SteeringSystem(),
|
|
88
85
|
new MotionSystem(),
|
|
89
|
-
new TagSystem(),
|
|
90
86
|
new AttachmentSystem(),
|
|
91
87
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
92
88
|
new SoundControllerSystem(),
|
|
@@ -37,8 +37,6 @@ import RenderSystem from "../../../../ecs/renderable/RenderSystem.js";
|
|
|
37
37
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
38
38
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
39
39
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
40
|
-
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
41
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
42
40
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
43
41
|
import Team from "../../../../ecs/team/Team.js";
|
|
44
42
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
@@ -112,9 +110,7 @@ function makeConfig(engine) {
|
|
|
112
110
|
new ScriptSystem(),
|
|
113
111
|
new FacingDirectionSystem(),
|
|
114
112
|
new PathFollowingSystem(),
|
|
115
|
-
new SteeringSystem(),
|
|
116
113
|
new MotionSystem(),
|
|
117
|
-
new TagSystem(),
|
|
118
114
|
new AttachmentSystem(),
|
|
119
115
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
120
116
|
new SoundControllerSystem(),
|
|
@@ -31,8 +31,6 @@ import RenderSystem from "../../../../ecs/renderable/RenderSystem.js";
|
|
|
31
31
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
32
32
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
33
33
|
import ScriptSystem from "../../../../ecs/systems/ScriptSystem.js";
|
|
34
|
-
import SteeringSystem from "../../../../ecs/systems/SteeringSystem.js";
|
|
35
|
-
import TagSystem from "../../../../ecs/systems/TagSystem.js";
|
|
36
34
|
import TimerSystem from "../../../../ecs/systems/TimerSystem.js";
|
|
37
35
|
import ClingToTerrainSystem from "../../../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
38
36
|
import TerrainSystem from "../../../../ecs/terrain/ecs/TerrainSystem.js";
|
|
@@ -90,9 +88,7 @@ function makeConfig(engine) {
|
|
|
90
88
|
new ScriptSystem(),
|
|
91
89
|
new FacingDirectionSystem(),
|
|
92
90
|
new PathFollowingSystem(),
|
|
93
|
-
new SteeringSystem(),
|
|
94
91
|
new MotionSystem(),
|
|
95
|
-
new TagSystem(),
|
|
96
92
|
new AttachmentSystem(),
|
|
97
93
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
98
94
|
new SoundControllerSystem(),
|
|
@@ -14,7 +14,6 @@ import HeadsUpDisplaySystem from "../../ecs/gui/hud/HeadsUpDisplaySystem.js";
|
|
|
14
14
|
import ViewportPosition from "../../ecs/gui/position/ViewportPosition.js";
|
|
15
15
|
import ViewportPositionSystem from "../../ecs/gui/position/ViewportPositionSystem.js";
|
|
16
16
|
import AnimationSystem from "../../ecs/systems/AnimationSystem.js";
|
|
17
|
-
import TagSystem from "../../ecs/systems/TagSystem.js";
|
|
18
17
|
import ClingToTerrainSystem from "../../ecs/terrain/ecs/cling/ClingToTerrainSystem.js";
|
|
19
18
|
import TerrainSystem from "../../ecs/terrain/ecs/TerrainSystem.js";
|
|
20
19
|
import { EngineConfiguration } from "../../EngineConfiguration.js";
|
|
@@ -69,7 +68,6 @@ function makeConfig(engine) {
|
|
|
69
68
|
initializeGameBinarySerializationRegistry(engine.binarySerializationRegistry);
|
|
70
69
|
|
|
71
70
|
config.addManySystems(
|
|
72
|
-
new TagSystem(),
|
|
73
71
|
new AttachmentSystem(),
|
|
74
72
|
new SoundEmitterSystem(assetManager, sound.destination, sound.context),
|
|
75
73
|
new SoundControllerSystem(),
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { MaxRectanglesPacker } from "../../../../core/geom/packing/max-rect/MaxRectangles.js";
|
|
2
|
-
import { max2 } from "../../../../core/math/max2.js";
|
|
3
|
-
import { Sampler2D } from "../sampler/Sampler2D.js";
|
|
4
|
-
import IdPool from "../../../../core/IdPool.js";
|
|
5
|
-
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
6
|
-
import { AtlasPatch } from "./AtlasPatch.js";
|
|
7
|
-
import { AtlasPatchFlag } from "./AtlasPatchFlag.js";
|
|
8
|
-
import Signal from "../../../../core/events/signal/Signal.js";
|
|
9
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { ceilPowerOfTwo } from "../../../../core/binary/operations/ceilPowerOfTwo.js";
|
|
10
3
|
import { BinaryDataType } from "../../../../core/binary/type/BinaryDataType.js";
|
|
11
4
|
import {
|
|
12
5
|
DataType2TypedArrayConstructorMapping
|
|
13
6
|
} from "../../../../core/binary/type/DataType2TypedArrayConstructorMapping.js";
|
|
14
|
-
import
|
|
7
|
+
import Signal from "../../../../core/events/signal/Signal.js";
|
|
8
|
+
import { MaxRectanglesPacker } from "../../../../core/geom/packing/max-rect/MaxRectangles.js";
|
|
9
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
10
|
+
import IdPool from "../../../../core/IdPool.js";
|
|
11
|
+
import { max2 } from "../../../../core/math/max2.js";
|
|
15
12
|
import { invokeObjectClone } from "../../../../core/model/object/invokeObjectClone.js";
|
|
16
|
-
import {
|
|
13
|
+
import { Sampler2D } from "../sampler/Sampler2D.js";
|
|
14
|
+
import { sampler2d_sub_copy_same_item_size } from "../sampler/sampler2d_sub_copy_same_item_size.js";
|
|
15
|
+
import { AbstractTextureAtlas } from "./AbstractTextureAtlas.js";
|
|
16
|
+
import { AtlasPatch } from "./AtlasPatch.js";
|
|
17
|
+
import { AtlasPatchFlag } from "./AtlasPatchFlag.js";
|
|
17
18
|
|
|
18
19
|
export class TextureAtlas extends AbstractTextureAtlas {
|
|
19
20
|
/**
|
|
@@ -213,7 +214,8 @@ export class TextureAtlas extends AbstractTextureAtlas {
|
|
|
213
214
|
const patch_position = patch.position;
|
|
214
215
|
const patch_size = patch.size;
|
|
215
216
|
|
|
216
|
-
|
|
217
|
+
sampler2d_sub_copy_same_item_size(
|
|
218
|
+
target,
|
|
217
219
|
source,
|
|
218
220
|
0, 0,
|
|
219
221
|
patch_position.x, patch_position.y, patch_size.x, patch_size.y
|