@woosh/meep-engine 2.168.0 → 2.169.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/README.md +2 -2
- package/build/bundle-worker-image-decoder.js +1 -1
- package/package.json +1 -1
- package/src/REVIEW_2026_08_06/adv-core.md +511 -0
- package/src/REVIEW_2026_08_06/adv-gfx.md +480 -0
- package/src/REVIEW_2026_08_06/adv-view.md +446 -0
- package/src/REVIEW_2026_08_06/api-core.md +296 -0
- package/src/REVIEW_2026_08_06/api-engine.md +195 -0
- package/src/REVIEW_2026_08_06/bvh-phys-sound-net.md +507 -0
- package/src/REVIEW_2026_08_06/core-binary.md +348 -0
- package/src/REVIEW_2026_08_06/core-collection.md +376 -0
- package/src/REVIEW_2026_08_06/core-math.md +221 -0
- package/src/REVIEW_2026_08_06/core-process.md +266 -0
- package/src/REVIEW_2026_08_06/core-science.md +223 -0
- package/src/REVIEW_2026_08_06/engine-ai-nav.md +279 -0
- package/src/REVIEW_2026_08_06/engine-animation.md +167 -0
- package/src/REVIEW_2026_08_06/engine-asset.md +166 -0
- package/src/REVIEW_2026_08_06/engine-ecs.md +920 -0
- package/src/REVIEW_2026_08_06/engine-input.md +197 -0
- package/src/REVIEW_2026_08_06/engine-misc.md +248 -0
- package/src/REVIEW_2026_08_06/engine-terrain.md +52 -0
- package/src/REVIEW_2026_08_06/generation.md +176 -0
- package/src/REVIEW_2026_08_06/geom-2d.md +434 -0
- package/src/REVIEW_2026_08_06/geom-3d.md +117 -0
- package/src/REVIEW_2026_08_06/gfx-gi.md +143 -0
- package/src/REVIEW_2026_08_06/gfx-render.md +740 -0
- package/src/REVIEW_2026_08_06/gfx-texture.md +690 -0
- package/src/REVIEW_2026_08_06/prior-criticals.md +49 -0
- package/src/REVIEW_2026_08_06/prior-highs.md +138 -0
- package/src/REVIEW_2026_08_06/test-gaps.md +364 -0
- package/src/REVIEW_2026_08_06/view.md +667 -0
- package/src/REVIEW_2026_08_06.md +571 -0
- package/src/core/binary/BinaryBuffer.d.ts.map +1 -1
- package/src/core/binary/BinaryBuffer.js +12 -1
- package/src/core/binary/BitImage2.d.ts +5 -1
- package/src/core/binary/BitImage2.d.ts.map +1 -1
- package/src/core/binary/BitImage2.js +5 -1
- package/src/core/bvh8/build/NodeProxy.d.ts.map +1 -1
- package/src/core/bvh8/build/NodeProxy.js +314 -308
- package/src/core/collection/list/List.d.ts +15 -0
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +34 -0
- package/src/core/collection/list/SortedListProjection.d.ts.map +1 -1
- package/src/core/collection/list/SortedListProjection.js +4 -1
- package/src/core/collection/map/BiMap.d.ts +25 -2
- package/src/core/collection/map/BiMap.d.ts.map +1 -1
- package/src/core/collection/map/BiMap.js +57 -3
- package/src/core/debug/matchers/IsAnything.d.ts.map +1 -1
- package/src/core/debug/matchers/IsAnything.js +5 -1
- package/src/core/events/signal/Signal.d.ts.map +1 -1
- package/src/core/events/signal/Signal.js +3 -1
- package/src/core/geom/2d/polygon/TRIANGULATION_DESIGN.md +433 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts +31 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_is_counter_clockwise.js +84 -0
- package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts +24 -2
- package/src/core/geom/2d/polygon/polygon2_signed_area.d.ts.map +1 -1
- package/src/core/geom/2d/polygon/polygon2_signed_area.js +52 -34
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts +28 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.corpus.js +86 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts +40 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulate.js +1280 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts +28 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.d.ts.map +1 -0
- package/src/core/geom/2d/polygon/polygon2_triangulation_deviation.js +77 -0
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts +6 -3
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.d.ts.map +1 -1
- package/src/core/geom/2d/triangle/tri2_rasterize_conservative.js +26 -13
- package/src/core/geom/2d/triangle/tri2_signed_area.d.ts +17 -1
- package/src/core/geom/2d/triangle/tri2_signed_area.d.ts.map +1 -1
- package/src/core/geom/2d/triangle/tri2_signed_area.js +35 -23
- package/src/core/geom/2d/v2_morton_encode.d.ts +20 -0
- package/src/core/geom/2d/v2_morton_encode.d.ts.map +1 -0
- package/src/core/geom/2d/v2_morton_encode.js +23 -0
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.d.ts.map +1 -1
- package/src/core/geom/3d/atlas/segment/atlas_merge_charts.js +4 -1
- package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts +27 -0
- package/src/core/geom/3d/polygon/polygon3_compute_normal.d.ts.map +1 -0
- package/src/core/geom/3d/polygon/polygon3_compute_normal.js +60 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts +34 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.d.ts.map +1 -0
- package/src/core/geom/3d/polygon/polygon3_triangulate.js +94 -0
- package/src/core/geom/3d/quaternion/quat3_multiply.d.ts +8 -2
- package/src/core/geom/3d/quaternion/quat3_multiply.d.ts.map +1 -1
- package/src/core/geom/3d/quaternion/quat3_multiply.js +8 -2
- package/src/core/geom/3d/shape/ConvexHullShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/ConvexHullShape3D.js +32 -2
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts +23 -6
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.d.ts.map +1 -1
- package/src/core/geom/3d/topology/struct/binary/io/face/bt_face_triangulate.js +268 -124
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts +17 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_assert_valid.js +44 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts +20 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_count_edge_faces.js +40 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts +19 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_closed.js +34 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts +22 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_is_manifold.js +37 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts +87 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.d.ts.map +1 -0
- package/src/core/geom/3d/topology/struct/binary/query/bt_mesh_validate.js +599 -0
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts +32 -0
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/tri3_compute_signed_volume.js +66 -7
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts +22 -1
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.d.ts.map +1 -1
- package/src/core/geom/3d/triangle/tri3_mesh_compute_signed_volume.js +83 -38
- package/src/core/geom/MANIFOLD_COMPARISON_2026_08_01.md +554 -0
- package/src/core/geom/vec3/v3_cotangent.d.ts +6 -2
- package/src/core/geom/vec3/v3_cotangent.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_cotangent.js +6 -2
- package/src/core/geom/vec3/v3_cross.d.ts +6 -2
- package/src/core/geom/vec3/v3_cross.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_cross.js +6 -2
- package/src/core/geom/vec3/v3_multiply.d.ts +6 -2
- package/src/core/geom/vec3/v3_multiply.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_multiply.js +6 -2
- package/src/core/geom/vec3/v3_subtract.d.ts +6 -2
- package/src/core/geom/vec3/v3_subtract.d.ts.map +1 -1
- package/src/core/geom/vec3/v3_subtract.js +6 -2
- package/src/core/localization/Localization.js +1 -1
- package/src/core/math/random/randomSeed.d.ts +13 -0
- package/src/core/math/random/randomSeed.d.ts.map +1 -0
- package/src/core/math/random/randomSeed.js +16 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.d.ts +50 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.d.ts.map +1 -0
- package/src/core/math/spline/spline3_hermite_apply_transform.js +107 -0
- package/src/core/math/spline/spline3_hermite_reverse.d.ts +34 -0
- package/src/core/math/spline/spline3_hermite_reverse.d.ts.map +1 -0
- package/src/core/math/spline/spline3_hermite_reverse.js +49 -0
- package/src/core/math/statistics/hammersley_sequence.d.ts +17 -4
- package/src/core/math/statistics/hammersley_sequence.d.ts.map +1 -1
- package/src/core/math/statistics/hammersley_sequence.js +25 -16
- package/src/core/process/Future.d.ts.map +1 -1
- package/src/core/process/Future.js +12 -0
- package/src/core/process/PromiseWatcher.d.ts.map +1 -1
- package/src/core/process/PromiseWatcher.js +9 -2
- package/src/core/process/executor/ConcurrentExecutor.d.ts.map +1 -1
- package/src/core/process/executor/ConcurrentExecutor.js +12 -2
- package/src/core/process/worker/WorkerProxy.d.ts.map +1 -1
- package/src/core/process/worker/WorkerProxy.js +5 -2
- package/src/core/process/worker/extractTransferables.d.ts.map +1 -1
- package/src/core/process/worker/extractTransferables.js +4 -1
- package/src/engine/Engine.d.ts +12 -12
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +149 -10
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +4 -1
- package/src/engine/asset/loaders/ArrayBufferLoader.d.ts.map +1 -1
- package/src/engine/asset/loaders/ArrayBufferLoader.js +7 -0
- package/src/engine/ecs/speaker/lines/sets/LineSetDescription.d.ts.map +1 -1
- package/src/engine/ecs/speaker/lines/sets/LineSetDescription.js +3 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/TerrainSystem.js +4 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts +29 -0
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.d.ts.map +1 -1
- package/src/engine/ecs/terrain/tiles/TerrainTileManager.js +84 -23
- package/src/engine/graphics/CONTEXT_LOSS_RECOVERY_PLAN.md +446 -0
- package/src/engine/graphics/GraphicsEngine.d.ts +56 -7
- package/src/engine/graphics/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics/GraphicsEngine.js +196 -24
- package/src/engine/graphics/context/WebGLContextFailureReason.d.ts +9 -0
- package/src/engine/graphics/context/WebGLContextFailureReason.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextFailureReason.js +17 -0
- package/src/engine/graphics/context/WebGLContextMonitor.d.ts +106 -0
- package/src/engine/graphics/context/WebGLContextMonitor.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextMonitor.js +341 -0
- package/src/engine/graphics/context/WebGLContextState.d.ts +14 -0
- package/src/engine/graphics/context/WebGLContextState.d.ts.map +1 -0
- package/src/engine/graphics/context/WebGLContextState.js +24 -0
- package/src/engine/graphics/context/testWebGLContextLoss.d.ts +2 -0
- package/src/engine/graphics/context/testWebGLContextLoss.d.ts.map +1 -0
- package/src/engine/graphics/context/testWebGLContextLoss.js +696 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.d.ts.map +1 -1
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationAdapter.js +68 -32
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts +14 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.d.ts.map +1 -0
- package/src/engine/graphics/ecs/camera/serialization/CameraSerializationUpgrader_0_1.js +41 -0
- package/src/engine/graphics/ecs/decal/v2/FPDecalSystem.js +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh-v2/ShadedGeometrySystem.js +5 -0
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts +5 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2D.js +15 -0
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail2d/Trail2DSystem.js +2 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts +4 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3D.js +488 -476
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.d.ts.map +1 -1
- package/src/engine/graphics/ecs/trail3d/Trail3DSystem.js +280 -253
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js +3 -2
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.d.ts.map +1 -1
- package/src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js +3 -1
- package/src/engine/graphics/geometry/computeMeshSurfaceArea.js +1 -1
- package/src/engine/graphics/load_and_set_cubemap_v0.d.ts +5 -0
- package/src/engine/graphics/load_and_set_cubemap_v0.d.ts.map +1 -1
- package/src/engine/graphics/load_and_set_cubemap_v0.js +26 -21
- package/src/engine/graphics/particles/particular/group/ParticleGroup.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/group/ParticleGroup.js +19 -8
- package/src/engine/graphics/particles/particular/group/optimizeCommandQueue.js +1 -1
- package/src/engine/graphics/texture/atlas/AtlasLookupTexture.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/AtlasLookupTexture.js +10 -3
- package/src/engine/graphics/texture/atlas/TextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/TextureAtlas.js +4 -1
- package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.d.ts.map +1 -1
- package/src/engine/graphics/texture/atlas/gpu/WebGLTextureAtlas.js +11 -0
- package/src/engine/graphics/texture/cubemap/load_environment_map.d.ts.map +1 -1
- package/src/engine/graphics/texture/cubemap/load_environment_map.js +5 -2
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/distance/computeSignedDistanceField_Chamfer.js +26 -18
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts +15 -2
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/filter/sampler2d_blur_gaussian.js +29 -3
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts +11 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.d.ts.map +1 -1
- package/src/engine/graphics/texture/sampler/resize/sampler2d_scale_down_lanczos.js +158 -171
- package/src/engine/graphics/texture/sampler/sampler2d_paint.js +1 -1
- package/src/engine/graphics/texture/sampler/util/bitSet2Sampler2D.js +2 -2
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.d.ts.map +1 -1
- package/src/engine/input/ecs/util/TopDownCameraControllerHelper.js +10 -3
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts +14 -0
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.d.ts.map +1 -0
- package/src/engine/navigation/ecs/components/PathSerializationUpgrader_2_3.js +38 -0
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.d.ts.map +1 -1
- package/src/engine/network/orchestrator/ServerAuthoritativeClient.js +433 -425
- package/src/engine/physics/constraint/solve_constraints.d.ts +4 -1
- package/src/engine/physics/constraint/solve_constraints.d.ts.map +1 -1
- package/src/engine/physics/constraint/solve_constraints.js +38 -13
- package/src/engine/physics/contact/ManifoldStore.d.ts +15 -3
- package/src/engine/physics/contact/ManifoldStore.d.ts.map +1 -1
- package/src/engine/physics/contact/ManifoldStore.js +15 -3
- package/src/engine/physics/ecs/Joint.d.ts +7 -4
- package/src/engine/physics/ecs/Joint.d.ts.map +1 -1
- package/src/engine/physics/ecs/Joint.js +7 -4
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +14 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +16 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/physics/fluid/ecs/FluidSystem.d.ts +3 -3
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts +15 -7
- package/src/engine/physics/narrowphase/convex_convex_manifold.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/convex_convex_manifold.js +33 -10
- package/src/engine/physics/narrowphase/refine_ray_concave.d.ts +6 -2
- package/src/engine/physics/narrowphase/refine_ray_concave.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/refine_ray_concave.js +6 -2
- package/src/engine/physics/narrowphase/refine_ray_hit.d.ts +6 -2
- package/src/engine/physics/narrowphase/refine_ray_hit.d.ts.map +1 -1
- package/src/engine/physics/narrowphase/refine_ray_hit.js +6 -2
- package/src/engine/physics/queries/raycast.d.ts.map +1 -1
- package/src/engine/physics/queries/raycast.js +11 -4
- package/src/engine/save/storage/IndexedDBStorage.d.ts.map +1 -1
- package/src/engine/save/storage/IndexedDBStorage.js +21 -3
- package/src/engine/simulation/Ticker.d.ts +12 -0
- package/src/engine/simulation/Ticker.d.ts.map +1 -1
- package/src/engine/simulation/Ticker.js +18 -0
- package/src/engine/sound/simulation/AcousticSimulator.d.ts.map +1 -1
- package/src/engine/sound/simulation/AcousticSimulator.js +9 -1
- package/src/engine/sound/simulation/core/VolumeField.d.ts +6 -2
- package/src/engine/sound/simulation/core/VolumeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/core/VolumeField.js +6 -2
- package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts +6 -2
- package/src/engine/sound/simulation/probe/AcousticProbeField.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/AcousticProbeField.js +6 -2
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts +6 -2
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/acoustic_probe_transfer.js +6 -2
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts +3 -1
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.d.ts.map +1 -1
- package/src/engine/sound/simulation/probe/bakeProbeReflectors.js +3 -1
- package/src/engine/ui/GUIEngine.d.ts.map +1 -1
- package/src/engine/ui/GUIEngine.js +8 -1
- package/src/generation/theme/TerrainTheme.d.ts.map +1 -1
- package/src/generation/theme/TerrainTheme.js +2 -1
- package/src/generation/theme/ThemeEngine.d.ts.map +1 -1
- package/src/generation/theme/ThemeEngine.js +6 -5
- package/src/view/ViewGroup.d.ts.map +1 -1
- package/src/view/ViewGroup.js +9 -7
- package/src/view/graphics/WebGLContextFailureView.d.ts +19 -0
- package/src/view/graphics/WebGLContextFailureView.d.ts.map +1 -0
- package/src/view/graphics/WebGLContextFailureView.js +76 -0
- package/src/view/minimap/Minimap.d.ts +8 -0
- package/src/view/minimap/Minimap.d.ts.map +1 -1
- package/src/view/minimap/Minimap.js +16 -3
- package/src/view/minimap/dom/MinimapMarkerView.d.ts.map +1 -1
- package/src/view/minimap/dom/MinimapMarkerView.js +3 -1
|
@@ -6,7 +6,7 @@ declare class Trail3DSystem extends System<any> {
|
|
|
6
6
|
*/
|
|
7
7
|
constructor(engine: Engine);
|
|
8
8
|
dependencies: (typeof Transform | typeof Trail3D)[];
|
|
9
|
-
components_used: ResourceAccessSpecification<typeof Trail3D>[];
|
|
9
|
+
components_used: (ResourceAccessSpecification<typeof Transform> | ResourceAccessSpecification<typeof Trail3D>)[];
|
|
10
10
|
/**
|
|
11
11
|
* @type {TubeXFixedPhysicsSimulator}
|
|
12
12
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Trail3DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail3d/Trail3DSystem.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Trail3DSystem.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/ecs/trail3d/Trail3DSystem.js"],"names":[],"mappings":";AAmDA;IAkCI;;;OAGG;IACH,4BAkBC;IAvDD,oDAAoC;IAEpC,iHAGE;IAEF;;OAEG;IACH,WAFU,0BAA0B,CAES;IAiB7C;;;OAGG;IACH,YAAgB;IAeZ;;OAEG;IACH,UAFU,cAAc,CAEO;IAE/B;;OAEG;IACH,aAFU,cAAY,IAAI,CAEH;IAG3B,2CAmBC;IAED,4CAIC;IA4DD;;;;OAIG;IACH,YAJW,OAAO,aACP,SAAS,YACT,MAAM,QAgBhB;IAED;;;;OAIG;IACH,kBAJW,OAAO,aACP,SAAS,UACT,MAAM,QAQhB;IAED;;;OAGG;IACH,yBAHW,OAAO,aACP,SAAS,QAiCnB;IAED,6BAWC;;CACJ;uBA7QsB,wBAAwB;0BACrB,qCAAqC;oBAQ3C,cAAc;4CAVU,uDAAuD;2CAMxD,0DAA0D;+BAFtE,yBAAyB"}
|
|
@@ -1,253 +1,280 @@
|
|
|
1
|
-
import { assert } from "../../../../core/assert.js";
|
|
2
|
-
import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
|
|
3
|
-
import { bvh_query_depth_range_in_frustum } from "../../../../core/bvh2/bvh3/query/bvh_query_depth_range_in_frustum.js";
|
|
4
|
-
import Vector3 from '../../../../core/geom/Vector3.js';
|
|
5
|
-
import { clamp } from "../../../../core/math/clamp.js";
|
|
6
|
-
import { max2 } from "../../../../core/math/max2.js";
|
|
7
|
-
import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js";
|
|
8
|
-
import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
|
|
9
|
-
import { System } from '../../../ecs/System.js';
|
|
10
|
-
import { Transform } from '../../../ecs/transform/Transform.js';
|
|
11
|
-
import { Reference } from "../../../reference/v2/Reference.js";
|
|
12
|
-
import { GraphicsEngine } from "../../GraphicsEngine.js";
|
|
13
|
-
import { make_bvh_visibility_builder } from "../../render/make_bvh_visibility_builder.js";
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
import
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
* @
|
|
62
|
-
*/
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
this
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
const
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
trail.
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
trail
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
//
|
|
174
|
-
//
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
1
|
+
import { assert } from "../../../../core/assert.js";
|
|
2
|
+
import { BVH } from "../../../../core/bvh2/bvh3/BVH.js";
|
|
3
|
+
import { bvh_query_depth_range_in_frustum } from "../../../../core/bvh2/bvh3/query/bvh_query_depth_range_in_frustum.js";
|
|
4
|
+
import Vector3 from '../../../../core/geom/Vector3.js';
|
|
5
|
+
import { clamp } from "../../../../core/math/clamp.js";
|
|
6
|
+
import { max2 } from "../../../../core/math/max2.js";
|
|
7
|
+
import { ResourceAccessKind } from "../../../../core/model/ResourceAccessKind.js";
|
|
8
|
+
import { ResourceAccessSpecification } from "../../../../core/model/ResourceAccessSpecification.js";
|
|
9
|
+
import { System } from '../../../ecs/System.js';
|
|
10
|
+
import { Transform } from '../../../ecs/transform/Transform.js';
|
|
11
|
+
import { Reference } from "../../../reference/v2/Reference.js";
|
|
12
|
+
import { GraphicsEngine } from "../../GraphicsEngine.js";
|
|
13
|
+
import { make_bvh_visibility_builder } from "../../render/make_bvh_visibility_builder.js";
|
|
14
|
+
import { TubeXFixedPhysicsSimulator } from "../../trail/tube/simulator/TubeXFixedPhysicsSimulator.js";
|
|
15
|
+
import { TUBE_ATTRIBUTE_ADDRESS_AGE, TUBE_ATTRIBUTE_ADDRESS_UV_V } from "../../trail/tube/tube_attributes_spec.js";
|
|
16
|
+
import { TubeXPlugin } from "../../trail/tube/TubeXPlugin.js";
|
|
17
|
+
|
|
18
|
+
import Trail3D from './Trail3D.js';
|
|
19
|
+
import { Trail3DFlags } from "./Trail3DFlags.js";
|
|
20
|
+
|
|
21
|
+
const v3Temp1 = new Vector3();
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Separate from {@link v3Temp1}: the build path runs from `link`, the head path
|
|
25
|
+
* from `update`, and sharing one scratch across the two would couple them for no
|
|
26
|
+
* gain.
|
|
27
|
+
* @type {Vector3}
|
|
28
|
+
*/
|
|
29
|
+
const v3_build_position = new Vector3();
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* World point the trail's head tracks: the component's {@link Trail3D#offset},
|
|
33
|
+
* which lives in the entity's LOCAL frame, carried through the entity's full
|
|
34
|
+
* transform — so it rides the entity's rotation and scales with it.
|
|
35
|
+
*
|
|
36
|
+
* Build-time seeding and the per-frame head update must agree on this. If they
|
|
37
|
+
* disagree, the freshly built tube sits collapsed somewhere the head never
|
|
38
|
+
* visits, and the head's first move draws a segment bridging the two — a
|
|
39
|
+
* one-frame streak as long as the disagreement, in a direction fixed by the
|
|
40
|
+
* offset rather than by travel.
|
|
41
|
+
*
|
|
42
|
+
* @param {Vector3} result
|
|
43
|
+
* @param {Trail3D} trail
|
|
44
|
+
* @param {Transform} transform
|
|
45
|
+
* @returns {void}
|
|
46
|
+
*/
|
|
47
|
+
function compute_head_position(result, trail, transform) {
|
|
48
|
+
result.copy(trail.offset);
|
|
49
|
+
result.applyMatrix4(transform.matrix);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
class Trail3DSystem extends System {
|
|
53
|
+
dependencies = [Trail3D, Transform];
|
|
54
|
+
|
|
55
|
+
components_used = [
|
|
56
|
+
ResourceAccessSpecification.from(Trail3D, ResourceAccessKind.Write),
|
|
57
|
+
ResourceAccessSpecification.from(Transform, ResourceAccessKind.Read)
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @type {TubeXFixedPhysicsSimulator}
|
|
62
|
+
*/
|
|
63
|
+
simulator = new TubeXFixedPhysicsSimulator();
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* @type {Reference<TubeXPlugin>}
|
|
67
|
+
*/
|
|
68
|
+
#tube_plugin = Reference.NULL;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @type {number}
|
|
72
|
+
*/
|
|
73
|
+
#timeDelta = 0;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @type {Engine}
|
|
77
|
+
*/
|
|
78
|
+
#engine = null;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @private
|
|
82
|
+
* @type {BVH}
|
|
83
|
+
*/
|
|
84
|
+
bvh = new BVH();
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @param {Engine} engine
|
|
88
|
+
* @constructor
|
|
89
|
+
*/
|
|
90
|
+
constructor(engine) {
|
|
91
|
+
super();
|
|
92
|
+
|
|
93
|
+
assert.defined(engine, 'engine');
|
|
94
|
+
assert.notNull(engine, 'engine');
|
|
95
|
+
assert.equal(engine.isEngine, true, 'engine.isEngine !== true');
|
|
96
|
+
|
|
97
|
+
this.#engine = engine;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @type {GraphicsEngine}
|
|
101
|
+
*/
|
|
102
|
+
this.graphics = engine.graphics;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @type {RenderLayer|null}
|
|
106
|
+
*/
|
|
107
|
+
this.renderLayer = null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
async startup(entityManager) {
|
|
111
|
+
this.entityManager = entityManager;
|
|
112
|
+
|
|
113
|
+
this.renderLayer = this.graphics.layers.create('trail-3d-system');
|
|
114
|
+
|
|
115
|
+
this.renderLayer.buildVisibleSet = make_bvh_visibility_builder(
|
|
116
|
+
this.entityManager, this.bvh,
|
|
117
|
+
(destination, offset, entity, ecd) => {
|
|
118
|
+
destination[offset] = ecd.getComponent(entity, Trail3D).mesh
|
|
119
|
+
return 1;
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
const bvh = this.bvh;
|
|
124
|
+
this.renderLayer.compute_depth_range = (result, frustum, nx, ny, nz, c) => {
|
|
125
|
+
bvh_query_depth_range_in_frustum(result, bvh, frustum, nx, ny, nz, c);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
this.#tube_plugin = await this.#engine.plugins.acquire(TubeXPlugin);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
async shutdown(entityManager) {
|
|
132
|
+
this.graphics.layers.remove(this.renderLayer);
|
|
133
|
+
|
|
134
|
+
this.#tube_plugin.release();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @param {Trail3D} trail
|
|
139
|
+
* @param {Transform} transform
|
|
140
|
+
*/
|
|
141
|
+
#build_trail(trail, transform) {
|
|
142
|
+
const segmentsPerSecond = 60;
|
|
143
|
+
const maxSegments = 1024;
|
|
144
|
+
|
|
145
|
+
const segment_count = Math.ceil(clamp(trail.maxAge * segmentsPerSecond, 2, maxSegments));
|
|
146
|
+
|
|
147
|
+
trail.build(segment_count);
|
|
148
|
+
|
|
149
|
+
const tube = trail.tube;
|
|
150
|
+
|
|
151
|
+
const tubes = this.#tube_plugin.getValue();
|
|
152
|
+
|
|
153
|
+
const material = tubes.obtain_material_x(trail.material);
|
|
154
|
+
|
|
155
|
+
trail.mesh.material = material;
|
|
156
|
+
|
|
157
|
+
trail.time = 0;
|
|
158
|
+
trail.trailingIndex = 0;
|
|
159
|
+
trail.timeSinceLastUpdate = 0;
|
|
160
|
+
trail.distanceSinceLastUpdate = 0;
|
|
161
|
+
|
|
162
|
+
// seed exactly where updateTrailEntity will place the head, or the first
|
|
163
|
+
// head move bridges the gap with a visible segment
|
|
164
|
+
compute_head_position(v3_build_position, trail, transform);
|
|
165
|
+
|
|
166
|
+
const position_x = v3_build_position.x;
|
|
167
|
+
const position_y = v3_build_position.y;
|
|
168
|
+
const position_z = v3_build_position.z;
|
|
169
|
+
|
|
170
|
+
const color = trail.color;
|
|
171
|
+
|
|
172
|
+
// initialize knots. setCount has already seeded a valid default frame on every
|
|
173
|
+
// knot, so the freshly built (collapsed) tube is well-formed — a zero-length,
|
|
174
|
+
// invisible point — until the head starts moving and supplies real tangents.
|
|
175
|
+
for (let i = 0; i < segment_count; i++) {
|
|
176
|
+
const f = i / (segment_count - 1);
|
|
177
|
+
|
|
178
|
+
tube.setKnotColor(i, color.x * 255, color.y * 255, color.z * 255);
|
|
179
|
+
tube.setKnotPosition(i, position_x, position_y, position_z);
|
|
180
|
+
tube.setKnotThickness(i, trail.width);
|
|
181
|
+
tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_UV_V, f);
|
|
182
|
+
// seeded age = maxAge means "already expired", so alpha follows the fade law: 0
|
|
183
|
+
tube.setKnotAlpha(i, 0);
|
|
184
|
+
tube.setKnotAttribute_Scalar(i, TUBE_ATTRIBUTE_ADDRESS_AGE, trail.maxAge);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
trail.bvh.resize(
|
|
188
|
+
position_x, position_y, position_z,
|
|
189
|
+
position_x, position_y, position_z
|
|
190
|
+
);
|
|
191
|
+
|
|
192
|
+
trail.setFlag(Trail3DFlags.Built);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @param {Trail3D} trail
|
|
197
|
+
* @param {Transform} transform
|
|
198
|
+
* @param {number} entityId
|
|
199
|
+
*/
|
|
200
|
+
link(trail, transform, entityId) {
|
|
201
|
+
// Trail3DFlags.Lit is final by link time — bake it into the material spec
|
|
202
|
+
// (the material cache key) so lit and unlit trails obtain distinct materials
|
|
203
|
+
trail.material.lit = trail.getFlag(Trail3DFlags.Lit);
|
|
204
|
+
|
|
205
|
+
if (!trail.getFlag(Trail3DFlags.Built)) {
|
|
206
|
+
this.#build_trail(trail, transform);
|
|
207
|
+
} else {
|
|
208
|
+
|
|
209
|
+
const material = this.#tube_plugin.getValue().obtain_material_x(trail.material);
|
|
210
|
+
trail.mesh.material = material;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
trail.bvh.link(this.bvh, entityId);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* @param {Trail3D} component
|
|
218
|
+
* @param {Transform} transform
|
|
219
|
+
* @param {number} entity
|
|
220
|
+
*/
|
|
221
|
+
unlink(component, transform, entity) {
|
|
222
|
+
|
|
223
|
+
component.bvh.unlink();
|
|
224
|
+
|
|
225
|
+
// release resources
|
|
226
|
+
component.dispose();
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* @param {Trail3D} trail
|
|
231
|
+
* @param {Transform} transform
|
|
232
|
+
*/
|
|
233
|
+
updateTrailEntity(trail, transform) {
|
|
234
|
+
const timeDelta = this.#timeDelta;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* @type {TubeX|null}
|
|
238
|
+
*/
|
|
239
|
+
const tube = trail.tube;
|
|
240
|
+
|
|
241
|
+
const newPosition = v3Temp1;
|
|
242
|
+
|
|
243
|
+
compute_head_position(newPosition, trail, transform);
|
|
244
|
+
|
|
245
|
+
trail.timeSinceLastUpdate += timeDelta;
|
|
246
|
+
trail.time += timeDelta;
|
|
247
|
+
|
|
248
|
+
const ageOffset = max2(0, trail.maxAge - trail.time);
|
|
249
|
+
|
|
250
|
+
this.simulator.update(tube, trail.maxAge, timeDelta, trail.color.w);
|
|
251
|
+
|
|
252
|
+
if (trail.getFlag(Trail3DFlags.Spawning)) {
|
|
253
|
+
trail.updateHead(newPosition.x, newPosition.y, newPosition.z, ageOffset);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
if (trail.getFlag(Trail3DFlags.BoundsNeedUpdate)) {
|
|
257
|
+
const bvh = trail.bvh;
|
|
258
|
+
|
|
259
|
+
tube.computeBoundingBox(bvh.bounds);
|
|
260
|
+
bvh.write_bounds();
|
|
261
|
+
|
|
262
|
+
trail.clearFlag(Trail3DFlags.BoundsNeedUpdate);
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
update(timeDelta) {
|
|
267
|
+
|
|
268
|
+
const em = this.entityManager;
|
|
269
|
+
|
|
270
|
+
const dataset = em.dataset;
|
|
271
|
+
|
|
272
|
+
this.#timeDelta = timeDelta;
|
|
273
|
+
|
|
274
|
+
if (dataset !== null) {
|
|
275
|
+
dataset.traverseEntities([Trail3D, Transform], this.updateTrailEntity, this);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export default Trail3DSystem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BuildNeighborsFast.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,8CANW,UAAU,UACV,MAAM,EAAE,GAAC,YAAY,eACrB,MAAM,EAAE,kBACR,MAAM,GACJ,IAAI,
|
|
1
|
+
{"version":3,"file":"BuildNeighborsFast.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/BuildNeighborsFast.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,8CANW,UAAU,UACV,MAAM,EAAE,GAAC,YAAY,eACrB,MAAM,EAAE,kBACR,MAAM,GACJ,IAAI,CA8HhB"}
|
|
@@ -112,9 +112,10 @@ export function BuildNeighborsFast(pTriInfos, pEdges, piTriListIn, iNrTrianglesI
|
|
|
112
112
|
pEdges[j * 3 + 1]
|
|
113
113
|
); // resolve index ordering and edge_num
|
|
114
114
|
|
|
115
|
-
// flip i0_B and i1_B
|
|
115
|
+
// flip i0_B and i1_B: an adjacent face walks the shared edge in the
|
|
116
|
+
// opposite direction, so B's pair matches A's only once reversed
|
|
116
117
|
const i0_B = temp_edge_B[1];
|
|
117
|
-
const i1_B = temp_edge_B[
|
|
118
|
+
const i1_B = temp_edge_B[0];
|
|
118
119
|
const edgenum_B = temp_edge_B[2];
|
|
119
120
|
|
|
120
121
|
//assert(!(i0_A==i1_B && i1_A==i0_B));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenerateSharedVerticesIndexList.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"GenerateSharedVerticesIndexList.d.ts","sourceRoot":"","sources":["../../../../../../src/engine/graphics/geometry/MikkT/GenerateSharedVerticesIndexList.js"],"names":[],"mappings":"AAqGA;;;;;;GAMG;AACH,sEALW,MAAM,EAAE,GAAC,UAAU,gDAEnB,MAAM,GACJ,IAAI,CAuGhB"}
|
|
@@ -76,7 +76,9 @@ function radixsort_pair(comp, data, comp2, data2, n) {
|
|
|
76
76
|
for (let pass = 0; pass < data_size; pass++, shift += 8) {
|
|
77
77
|
/* Insert the elements in their correct location based on their bin. */
|
|
78
78
|
for (let i = 0; i < n; i++) {
|
|
79
|
-
|
|
79
|
+
// `+` binds tighter than `&`, so the mask has to be parenthesised or
|
|
80
|
+
// it applies to the whole sum and every pass past the first mis-bins
|
|
81
|
+
const bin_index = pass * 257 + ((_comp_0[i] >> shift) & 0xff);
|
|
80
82
|
|
|
81
83
|
const pos = bins[bin_index]++;
|
|
82
84
|
|
|
@@ -37,7 +37,7 @@ export function computeMeshSurfaceArea(result, points, indices, polygon_count =
|
|
|
37
37
|
const c3 = c * 3;
|
|
38
38
|
|
|
39
39
|
const x2 = points[c3];
|
|
40
|
-
const y2 = points[c3 +
|
|
40
|
+
const y2 = points[c3 + 1];
|
|
41
41
|
const z2 = points[c3 + 2];
|
|
42
42
|
|
|
43
43
|
const area = tri3_area(x0, y0, z0, x1, y1, z1, x2, y2, z2);
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* Loads a piece-wise cubemap and installs it as the scene's image-based-lighting source.
|
|
3
|
+
*
|
|
4
|
+
* The prefiltering (PMREM) is performed by the graphics engine rather than the loader, so that the
|
|
5
|
+
* engine keeps hold of the source texture and can repeat the bake - the prefiltered result lives in a
|
|
6
|
+
* render target and does not survive a WebGL context loss.
|
|
2
7
|
*
|
|
3
8
|
* @param {GraphicsEngine} graphics
|
|
4
9
|
* @param {string} folder_path
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load_and_set_cubemap_v0.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/load_and_set_cubemap_v0.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"load_and_set_cubemap_v0.d.ts","sourceRoot":"","sources":["../../../../src/engine/graphics/load_and_set_cubemap_v0.js"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,+EAHW,MAAM,kBACN,MAAM,iBAYhB"}
|