@woosh/meep-engine 2.75.7 → 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 +1052 -1234
- package/build/meep.min.js +1 -1
- package/build/meep.module.js +1052 -1234
- package/editor/actions/concrete/ModifyPatchSampler2DAction.js +6 -3
- package/editor/actions/concrete/PatchTerrainTextureAction.js +6 -3
- package/editor/ecs/component/createObjectEditor.js +2 -2
- 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/core/model/object/ImmutableObjectPool.js +14 -5
- 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/storage/BinaryBufferDeSerializer.js +7 -9
- package/src/engine/ecs/storage/BinaryBufferSerializer.js +15 -16
- package/src/engine/ecs/storage/binary/BinaryClassUpgrader.js +10 -59
- package/src/engine/ecs/storage/binary/BinarySerializationRegistry.js +14 -15
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionDeSerializer.js +3 -3
- package/src/engine/ecs/storage/binary/collection/BinaryCollectionSerializer.js +60 -62
- package/src/engine/ecs/storage/binary/executeBinaryClassUpgraderChain.js +46 -0
- package/src/engine/ecs/storage/binary/object/BinaryObjectSerializationAdapter.js +2 -2
- 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/layers/TerrainLayer.js +37 -31
- package/src/engine/ecs/terrain/ecs/layers/TerrainLayers.js +8 -7
- 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/RendererPool.js +36 -40
- package/src/engine/graphics/render/buffer/FrameBuffer.js +25 -24
- package/src/engine/graphics/render/buffer/RenderGraph.js +21 -21
- package/src/engine/graphics/render/buffer/buffers/prototypeNormalFrameBuffer.js +0 -4
- package/src/engine/graphics/render/forward_plus/plugin/ptototypeFPPlugin.js +1 -5
- package/src/engine/graphics/render/frame_graph/IRenderContext.js +31 -1
- package/src/engine/graphics/render/frame_graph/RenderGraph.js +5 -5
- package/src/engine/graphics/render/frame_graph/RenderTarget.js +9 -0
- package/src/engine/graphics/render/frame_graph/RenderTextureManager.js +57 -0
- package/src/engine/graphics/render/frame_graph/ResourceEntry.js +7 -5
- package/src/engine/graphics/render/frame_graph/TextureDescriptor.js +48 -33
- package/src/engine/graphics/render/frame_graph/TextureInitialState.js +14 -0
- package/src/engine/graphics/render/frame_graph/sample/deferred/CopyPass.js +20 -0
- package/src/engine/graphics/render/frame_graph/sample/deferred/LightingPass.js +4 -0
- package/src/engine/graphics/render/frame_graph/sample/deferred/run.js +34 -6
- package/src/engine/graphics/render/frame_graph/webgl/WebGLRenderContext.js +34 -0
- package/src/engine/graphics/render/visibility/hiz/prototypeHiZ.js +3 -6
- package/src/engine/graphics/sh3/gi/prototypeSHGI.js +92 -0
- 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/graphics/texture/virtual/{v2/VirtualTextureMemoryMapping.js → VirtualTextureMemoryMapping.js} +2 -26
- package/src/engine/graphics/texture/virtual/{v2/VirtualTexturePage.js → VirtualTexturePage.js} +10 -10
- package/src/engine/graphics/texture/virtual/{v2/VirtualTextureTileLoader.js → VirtualTextureTileLoader.js} +7 -7
- package/src/engine/graphics/texture/virtual/{v2/VirtualTextureUsage.js → VirtualTextureUsage.js} +1 -1
- package/src/engine/graphics/texture/virtual/{v2/VirtualTextureUsageUpdater.js → VirtualTextureUsageUpdater.js} +7 -7
- package/src/engine/graphics/texture/virtual/{v2/debug → debug}/ResidencyDebugView.js +4 -4
- package/src/engine/graphics/texture/virtual/{v2/debug → debug}/UsageDebugView.js +2 -2
- package/src/engine/graphics/texture/virtual/{v2/debug → debug}/UsagePyramidDebugView.js +4 -4
- package/src/engine/graphics/texture/virtual/{v2/prototype.js → prototype.js} +7 -7
- package/src/engine/graphics/texture/virtual/{v2/tile → tile}/compose_finger_print.js +1 -1
- package/src/engine/graphics/texture/virtual/{v2/tile → tile}/compose_tile_address.js +2 -2
- package/src/engine/graphics/texture/virtual/{v2/tile → tile}/tile_address_to_finger_print.js +1 -1
- 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/storage/json/Blueprint.js +0 -129
- package/src/engine/ecs/storage/json/EntityFactory.js +0 -207
- package/src/engine/ecs/storage/json/JSONDeSerializer.js +0 -148
- package/src/engine/ecs/storage/json/JSONSerializer.js +0 -132
- package/src/engine/ecs/storage/json/README.md +0 -5
- 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/render/webgpu/sample/MeshInstance.js +0 -108
- package/src/engine/graphics/render/webgpu/sample/fragmentDeferredRendering.wgsl +0 -71
- package/src/engine/graphics/render/webgpu/sample/fragmentGBuffersDebugView.wgsl +0 -39
- package/src/engine/graphics/render/webgpu/sample/fragmentWriteGBuffers.wgsl +0 -21
- package/src/engine/graphics/render/webgpu/sample/lightUpdate.wgsl +0 -41
- package/src/engine/graphics/render/webgpu/sample/main.js +0 -605
- package/src/engine/graphics/render/webgpu/sample/vertexTextureQuad.wgsl +0 -9
- package/src/engine/graphics/render/webgpu/sample/vertexWriteGBuffers.wgsl +0 -30
- package/src/engine/graphics/texture/sampler/bicubic.js +0 -59
- package/src/engine/graphics/texture/sampler/bicubic.spec.js +0 -13
- package/src/engine/graphics/texture/virtual/TileOperation.js +0 -13
- package/src/engine/graphics/texture/virtual/TileTree.js +0 -150
- package/src/engine/graphics/texture/virtual/TileTree.spec.js +0 -58
- package/src/engine/graphics/texture/virtual/TileUsage.js +0 -137
- package/src/engine/graphics/texture/virtual/VirtualTexture.js +0 -238
- package/src/engine/graphics/texture/virtual/VirtualTexture.spec.js +0 -39
- package/src/engine/graphics/texture/virtual/page/TilePage.js +0 -148
- package/src/engine/graphics/texture/virtual/page/TilePageSlot.js +0 -36
- package/src/engine/graphics/texture/virtual/tile/Tile.js +0 -44
- package/src/engine/graphics/texture/virtual/tile/Tile.spec.js +0 -11
- package/src/engine/graphics/texture/virtual/tile/TileAddress.js +0 -63
- package/src/engine/graphics/texture/virtual/tile/TileAddress.spec.js +0 -30
- package/src/engine/graphics/texture/virtual/tile/TileLoader.js +0 -178
- package/src/engine/graphics/texture/virtual/tile/TileRequest.js +0 -40
- package/src/engine/graphics/texture/virtual/tile/TileStatus.js +0 -10
- package/src/engine/navigation/ecs/components/computeNonuniformCatmullRomSplineSample.js +0 -242
- /package/src/engine/graphics/texture/virtual/{v2/NOTES.md → NOTES.md} +0 -0
- /package/src/engine/graphics/texture/virtual/{v2/VirtualTextureMaterial.js → VirtualTextureMaterial.js} +0 -0
- /package/src/engine/graphics/texture/virtual/{v2/VirtualTextureUsageShader.js → VirtualTextureUsageShader.js} +0 -0
- /package/src/engine/graphics/texture/virtual/{v2/tile → tile}/VirtualTextureTile.js +0 -0
- /package/src/engine/graphics/texture/virtual/{v2/tile → tile}/decompose_finger_print.js +0 -0
- /package/src/engine/graphics/texture/virtual/{v2/tile → tile}/finger_print_to_tile_address.js +0 -0
|
@@ -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
|
|
|
@@ -1,48 +1,44 @@
|
|
|
1
1
|
import { WebGLRenderer } from 'three';
|
|
2
2
|
import { assert } from "../../../core/assert.js";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
WebGLRendererPool.prototype.get = function (options) {
|
|
9
|
-
const canvas = document.createElement('canvas');
|
|
10
|
-
const context = canvas.getContext('webgl2', { antialias: true });
|
|
11
|
-
|
|
12
|
-
const renderer = new WebGLRenderer({
|
|
13
|
-
alpha: true,
|
|
14
|
-
context,
|
|
15
|
-
canvas
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
assert.equal(renderer.domElement, canvas, 'renderer.domElement !== canvas');
|
|
19
|
-
|
|
20
|
-
this.used.add(renderer);
|
|
21
|
-
return renderer;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
*
|
|
26
|
-
* @param {THREE.WebGLRenderer} renderer
|
|
27
|
-
* @returns {boolean}
|
|
28
|
-
*/
|
|
29
|
-
WebGLRendererPool.prototype.release = function (renderer) {
|
|
30
|
-
if (!this.used.has(renderer)) {
|
|
31
|
-
//not from this pool
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
this.used.delete(renderer);
|
|
4
|
+
export class WebGLRendererPool {
|
|
5
|
+
|
|
6
|
+
used = new Set();
|
|
35
7
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
8
|
+
get(options) {
|
|
9
|
+
const canvas = document.createElement('canvas');
|
|
10
|
+
const context = canvas.getContext('webgl2', { antialias: true });
|
|
39
11
|
|
|
40
|
-
|
|
41
|
-
|
|
12
|
+
const renderer = new WebGLRenderer({
|
|
13
|
+
alpha: true,
|
|
14
|
+
context,
|
|
15
|
+
canvas
|
|
16
|
+
});
|
|
42
17
|
|
|
43
|
-
|
|
18
|
+
assert.equal(renderer.domElement, canvas, 'renderer.domElement !== canvas');
|
|
44
19
|
|
|
20
|
+
this.used.add(renderer);
|
|
21
|
+
return renderer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param {THREE.WebGLRenderer} renderer
|
|
27
|
+
* @returns {boolean}
|
|
28
|
+
*/
|
|
29
|
+
release(renderer) {
|
|
30
|
+
if (!this.used.has(renderer)) {
|
|
31
|
+
//not from this pool
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
this.used.delete(renderer);
|
|
35
|
+
|
|
36
|
+
renderer.forceContextLoss();
|
|
37
|
+
renderer.dispose();
|
|
38
|
+
renderer.domElement = null;
|
|
39
|
+
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
45
42
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
43
|
+
static global = new WebGLRendererPool();
|
|
44
|
+
}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
2
1
|
import { WebGLRenderTarget } from "three";
|
|
2
|
+
import Vector2 from "../../../../core/geom/Vector2.js";
|
|
3
3
|
|
|
4
4
|
export class FrameBuffer {
|
|
5
|
+
/**
|
|
6
|
+
* is expected to be bound during initialization
|
|
7
|
+
* @type {WebGLRenderTarget}
|
|
8
|
+
*/
|
|
9
|
+
renderTarget = null;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Number of users of the frame buffer
|
|
13
|
+
* @type {number}
|
|
14
|
+
*/
|
|
15
|
+
referenceCount = 0;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Dependency frame buffers
|
|
19
|
+
* @type {string[]}
|
|
20
|
+
*/
|
|
21
|
+
dependencies = [];
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Size of the frame buffer in pixels
|
|
25
|
+
* @type {Vector2}
|
|
26
|
+
*/
|
|
27
|
+
size = new Vector2(0, 0);
|
|
28
|
+
|
|
5
29
|
/**
|
|
6
30
|
*
|
|
7
31
|
* @param {string} id
|
|
@@ -14,29 +38,6 @@ export class FrameBuffer {
|
|
|
14
38
|
*/
|
|
15
39
|
this.id = id;
|
|
16
40
|
|
|
17
|
-
/**
|
|
18
|
-
* is expected to be bound during initialization
|
|
19
|
-
* @type {WebGLRenderTarget}
|
|
20
|
-
*/
|
|
21
|
-
this.renderTarget = null;
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Number of users of the frame buffer
|
|
25
|
-
* @type {number}
|
|
26
|
-
*/
|
|
27
|
-
this.referenceCount = 0;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Dependency frame buffers
|
|
31
|
-
* @type {string[]}
|
|
32
|
-
*/
|
|
33
|
-
this.dependencies = [];
|
|
34
|
-
|
|
35
|
-
/**
|
|
36
|
-
* Size of the frame buffer in pixels
|
|
37
|
-
* @type {Vector2}
|
|
38
|
-
*/
|
|
39
|
-
this.size = new Vector2(0, 0);
|
|
40
41
|
|
|
41
42
|
}
|
|
42
43
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { RenderProgramInstance } from "./node/RenderProgramInstance.js";
|
|
2
|
-
import { ProgramValueSlotConnectionEndpoint } from "./conection/ProgramValueSlotConnectionEndpoint.js";
|
|
3
|
-
import { ProgramValueSlotConnection } from "./conection/ProgramValueSlotConnection.js";
|
|
4
1
|
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { ProgramValueSlotConnection } from "./conection/ProgramValueSlotConnection.js";
|
|
3
|
+
import { ProgramValueSlotConnectionEndpoint } from "./conection/ProgramValueSlotConnectionEndpoint.js";
|
|
4
|
+
import { RenderProgramInstance } from "./node/RenderProgramInstance.js";
|
|
5
5
|
import { ProgramValueType } from "./slot/ProgramValueType.js";
|
|
6
6
|
|
|
7
7
|
export class RenderGraph {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @type {RenderProgramInstance[]}
|
|
12
|
+
*/
|
|
13
|
+
nodes = [];
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @type {ProgramValueSlotConnection[]}
|
|
17
|
+
*/
|
|
18
|
+
connections = [];
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {ProgramValueSlotConnectionEndpoint|null}
|
|
23
|
+
*/
|
|
24
|
+
finalOutput = null;
|
|
25
|
+
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
*
|
|
@@ -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(),
|
|
@@ -33,12 +33,10 @@ import HeadsUpDisplaySystem from "../../../../ecs/gui/hud/HeadsUpDisplaySystem.j
|
|
|
33
33
|
import ViewportPositionSystem from "../../../../ecs/gui/position/ViewportPositionSystem.js";
|
|
34
34
|
import { InverseKinematicsSystem } from "../../../../ecs/ik/InverseKinematicsSystem.js";
|
|
35
35
|
import Renderable from "../../../../ecs/renderable/Renderable.js";
|
|
36
|
+
import RenderSystem from "../../../../ecs/renderable/RenderSystem.js";
|
|
36
37
|
import AnimationSystem from "../../../../ecs/systems/AnimationSystem.js";
|
|
37
38
|
import MotionSystem from "../../../../ecs/systems/MotionSystem.js";
|
|
38
|
-
import RenderSystem from "../../../../ecs/systems/RenderSystem.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(),
|
|
@@ -1,8 +1,38 @@
|
|
|
1
1
|
//
|
|
2
2
|
|
|
3
|
+
import { RenderTextureManager } from "./RenderTextureManager.js";
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Abstracts rendering context, such as "WebGLRenderer" in THREE.js or WebGL/WebGPU
|
|
5
7
|
*/
|
|
6
8
|
export class IRenderContext {
|
|
7
|
-
|
|
9
|
+
|
|
10
|
+
resource_manager = new RenderTextureManager();
|
|
11
|
+
|
|
12
|
+
constructor() {
|
|
13
|
+
this.resource_manager.attach(this);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
* @param {TextureDescriptor} descriptor
|
|
20
|
+
* @returns {RenderTarget}
|
|
21
|
+
*/
|
|
22
|
+
createRenderTarget(descriptor) {
|
|
23
|
+
throw new Error('Not Implemented')
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {RenderTarget} target
|
|
29
|
+
* @returns {boolean}
|
|
30
|
+
*/
|
|
31
|
+
destroyRenderTarget(target) {
|
|
32
|
+
throw new Error('Not Implemented')
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
destroy() {
|
|
36
|
+
// override as necessary
|
|
37
|
+
}
|
|
8
38
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { RenderGraphBuilder } from "./RenderGraphBuilder.js";
|
|
2
|
-
import { RenderPassNode } from "./RenderPassNode.js";
|
|
3
|
-
import { ResourceNode } from "./ResourceNode.js";
|
|
4
1
|
import { assert } from "../../../../core/assert.js";
|
|
5
2
|
import LineBuilder from "../../../../core/codegen/LineBuilder.js";
|
|
3
|
+
import { RenderGraphBuilder } from "./RenderGraphBuilder.js";
|
|
4
|
+
import { RenderPassNode } from "./RenderPassNode.js";
|
|
6
5
|
import { RenderPassResources } from "./RenderPassResources.js";
|
|
7
6
|
import { ResourceEntry } from "./ResourceEntry.js";
|
|
7
|
+
import { ResourceNode } from "./ResourceNode.js";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Based on the Frostbite's GDC paper "FrameGraph: Extensible Rendering Architecture in Frostbite" by Yuriy O'Donnell
|
|
@@ -319,7 +319,7 @@ export class RenderGraph {
|
|
|
319
319
|
|
|
320
320
|
for (const id of node.resource_creates) {
|
|
321
321
|
// allocate resource
|
|
322
|
-
this.getResourceEntry(id).create();
|
|
322
|
+
this.getResourceEntry(id).create(context.resource_manager);
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
const resources = new RenderPassResources();
|
|
@@ -331,7 +331,7 @@ export class RenderGraph {
|
|
|
331
331
|
for (const entry of this.__resource_registry) {
|
|
332
332
|
if (entry.last === node && entry.isTransient()) {
|
|
333
333
|
// this was the last user of the resource and the resource is transient (no external usage)
|
|
334
|
-
entry.destroy();
|
|
334
|
+
entry.destroy(context.resource_manager);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
|