@woosh/meep-engine 3.14.5 → 3.14.6
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 +6 -0
- package/editor/Editor.d.ts +162 -0
- package/editor/Editor.d.ts.map +1 -0
- package/editor/EditorCameraNavigation.d.ts +22 -0
- package/editor/EditorCameraNavigation.d.ts.map +1 -0
- package/editor/EditorKeyMap.d.ts +28 -0
- package/editor/EditorKeyMap.d.ts.map +1 -0
- package/editor/SelectionVisualizer.d.ts +37 -0
- package/editor/SelectionVisualizer.d.ts.map +1 -0
- package/editor/actions/concrete/ActionInvalidateSampler.d.ts +18 -0
- package/editor/actions/concrete/ActionInvalidateSampler.d.ts.map +1 -0
- package/editor/actions/concrete/ActionUpdateTexture.d.ts +12 -0
- package/editor/actions/concrete/ActionUpdateTexture.d.ts.map +1 -0
- package/editor/actions/concrete/ActionUpdateTexture.js +1 -1
- package/editor/actions/concrete/ArrayCopyAction.d.ts +20 -0
- package/editor/actions/concrete/ArrayCopyAction.d.ts.map +1 -0
- package/editor/actions/concrete/ComponentAddAction.d.ts +15 -0
- package/editor/actions/concrete/ComponentAddAction.d.ts.map +1 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts +11 -0
- package/editor/actions/concrete/ComponentRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/EntityCreateAction.d.ts +18 -0
- package/editor/actions/concrete/EntityCreateAction.d.ts.map +1 -0
- package/editor/actions/concrete/EntityRemoveAction.d.ts +11 -0
- package/editor/actions/concrete/EntityRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts +47 -0
- package/editor/actions/concrete/ModifyPatchSampler2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts +38 -0
- package/editor/actions/concrete/ModifyPatchTextureArray2DAction.d.ts.map +1 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts +23 -0
- package/editor/actions/concrete/PaintTerrainOverlayAction.d.ts.map +1 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts +32 -0
- package/editor/actions/concrete/PatchTerrainHeightAction.d.ts.map +1 -0
- package/editor/actions/concrete/SelectionAddAction.d.ts +19 -0
- package/editor/actions/concrete/SelectionAddAction.d.ts.map +1 -0
- package/editor/actions/concrete/SelectionClearAction.d.ts +9 -0
- package/editor/actions/concrete/SelectionClearAction.d.ts.map +1 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts +10 -0
- package/editor/actions/concrete/SelectionRemoveAction.d.ts.map +1 -0
- package/editor/actions/concrete/TransformModifyAction.d.ts +17 -0
- package/editor/actions/concrete/TransformModifyAction.d.ts.map +1 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts +14 -0
- package/editor/actions/concrete/WriteGridValueAction.d.ts.map +1 -0
- package/editor/camera/camera_framing.d.ts +33 -0
- package/editor/camera/camera_framing.d.ts.map +1 -0
- package/editor/clipboard.d.ts +19 -0
- package/editor/clipboard.d.ts.map +1 -0
- package/editor/ecs/EditorEntity.d.ts +16 -0
- package/editor/ecs/EditorEntity.d.ts.map +1 -0
- package/editor/ecs/EditorEntitySystem.d.ts +8 -0
- package/editor/ecs/EditorEntitySystem.d.ts.map +1 -0
- package/editor/ecs/component/TypeEditor.d.ts +7 -1
- package/editor/ecs/component/TypeEditor.d.ts.map +1 -1
- package/editor/ecs/component/TypeEditor.js +5 -0
- package/editor/ecs/component/editors/ColorEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ColorEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/HTMLElementEditor.d.ts +7 -0
- package/editor/ecs/component/editors/HTMLElementEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ImagePathEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ImagePathEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/LargeStringEditor.d.ts +16 -0
- package/editor/ecs/component/editors/LargeStringEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/NumericIntervalEditor.d.ts +7 -0
- package/editor/ecs/component/editors/NumericIntervalEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ObservedBooleanEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ObservedBooleanEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ObservedEnumEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ObservedEnumEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ObservedIntegerEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ObservedIntegerEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ObservedStringEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ObservedStringEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/Sampler2DEditor.d.ts +7 -0
- package/editor/ecs/component/editors/Sampler2DEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/collection/ListEditor.d.ts +8 -0
- package/editor/ecs/component/editors/collection/ListEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/common/BitFlagsEditor.d.ts +12 -0
- package/editor/ecs/component/editors/common/BitFlagsEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/common/EnumEditor.d.ts +8 -0
- package/editor/ecs/component/editors/common/EnumEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/common/makeV3_editor.d.ts +15 -0
- package/editor/ecs/component/editors/common/makeV3_editor.d.ts.map +1 -0
- package/editor/ecs/component/editors/common/noEditor.d.ts +3 -0
- package/editor/ecs/component/editors/common/noEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/common/two_way_sync.d.ts +22 -0
- package/editor/ecs/component/editors/common/two_way_sync.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/GridObstacleEditor.d.ts +7 -0
- package/editor/ecs/component/editors/ecs/GridObstacleEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts +14 -0
- package/editor/ecs/component/editors/ecs/MinimapMarkerEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts +20 -0
- package/editor/ecs/component/editors/ecs/ParameterLookupTableEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts +12 -0
- package/editor/ecs/component/editors/ecs/ParameterTrackEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts +14 -0
- package/editor/ecs/component/editors/ecs/ParameterTrackSetEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts +52 -0
- package/editor/ecs/component/editors/ecs/ParticleEmitterEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts +47 -0
- package/editor/ecs/component/editors/ecs/ParticleEmitterLayerEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/SGMeshEditor.d.ts +21 -0
- package/editor/ecs/component/editors/ecs/SGMeshEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/ShadedGeometryEditor.d.ts +26 -0
- package/editor/ecs/component/editors/ecs/ShadedGeometryEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts +16 -0
- package/editor/ecs/component/editors/ecs/SimulationStepDefinitionEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/Trail2DEditor.d.ts +15 -0
- package/editor/ecs/component/editors/ecs/Trail2DEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts +42 -0
- package/editor/ecs/component/editors/ecs/Trail3DEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/TransformEditor.d.ts +20 -0
- package/editor/ecs/component/editors/ecs/TransformEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/buildGridObstaclePreview.d.ts +8 -0
- package/editor/ecs/component/editors/ecs/buildGridObstaclePreview.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.d.ts +19 -0
- package/editor/ecs/component/editors/ecs/terrain/SplatMappingEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.d.ts +27 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.d.ts +16 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainLayerEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.d.ts +19 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainLayersEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.d.ts +18 -0
- package/editor/ecs/component/editors/ecs/terrain/TerrainOverlayEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts +6 -0
- package/editor/ecs/component/editors/geom/QuaternionEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/Vector1Editor.d.ts +7 -0
- package/editor/ecs/component/editors/geom/Vector1Editor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/Vector2Editor.d.ts +6 -0
- package/editor/ecs/component/editors/geom/Vector2Editor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/Vector3Editor.d.ts +6 -0
- package/editor/ecs/component/editors/geom/Vector3Editor.d.ts.map +1 -0
- package/editor/ecs/component/editors/geom/Vector4Editor.d.ts +6 -0
- package/editor/ecs/component/editors/geom/Vector4Editor.d.ts.map +1 -0
- package/editor/ecs/component/editors/primitive/ArrayEditor.d.ts +8 -0
- package/editor/ecs/component/editors/primitive/ArrayEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/primitive/BooleanEditor.d.ts +7 -0
- package/editor/ecs/component/editors/primitive/BooleanEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/primitive/FunctionEditor.d.ts +7 -0
- package/editor/ecs/component/editors/primitive/FunctionEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/primitive/NumberEditor.d.ts +8 -0
- package/editor/ecs/component/editors/primitive/NumberEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/primitive/StringEditor.d.ts +7 -0
- package/editor/ecs/component/editors/primitive/StringEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/shade/MeshletGeometryEditor.d.ts +28 -0
- package/editor/ecs/component/editors/shade/MeshletGeometryEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/shade/ShadeImageEditor.d.ts +29 -0
- package/editor/ecs/component/editors/shade/ShadeImageEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/shade/ShadeMaterialEditor.d.ts +28 -0
- package/editor/ecs/component/editors/shade/ShadeMaterialEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/shade/ShadeTextureEditor.d.ts +41 -0
- package/editor/ecs/component/editors/shade/ShadeTextureEditor.d.ts.map +1 -0
- package/editor/ecs/component/editors/shade/StandardShadeMaterialEditor.d.ts +31 -0
- package/editor/ecs/component/editors/shade/StandardShadeMaterialEditor.d.ts.map +1 -0
- package/editor/ecs/component/prototypeObjectEditor.d.ts +2 -0
- package/editor/ecs/component/prototypeObjectEditor.d.ts.map +1 -0
- package/editor/ecs/component/registerBasicTypeEditors.d.ts +11 -0
- package/editor/ecs/component/registerBasicTypeEditors.d.ts.map +1 -0
- package/editor/ecs/component/registerEngineComponentEditors.d.ts +8 -0
- package/editor/ecs/component/registerEngineComponentEditors.d.ts.map +1 -0
- package/editor/enableEditor.d.ts +14 -0
- package/editor/enableEditor.d.ts.map +1 -0
- package/editor/entity_world_bounds.d.ts +17 -0
- package/editor/entity_world_bounds.d.ts.map +1 -0
- package/editor/library/MeshLibrary.d.ts +13 -0
- package/editor/library/MeshLibrary.d.ts.map +1 -0
- package/editor/particles/lut_ops.d.ts +34 -0
- package/editor/particles/lut_ops.d.ts.map +1 -0
- package/editor/particles/particleEditEvents.d.ts +11 -0
- package/editor/particles/particleEditEvents.d.ts.map +1 -0
- package/editor/particles/rebuildParticleEmitter.d.ts +11 -0
- package/editor/particles/rebuildParticleEmitter.d.ts.map +1 -0
- package/editor/persistence/EditorLayoutStore.d.ts +30 -0
- package/editor/persistence/EditorLayoutStore.d.ts.map +1 -0
- package/editor/persistence/SceneMetadata.d.ts +38 -0
- package/editor/persistence/SceneMetadata.d.ts.map +1 -0
- package/editor/persistence/SceneSlotManager.d.ts +40 -0
- package/editor/persistence/SceneSlotManager.d.ts.map +1 -0
- package/editor/persistence/buildNewSceneDataset.d.ts +10 -0
- package/editor/persistence/buildNewSceneDataset.d.ts.map +1 -0
- package/editor/persistence/files.d.ts +24 -0
- package/editor/persistence/files.d.ts.map +1 -0
- package/editor/persistence/scene_import.d.ts +45 -0
- package/editor/persistence/scene_import.d.ts.map +1 -0
- package/editor/persistence/scene_serialization.d.ts +36 -0
- package/editor/persistence/scene_serialization.d.ts.map +1 -0
- package/editor/persistence/string_buffer_codec.d.ts +20 -0
- package/editor/persistence/string_buffer_codec.d.ts.map +1 -0
- package/editor/process/DisableGameUIProcess.d.ts +8 -0
- package/editor/process/DisableGameUIProcess.d.ts.map +1 -0
- package/editor/process/EditorProcess.d.ts +19 -0
- package/editor/process/EditorProcess.d.ts.map +1 -0
- package/editor/process/GridDisplayProcess.d.ts +35 -0
- package/editor/process/GridDisplayProcess.d.ts.map +1 -0
- package/editor/process/ObstacleGridDisplayProcess.d.ts +13 -0
- package/editor/process/ObstacleGridDisplayProcess.d.ts.map +1 -0
- package/editor/process/ParticleEmitterRebuildProcess.d.ts +66 -0
- package/editor/process/ParticleEmitterRebuildProcess.d.ts.map +1 -0
- package/editor/process/ProcessEngine.d.ts +30 -0
- package/editor/process/ProcessEngine.d.ts.map +1 -0
- package/editor/process/SymbolicDisplayProcess.d.ts +23 -0
- package/editor/process/SymbolicDisplayProcess.d.ts.map +1 -0
- package/editor/process/symbolic/AudioEmitterSymbolicDisplay.d.ts +17 -0
- package/editor/process/symbolic/AudioEmitterSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/CameraSymbolicDisplay.d.ts +25 -0
- package/editor/process/symbolic/CameraSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/GridPositionSymbolicDisplay.d.ts +19 -0
- package/editor/process/symbolic/GridPositionSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/LightSymbolicDisplay.d.ts +19 -0
- package/editor/process/symbolic/LightSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts +18 -0
- package/editor/process/symbolic/ParticleEmitterSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/PathSymbolicDisplay.d.ts +20 -0
- package/editor/process/symbolic/PathSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/PositionedMarkerSymbolicDisplay.d.ts +25 -0
- package/editor/process/symbolic/PositionedMarkerSymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/SymbolicDisplay.d.ts +48 -0
- package/editor/process/symbolic/SymbolicDisplay.d.ts.map +1 -0
- package/editor/process/symbolic/gizmo_draw_wire_box_oriented.d.ts +13 -0
- package/editor/process/symbolic/gizmo_draw_wire_box_oriented.d.ts.map +1 -0
- package/editor/process/symbolic/gizmo_draw_wire_circle.d.ts +18 -0
- package/editor/process/symbolic/gizmo_draw_wire_circle.d.ts.map +1 -0
- package/editor/prototypeEditorShell.d.ts +13 -0
- package/editor/prototypeEditorShell.d.ts.map +1 -0
- package/editor/selection/editor_pick.d.ts +43 -0
- package/editor/selection/editor_pick.d.ts.map +1 -0
- package/editor/selection/screen_rect_frustum.d.ts +32 -0
- package/editor/selection/screen_rect_frustum.d.ts.map +1 -0
- package/editor/templates/entity_templates.d.ts +19 -0
- package/editor/templates/entity_templates.d.ts.map +1 -0
- package/editor/tools/GridPaintTool.d.ts +18 -0
- package/editor/tools/GridPaintTool.d.ts.map +1 -0
- package/editor/tools/SelectionTool.d.ts +38 -0
- package/editor/tools/SelectionTool.d.ts.map +1 -0
- package/editor/tools/SelectionTool.js +2 -2
- package/editor/tools/TransformToolV2.d.ts +70 -0
- package/editor/tools/TransformToolV2.d.ts.map +1 -0
- package/editor/tools/engine/Tool.d.ts +88 -0
- package/editor/tools/engine/Tool.d.ts.map +1 -0
- package/editor/tools/engine/ToolEngine.d.ts +22 -0
- package/editor/tools/engine/ToolEngine.d.ts.map +1 -0
- package/editor/tools/engine/ToolState.d.ts +7 -0
- package/editor/tools/engine/ToolState.d.ts.map +1 -0
- package/editor/tools/paint/TerrainHeightPaintTool.d.ts +18 -0
- package/editor/tools/paint/TerrainHeightPaintTool.d.ts.map +1 -0
- package/editor/tools/paint/TerrainPaintTool.d.ts +82 -0
- package/editor/tools/paint/TerrainPaintTool.d.ts.map +1 -0
- package/editor/tools/paint/TerrainTexturePaintTool.d.ts +19 -0
- package/editor/tools/paint/TerrainTexturePaintTool.d.ts.map +1 -0
- package/editor/tools/v2/BlenderCameraOrientationGizmo.d.ts +139 -0
- package/editor/tools/v2/BlenderCameraOrientationGizmo.d.ts.map +1 -0
- package/editor/tools/v2/GizmoNode.d.ts +21 -0
- package/editor/tools/v2/GizmoNode.d.ts.map +1 -0
- package/editor/tools/v2/TransformControls.d.ts +219 -0
- package/editor/tools/v2/TransformControls.d.ts.map +1 -0
- package/editor/tools/v2/TransformMode.d.ts +7 -0
- package/editor/tools/v2/TransformMode.d.ts.map +1 -0
- package/editor/tools/v2/handle/gizmo_drag_plane.d.ts +37 -0
- package/editor/tools/v2/handle/gizmo_drag_plane.d.ts.map +1 -0
- package/editor/tools/v2/handle/gizmo_draw.d.ts +14 -0
- package/editor/tools/v2/handle/gizmo_draw.d.ts.map +1 -0
- package/editor/tools/v2/handle/gizmo_handles.d.ts +160 -0
- package/editor/tools/v2/handle/gizmo_handles.d.ts.map +1 -0
- package/editor/tools/v2/handle/gizmo_ray_shapes.d.ts +103 -0
- package/editor/tools/v2/handle/gizmo_ray_shapes.d.ts.map +1 -0
- package/editor/view/GridPickCoordinateView.d.ts +22 -0
- package/editor/view/GridPickCoordinateView.d.ts.map +1 -0
- package/editor/view/ecs/ComponentControlView.d.ts +24 -0
- package/editor/view/ecs/ComponentControlView.d.ts.map +1 -0
- package/editor/view/ecs/EntityEditor.d.ts +25 -0
- package/editor/view/ecs/EntityEditor.d.ts.map +1 -0
- package/editor/view/ecs/EntityList.d.ts +22 -0
- package/editor/view/ecs/EntityList.d.ts.map +1 -0
- package/editor/view/ecs/HierarchicalEntityListView.d.ts +25 -0
- package/editor/view/ecs/HierarchicalEntityListView.d.ts.map +1 -0
- package/editor/view/ecs/components/DatGuiController.d.ts +2 -0
- package/editor/view/ecs/components/DatGuiController.d.ts.map +1 -0
- package/editor/view/ecs/components/color/GaugeView.d.ts +9 -5
- package/editor/view/ecs/components/color/GaugeView.d.ts.map +1 -1
- package/editor/view/ecs/components/color/GaugeView.js +4 -4
- package/editor/view/ecs/components/common/NumberController.d.ts +9 -5
- package/editor/view/ecs/components/common/NumberController.d.ts.map +1 -1
- package/editor/view/ecs/components/common/NumberController.js +4 -4
- package/editor/view/ecs/components/common/NumericIntervalController.d.ts +10 -0
- package/editor/view/ecs/components/common/NumericIntervalController.d.ts.map +1 -0
- package/editor/view/ecs/components/common/TextController.d.ts.map +1 -1
- package/editor/view/library/MeshLibraryView.d.ts +16 -0
- package/editor/view/library/MeshLibraryView.d.ts.map +1 -0
- package/editor/view/library/mesh_library_drag.d.ts +21 -0
- package/editor/view/library/mesh_library_drag.d.ts.map +1 -0
- package/editor/view/library/model_thumbnail_source.d.ts +12 -0
- package/editor/view/library/model_thumbnail_source.d.ts.map +1 -0
- package/editor/view/makeEntityDecorators.d.ts +6 -0
- package/editor/view/makeEntityDecorators.d.ts.map +1 -0
- package/editor/view/node-graph/NodeGraphCamera.d.ts.map +1 -1
- package/editor/view/node-graph/NodeGraphEditorView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeGraphSelection.d.ts.map +1 -1
- package/editor/view/node-graph/NodeGraphView.d.ts.map +1 -1
- package/editor/view/node-graph/NodeView.d.ts.map +1 -1
- package/editor/view/node-graph/PortView.d.ts.map +1 -1
- package/editor/view/node-graph/actions/ConnectionCreateAction.d.ts.map +1 -1
- package/editor/view/node-graph/actions/ConnectionDeleteAction.d.ts.map +1 -1
- package/editor/view/node-graph/actions/NodeDeleteAction.d.ts.map +1 -1
- package/editor/view/node-graph/actions/NodeParameterSetAction.d.ts.map +1 -1
- package/editor/view/node-graph/actions/NodesMoveAction.d.ts.map +1 -1
- package/editor/view/node-graph/actions/SelectionSetAction.d.ts.map +1 -1
- package/editor/view/node-graph/connection_wire_geometry.d.ts.map +1 -1
- package/editor/view/particles/ColorLutGradientView.d.ts +19 -0
- package/editor/view/particles/ColorLutGradientView.d.ts.map +1 -0
- package/editor/view/particles/ScalarLutCurveView.d.ts +19 -0
- package/editor/view/particles/ScalarLutCurveView.d.ts.map +1 -0
- package/editor/view/prepareMeshLibrary.d.ts +7 -0
- package/editor/view/prepareMeshLibrary.d.ts.map +1 -0
- package/editor/view/process/ProcessView.d.ts +14 -0
- package/editor/view/process/ProcessView.d.ts.map +1 -0
- package/editor/view/shell/EditorShellView.d.ts +18 -0
- package/editor/view/shell/EditorShellView.d.ts.map +1 -0
- package/editor/view/shell/SceneTreePanelView.d.ts +17 -0
- package/editor/view/shell/SceneTreePanelView.d.ts.map +1 -0
- package/editor/view/shell/ViewportPanelView.d.ts +18 -0
- package/editor/view/shell/ViewportPanelView.d.ts.map +1 -0
- package/editor/view/tools/ToolSettingsView.d.ts +22 -0
- package/editor/view/tools/ToolSettingsView.d.ts.map +1 -0
- package/editor/view/tools/ToolView.d.ts +13 -0
- package/editor/view/tools/ToolView.d.ts.map +1 -0
- package/editor/view/v2/SplitView.d.ts +2 -0
- package/editor/view/v2/SplitView.d.ts.map +1 -0
- package/package.json +9 -11
- package/samples/engine/README.md +113 -0
- package/samples/engine/first-scene/index.html +32 -0
- package/samples/engine/first-scene/main.js +152 -0
- package/src/core/assert.d.ts +2 -2
- package/src/core/binary/BitSet.d.ts +2 -2
- package/src/core/binary/BitSet.d.ts.map +1 -1
- package/src/core/binary/BitSet.js +1 -1
- package/src/core/bvh2/bvh3/BVH.d.ts +4 -0
- package/src/core/bvh2/bvh3/BVH.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/BVH.js +4 -0
- package/src/core/bvh2/bvh3/BvhClient.d.ts +4 -0
- package/src/core/bvh2/bvh3/BvhClient.d.ts.map +1 -1
- package/src/core/bvh2/bvh3/BvhClient.js +4 -0
- package/src/core/collection/array/array_sort_quick.d.ts +1 -1
- package/src/core/collection/list/List.d.ts +7 -3
- package/src/core/collection/list/List.d.ts.map +1 -1
- package/src/core/collection/list/List.js +6 -2
- package/src/core/collection/table/RowFirstTableSpec.d.ts.map +1 -1
- package/src/core/collection/table/RowFirstTableSpec.js +0 -4
- package/src/core/color/Color.d.ts +1 -0
- package/src/core/color/Color.d.ts.map +1 -1
- package/src/core/color/Color.js +4 -0
- package/src/core/events/signal/SignalBinding.d.ts +4 -0
- package/src/core/events/signal/SignalBinding.d.ts.map +1 -1
- package/src/core/events/signal/SignalBinding.js +4 -0
- package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts +5 -1
- package/src/core/geom/2d/quad-tree/QuadTreeDatum.d.ts.map +1 -1
- package/src/core/geom/2d/quad-tree/QuadTreeDatum.js +4 -0
- package/src/core/geom/3d/SurfacePoint3.d.ts +2 -2
- package/src/core/geom/3d/SurfacePoint3.d.ts.map +1 -1
- package/src/core/geom/3d/SurfacePoint3.js +1 -1
- package/src/core/geom/3d/aabb/AABB3.d.ts +63 -7
- package/src/core/geom/3d/aabb/AABB3.d.ts.map +1 -1
- package/src/core/geom/3d/aabb/AABB3.js +17 -3
- package/src/core/geom/3d/plane/plane3_compute_intersection_objects.js +2 -2
- package/src/core/geom/3d/ray/Ray3.d.ts +4 -4
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts +10 -3
- package/src/core/geom/3d/shape/AbstractShape3D.d.ts.map +1 -1
- package/src/core/geom/3d/shape/AbstractShape3D.js +9 -2
- package/src/core/geom/3d/shape/TransformedShape3D.d.ts +2 -2
- package/src/core/geom/3d/sphere/harmonics/sh3_rotate.d.ts +1 -1
- package/src/core/geom/Vector1.d.ts +4 -0
- package/src/core/geom/Vector1.d.ts.map +1 -1
- package/src/core/geom/Vector1.js +4 -0
- package/src/core/geom/Vector2.d.ts +4 -0
- package/src/core/geom/Vector2.d.ts.map +1 -1
- package/src/core/geom/Vector2.js +4 -0
- package/src/core/geom/Vector3.d.ts +4 -0
- package/src/core/geom/Vector3.d.ts.map +1 -1
- package/src/core/geom/Vector3.js +4 -0
- package/src/core/geom/Vector4.d.ts +4 -0
- package/src/core/geom/Vector4.d.ts.map +1 -1
- package/src/core/geom/Vector4.js +4 -0
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.d.ts +6 -2
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.d.ts.map +1 -1
- package/src/core/geom/packing/max-rect/MaxRectanglesPacker.js +4 -0
- package/src/core/geom/packing/miniball/Subspan.d.ts +4 -4
- package/src/core/geom/packing/miniball/Subspan.d.ts.map +1 -1
- package/src/core/geom/packing/miniball/Subspan.js +2 -2
- package/src/core/math/interval/NumericInterval.d.ts +4 -0
- package/src/core/math/interval/NumericInterval.d.ts.map +1 -1
- package/src/core/math/interval/NumericInterval.js +4 -0
- package/src/core/math/random/roundFair.d.ts +2 -2
- package/src/core/math/random/roundFair.d.ts.map +1 -1
- package/src/core/math/random/roundFair.js +1 -1
- package/src/core/model/BoundedValue.d.ts +4 -0
- package/src/core/model/BoundedValue.d.ts.map +1 -1
- package/src/core/model/BoundedValue.js +4 -0
- package/src/core/model/ObservedBoolean.d.ts +4 -0
- package/src/core/model/ObservedBoolean.d.ts.map +1 -1
- package/src/core/model/ObservedBoolean.js +4 -0
- package/src/core/model/ObservedInteger.d.ts +4 -0
- package/src/core/model/ObservedInteger.d.ts.map +1 -1
- package/src/core/model/ObservedInteger.js +4 -0
- package/src/core/model/ObservedString.d.ts +4 -0
- package/src/core/model/ObservedString.d.ts.map +1 -1
- package/src/core/model/ObservedString.js +4 -0
- package/src/core/model/stat/Stat.d.ts +7 -3
- package/src/core/model/stat/Stat.d.ts.map +1 -1
- package/src/core/model/stat/Stat.js +4 -0
- package/src/engine/Engine.d.ts.map +1 -1
- package/src/engine/Engine.js +65 -0
- package/src/engine/EngineHarness.d.ts +8 -1
- package/src/engine/EngineHarness.d.ts.map +1 -1
- package/src/engine/EngineHarness.js +10 -14
- package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts +2 -2
- package/src/engine/animation/clip/ecd_bind_animation_curve.d.ts.map +1 -1
- package/src/engine/animation/clip/ecd_bind_animation_curve.js +4 -4
- package/src/engine/asset/loaders/async_traverse_three_object.d.ts +2 -2
- package/src/engine/asset/loaders/async_traverse_three_object.d.ts.map +1 -1
- package/src/engine/asset/loaders/async_traverse_three_object.js +1 -1
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.d.ts +7 -3
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.d.ts.map +1 -1
- package/src/engine/asset/loaders/image/codec/ThreadedImageDecoder.js +33 -3
- package/src/engine/control/first-person/DESIGN.md +20 -2
- package/src/engine/control/first-person/DESIGN_COLLISION.md +17 -0
- package/src/engine/control/first-person/collision/KinematicMover.d.ts +58 -11
- package/src/engine/control/first-person/collision/KinematicMover.d.ts.map +1 -1
- package/src/engine/control/first-person/collision/KinematicMover.js +97 -20
- package/src/engine/ecs/Entity.js +1 -1
- package/src/engine/ecs/EntityComponentDataset.d.ts +2 -2
- package/src/engine/ecs/EntityComponentDataset.d.ts.map +1 -1
- package/src/engine/ecs/EntityComponentDataset.js +1 -1
- package/src/engine/ecs/EntityManager.d.ts.map +1 -1
- package/src/engine/ecs/EntityManager.js +27 -3
- package/src/engine/ecs/animation/Animation.d.ts +17 -3
- package/src/engine/ecs/animation/Animation.d.ts.map +1 -1
- package/src/engine/ecs/animation/Animation.js +26 -6
- package/src/engine/ecs/terrain/TerrainPreview.d.ts +4 -0
- package/src/engine/ecs/terrain/TerrainPreview.d.ts.map +1 -1
- package/src/engine/ecs/terrain/TerrainPreview.js +4 -0
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts +4 -4
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/cling/ClingToTerrainSystem.js +2 -2
- package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.d.ts +3 -2
- package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.d.ts.map +1 -1
- package/src/engine/ecs/terrain/ecs/makeTerrainWorkerProxy.js +25 -2
- package/src/engine/ecs/transform/Transform64.d.ts +4 -4
- package/src/engine/ecs/transform/Transform64.d.ts.map +1 -1
- package/src/engine/ecs/transform/Transform64.js +2 -2
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts +26 -0
- package/src/engine/graphics/ecs/decal/v2/Decal.d.ts.map +1 -1
- package/src/engine/graphics/ecs/decal/v2/Decal.js +26 -0
- package/src/engine/graphics/ecs/light/Light.d.ts +38 -1
- package/src/engine/graphics/ecs/light/Light.d.ts.map +1 -1
- package/src/engine/graphics/ecs/light/Light.js +51 -1
- package/src/engine/graphics/ecs/mesh/copyToVector3.d.ts +3 -3
- package/src/engine/graphics/ecs/mesh/copyToVector3.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh/copyToVector3.js +2 -2
- package/src/engine/graphics/ecs/mesh/setMesh.d.ts +2 -2
- package/src/engine/graphics/ecs/mesh/setMesh.d.ts.map +1 -1
- package/src/engine/graphics/ecs/mesh/setMesh.js +1 -1
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.d.ts +2 -2
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/computeBufferAttributeHash.js +1 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.d.ts +3 -3
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryEquality.js +2 -2
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.d.ts +2 -2
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/computeGeometryHash.js +1 -1
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.d.ts +2 -2
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.d.ts.map +1 -1
- package/src/engine/graphics/geometry/buffered/compute_buffer_geometry_byte_size.js +1 -1
- package/src/engine/graphics/geometry/compute_geometry_polycount.d.ts +2 -2
- package/src/engine/graphics/geometry/compute_geometry_polycount.d.ts.map +1 -1
- package/src/engine/graphics/geometry/compute_geometry_polycount.js +1 -1
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.d.ts +3 -3
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.d.ts.map +1 -1
- package/src/engine/graphics/geometry/ribbon/copyAttributeV3.js +2 -2
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.d.ts +4 -4
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.d.ts.map +1 -1
- package/src/engine/graphics/geometry/ribbon/copyAttributeValue.js +3 -3
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.d.ts +3 -3
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.d.ts.map +1 -1
- package/src/engine/graphics/geometry/ribbon/equalAttributeV3.js +2 -2
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.d.ts +4 -4
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.d.ts.map +1 -1
- package/src/engine/graphics/geometry/ribbon/equalAttributeValue.js +3 -3
- package/src/engine/graphics/geometry/scaleGeometryToBox.d.ts +2 -2
- package/src/engine/graphics/geometry/scaleGeometryToBox.d.ts.map +1 -1
- package/src/engine/graphics/geometry/scaleGeometryToBox.js +1 -1
- package/src/engine/graphics/impostors/card_cluster/FacePlaneAssignment.d.ts +2 -2
- package/src/engine/graphics/impostors/card_cluster/FacePlaneAssignment.d.ts.map +1 -1
- package/src/engine/graphics/impostors/card_cluster/FacePlaneAssignment.js +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorDescription.d.ts +2 -2
- package/src/engine/graphics/impostors/octahedral/ImpostorDescription.d.ts.map +1 -1
- package/src/engine/graphics/impostors/octahedral/ImpostorDescription.js +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts +4 -12
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleEmitter.js +2 -2
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts +5 -20
- package/src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts +24 -24
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.d.ts.map +1 -1
- package/src/engine/graphics/particles/particular/engine/emitter/ParticlePool.js +16 -16
- package/src/engine/graphics/render/layers/RenderLayer.d.ts +4 -4
- package/src/engine/graphics/render/layers/RenderLayer.d.ts.map +1 -1
- package/src/engine/graphics/render/layers/RenderLayer.js +2 -2
- package/src/engine/graphics/render/make_bvh_visibility_builder.js +1 -1
- package/src/engine/graphics/render/visibility/VisibilityComputer.d.ts +1 -1
- package/src/engine/graphics/render/visibility/VisibilityComputer.js +1 -1
- package/src/engine/graphics/texture/computeThreeTextureInternalFormatFromDataType.d.ts +2 -2
- package/src/engine/graphics/texture/computeThreeTextureInternalFormatFromDataType.d.ts.map +1 -1
- package/src/engine/graphics/texture/computeThreeTextureInternalFormatFromDataType.js +1 -1
- package/src/engine/graphics3/DecalSystem.d.ts +8 -0
- package/src/engine/graphics3/DecalSystem.d.ts.map +1 -1
- package/src/engine/graphics3/DecalSystem.js +8 -0
- package/src/engine/graphics3/GraphicsEngine.d.ts +19 -8
- package/src/engine/graphics3/GraphicsEngine.d.ts.map +1 -1
- package/src/engine/graphics3/GraphicsEngine.js +22 -11
- package/src/engine/graphics3/LightSystem.d.ts.map +1 -1
- package/src/engine/graphics3/LightSystem.js +11 -1
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts +4 -0
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.d.ts.map +1 -1
- package/src/engine/input/devices/gamepad/GamepadStickCalibration.js +4 -0
- package/src/engine/navigation/mesh/NavigationMesh.d.ts +90 -9
- package/src/engine/navigation/mesh/NavigationMesh.d.ts.map +1 -1
- package/src/engine/navigation/mesh/NavigationMesh.js +80 -8
- package/src/engine/network/NetworkSession.d.ts +60 -0
- package/src/engine/network/NetworkSession.d.ts.map +1 -1
- package/src/engine/network/NetworkSession.js +141 -1
- package/src/engine/network/replication/Replicator.d.ts +18 -0
- package/src/engine/network/replication/Replicator.d.ts.map +1 -1
- package/src/engine/network/replication/Replicator.js +98 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts +27 -0
- package/src/engine/physics/ecs/PhysicsSystem.d.ts.map +1 -1
- package/src/engine/physics/ecs/PhysicsSystem.js +27 -0
- package/src/engine/physics/fluid/ecs/FluidObstacleSystem.d.ts +4 -4
- package/src/engine/sound/SoundEngine.d.ts +24 -0
- package/src/engine/sound/SoundEngine.d.ts.map +1 -1
- package/src/engine/sound/SoundEngine.js +29 -11
- package/src/engine/sound/simulation/configureAcousticSimulation.d.ts +12 -4
- package/src/engine/sound/simulation/configureAcousticSimulation.d.ts.map +1 -1
- package/src/engine/sound/simulation/configureAcousticSimulation.js +10 -4
- package/src/engine/sound/simulation/ecs/AcousticProbeFieldSystem.d.ts +3 -1
- package/src/engine/sound/simulation/ecs/AcousticProbeFieldSystem.d.ts.map +1 -1
- package/src/engine/sound/simulation/ecs/AcousticProbeFieldSystem.js +27 -1
- package/src/engine/sound/simulation/render/ProbeReverbRenderer.d.ts +34 -0
- package/src/engine/sound/simulation/render/ProbeReverbRenderer.d.ts.map +1 -1
- package/src/engine/sound/simulation/render/ProbeReverbRenderer.js +61 -2
- package/src/engine/sound/simulation/render/reverbImpulseResponse.d.ts.map +1 -1
- package/src/engine/sound/simulation/render/reverbImpulseResponse.js +9 -0
- package/src/shade/playground/particle_system/README.md +14 -3
- package/src/shade/playground/particle_system/index.html +1 -0
- package/src/shade/playground/particle_system/main.js +15 -2
- package/src/shade/playground/particle_system/particle_scene.d.ts +11 -2
- package/src/shade/playground/particle_system/particle_scene.d.ts.map +1 -1
- package/src/shade/playground/particle_system/particle_scene.js +126 -9
- package/src/shade/renderer/GraphicsContext.d.ts +1 -0
- package/src/shade/renderer/GraphicsContext.d.ts.map +1 -1
- package/src/shade/renderer/GraphicsContext.js +4 -0
- package/src/shade/renderer/Renderer.d.ts +1 -1
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.d.ts +13 -0
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.d.ts.map +1 -1
- package/src/shade/renderer/geometry/MeshletGeometrySerializationAdapter.js +13 -0
- package/src/shade/renderer/geometry/meshlet_geometry_build_from_geometry.d.ts +18 -0
- package/src/shade/renderer/geometry/meshlet_geometry_build_from_geometry.d.ts.map +1 -1
- package/src/shade/renderer/geometry/meshlet_geometry_build_from_geometry.js +18 -0
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts +4 -0
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.d.ts.map +1 -1
- package/src/shade/renderer/global_illumination/lpv/LightProbeVolume.js +4 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts +12 -0
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.d.ts.map +1 -1
- package/src/shade/renderer/gpu_primitive/prefix_sum/v1/shader_prefix_scan_csdldf.js +13 -0
- package/src/shade/renderer/light/environment/rgbe/parse_rgbe.d.ts +1 -1
- package/src/shade/renderer/loader/gltf/tiny-gltf.d.ts +1 -1
- package/src/shade/renderer/particles/DESIGN.md +66 -15
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts +29 -5
- package/src/shade/renderer/particles/GPUParticleSystem.d.ts.map +1 -1
- package/src/shade/renderer/particles/GPUParticleSystem.js +61 -6
- package/src/shade/renderer/particles/ParticleConstants.d.ts +31 -0
- package/src/shade/renderer/particles/ParticleConstants.d.ts.map +1 -1
- package/src/shade/renderer/particles/ParticleConstants.js +33 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts +61 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.d.ts.map +1 -0
- package/src/shade/renderer/particles/coherence/graph_particle_bucket.js +179 -0
- package/src/shade/renderer/particles/coherence/particle_program_buckets.d.ts +63 -0
- package/src/shade/renderer/particles/coherence/particle_program_buckets.d.ts.map +1 -0
- package/src/shade/renderer/particles/coherence/particle_program_buckets.js +116 -0
- package/src/shade/renderer/particles/coherence/shader_particle_bucket.d.ts +59 -0
- package/src/shade/renderer/particles/coherence/shader_particle_bucket.d.ts.map +1 -0
- package/src/shade/renderer/particles/coherence/shader_particle_bucket.js +344 -0
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.d.ts +27 -5
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_COUNTERS.js +27 -5
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_LAYOUT.d.ts +13 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_LAYOUT.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/PARTICLE_EMITTER_LAYOUT.js +15 -1
- package/src/shade/renderer/particles/data/chunk_particle_emitter.d.ts.map +1 -1
- package/src/shade/renderer/particles/data/chunk_particle_emitter.js +3 -0
- package/src/shade/renderer/particles/graph_particles.d.ts +39 -11
- package/src/shade/renderer/particles/graph_particles.d.ts.map +1 -1
- package/src/shade/renderer/particles/graph_particles.js +60 -20
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts +8 -1
- package/src/shade/renderer/particles/runtime/EmitterRegistry.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/EmitterRegistry.js +8 -1
- package/src/shade/renderer/particles/runtime/ProgramArena.d.ts +22 -2
- package/src/shade/renderer/particles/runtime/ProgramArena.d.ts.map +1 -1
- package/src/shade/renderer/particles/runtime/ProgramArena.js +54 -3
- package/src/shade/renderer/particles/shaders/shader_particle_finalize.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_finalize.js +32 -14
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts +2 -23
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.d.ts.map +1 -1
- package/src/shade/renderer/particles/shaders/shader_particle_simulate.js +40 -11
- package/src/shade/renderer/particles/sort/shader_particle_sort.d.ts +6 -17
- package/src/shade/renderer/particles/sort/shader_particle_sort.d.ts.map +1 -1
- package/src/shade/renderer/particles/sort/shader_particle_sort.js +60 -9
- package/src/shade/wgsl/emulator/CPUBitmapData.d.ts +1 -1
- package/src/view/DOM.d.ts +69 -0
- package/src/view/DOM.d.ts.map +1 -0
- package/src/view/DOM.js +2 -1
- package/src/view/common/LocalizedLabelView.d.ts +50 -0
- package/src/view/common/LocalizedLabelView.d.ts.map +1 -0
- package/src/view/controller/controls/GuiControl.d.ts +19 -0
- package/src/view/controller/controls/GuiControl.d.ts.map +1 -0
- package/src/view/elements/FrameRateView.d.ts +45 -0
- package/src/view/elements/FrameRateView.d.ts.map +1 -0
- package/src/view/elements/FrameRateView.js +131 -0
- package/src/view/elements/SliderView.d.ts +37 -0
- package/src/view/elements/SliderView.d.ts.map +1 -0
- package/src/view/elements/SliderView.js +71 -0
- package/src/view/elements/navigation/ViewStack.d.ts +1 -1
- package/src/view/elements/navigation/ViewStack.js +1 -1
- package/src/view/elements/notify/NotificationView.d.ts +22 -0
- package/src/view/elements/notify/NotificationView.d.ts.map +1 -0
- package/src/view/tooltip/TooltipView.d.ts +5 -1
- package/src/view/tooltip/TooltipView.d.ts.map +1 -1
- package/src/view/tooltip/TooltipView.js +4 -0
|
@@ -1,3 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A navigable surface, plus queries over it.
|
|
3
|
+
*
|
|
4
|
+
* ## What the builder expects, and how to check that you gave it that
|
|
5
|
+
*
|
|
6
|
+
* {@link build} wants a **manifold walkable surface**. Two things follow from that, and neither is
|
|
7
|
+
* enforced here, because a full manifold check costs more than most builds and whether to pay it is
|
|
8
|
+
* the caller's call — not something every valid input should be charged for. What follows is how to
|
|
9
|
+
* pay it when you want to.
|
|
10
|
+
*
|
|
11
|
+
* **1. A surface, not a pile of solids.** Level geometry from a brush-based editor is a set of
|
|
12
|
+
* interpenetrating closed VOLUMES: a floor brush is not a floor, it is a sealed box whose top
|
|
13
|
+
* happens to be one, with the wall brush beside it buried in its side. Feeding those in directly
|
|
14
|
+
* produces a navmesh that routes almost nothing — measured at 5% of spawn pairs on one map, and 32%
|
|
15
|
+
* on another. Extracting the walkable surface first is two filters and about forty lines: keep
|
|
16
|
+
* triangles whose normal passes your walk threshold (0.7 is the usual constant, and is what
|
|
17
|
+
* `agent_max_climb_angle` defaults near), and drop those whose space above is solid. That moved the
|
|
18
|
+
* same map from 5% to 48%.
|
|
19
|
+
*
|
|
20
|
+
* Render geometry is not a substitute. On the same measurement it produced an EMPTY navmesh, from
|
|
21
|
+
* an input that repair had made near-perfect — 8 islands over 3,301 faces with 99% in the largest.
|
|
22
|
+
* An empty build is a legitimate answer to bad input and is reported as zero faces.
|
|
23
|
+
*
|
|
24
|
+
* **2. Manifold, and welded.** `core/geom/3d/topology` is the repair toolkit and the order matters:
|
|
25
|
+
* `bt_merge_vertices_by_distance`, then `bt_mesh_fuse_duplicate_edges`, then
|
|
26
|
+
* `bt_mesh_resolve_t_junctions` — whose own docblock states both the problem (faces of differing
|
|
27
|
+
* sizes touching at a single vertex are DISCONNECTED to edge-based neighbour queries) and the
|
|
28
|
+
* recipe (run it after an initial merge/fuse, then fuse again; the mesh must be triangulated).
|
|
29
|
+
* `bt_mesh_vertex_merge_distance` documents why a hand-rolled snap is worse than the tool: below
|
|
30
|
+
* the float32 step a tolerance silently degenerates into an exact-bits match and leaves the surface
|
|
31
|
+
* cracked.
|
|
32
|
+
*
|
|
33
|
+
* Note that repair cannot invent connectivity that is not in its input. `bt_mesh_resolve_t_junctions`
|
|
34
|
+
* splits BOUNDARY edges — ones with exactly one face — so a soup of closed convex brushes has none
|
|
35
|
+
* and it reports zero splits, correctly. And welding cannot UNION overlapping coplanar patches: two
|
|
36
|
+
* floor brushes that overlap contribute two surfaces occupying the same space, they do not abut, and
|
|
37
|
+
* no vertex merge joins them. Closing that needs a boolean union or a voxel rasterisation, which is
|
|
38
|
+
* upstream of this class.
|
|
39
|
+
*
|
|
40
|
+
* **3. Check it, if you want to.** `bt_mesh_validate` and `bt_mesh_is_manifold` answer the question
|
|
41
|
+
* directly. Running one of them at build time is worth it, because {@link find_path} on a
|
|
42
|
+
* non-manifold surface can read a released vertex and **throw from inside Polyanya** rather than
|
|
43
|
+
* report no path — measured at 17 of 72 spawn pairs on one map's unrepaired brushes.
|
|
44
|
+
*
|
|
45
|
+
* **4. And consider whether you want a navmesh at all.** For brush-based level geometry a waypoint
|
|
46
|
+
* graph built by *tracing* — asking the collision system whether a player-sized box gets from here
|
|
47
|
+
* to there — routed 100% of spawn pairs where the repaired navmesh routed 48%, because a trace does
|
|
48
|
+
* not care whether the world is one surface or a hundred overlapping ones. That is available to
|
|
49
|
+
* anyone whose engine has a shape cast, which is everyone reading this.
|
|
50
|
+
*
|
|
51
|
+
* All of the above is measured; it is the substance of GAP-016, reported from a port that got it
|
|
52
|
+
* wrong twice before getting it right.
|
|
53
|
+
*/
|
|
1
54
|
export class NavigationMesh {
|
|
2
55
|
topology: BinaryTopology;
|
|
3
56
|
/**
|
|
@@ -6,16 +59,36 @@ export class NavigationMesh {
|
|
|
6
59
|
*/
|
|
7
60
|
bvh: BVH;
|
|
8
61
|
/**
|
|
9
|
-
* Build from given scene geometry
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* @
|
|
15
|
-
*
|
|
16
|
-
*
|
|
62
|
+
* Build from given scene geometry.
|
|
63
|
+
*
|
|
64
|
+
* The source is expected to be a manifold walkable SURFACE, not a soup of
|
|
65
|
+
* solids: a build over interpenetrating closed volumes produces few or no
|
|
66
|
+
* connected faces, and an input that is not manifold can make
|
|
67
|
+
* {@link find_path} read a released vertex and throw from inside Polyanya.
|
|
68
|
+
* `core/geom/3d/topology` carries both the repair tools
|
|
69
|
+
* (`bt_merge_vertices_by_distance`, `bt_mesh_fuse_duplicate_edges`,
|
|
70
|
+
* `bt_mesh_resolve_t_junctions`) and the checks (`bt_mesh_validate`,
|
|
71
|
+
* `bt_mesh_is_manifold`). Neither is run here — a full manifold check costs
|
|
72
|
+
* more than most builds, and whether to pay it is the caller's call.
|
|
73
|
+
*
|
|
74
|
+
* @param {Object} options
|
|
75
|
+
* @param {BinaryTopology} options.source
|
|
76
|
+
* @param {number} [options.agent_radius]
|
|
77
|
+
* @param {number} [options.agent_height]
|
|
78
|
+
* @param {number} [options.agent_max_step_height] agent can bridge vertical gaps in topology, such as stepping up a stair
|
|
79
|
+
* @param {number} [options.agent_max_step_distance] agent can bridge lateral gaps in topology, such as stepping over a hole in the floor
|
|
80
|
+
* @param {number} [options.agent_max_climb_angle] In radians, how steep of an angle can the agent go up by
|
|
81
|
+
* @param {Vector3} [options.up] Defines world's "UP" direction, this is what the agent will respect for climbing constraint
|
|
17
82
|
*/
|
|
18
|
-
build({ source, agent_radius, agent_height, agent_max_step_height, agent_max_step_distance, agent_max_climb_angle, up, }:
|
|
83
|
+
build({ source, agent_radius, agent_height, agent_max_step_height, agent_max_step_distance, agent_max_climb_angle, up, }: {
|
|
84
|
+
source: BinaryTopology;
|
|
85
|
+
agent_radius?: number;
|
|
86
|
+
agent_height?: number;
|
|
87
|
+
agent_max_step_height?: number;
|
|
88
|
+
agent_max_step_distance?: number;
|
|
89
|
+
agent_max_climb_angle?: number;
|
|
90
|
+
up?: Vector3;
|
|
91
|
+
}): void;
|
|
19
92
|
/**
|
|
20
93
|
* Compute a walkable path between the two points.
|
|
21
94
|
* The result is a sequence of 3d points written into `output`. The first and last points are the
|
|
@@ -28,6 +101,13 @@ export class NavigationMesh {
|
|
|
28
101
|
* through folds. It is intrinsic to the surface — no global "up" is assumed — so it is correct on
|
|
29
102
|
* sloped and folded navmeshes as well as flat ones.
|
|
30
103
|
*
|
|
104
|
+
* **PRECONDITION: the surface is manifold.** This is not checked — the check costs more than
|
|
105
|
+
* most queries and charging every valid call for it is the wrong trade — but a non-manifold
|
|
106
|
+
* surface can make this read a released vertex and THROW from four frames inside Polyanya
|
|
107
|
+
* rather than return 0. If you are not certain of your input, run `bt_mesh_validate` /
|
|
108
|
+
* `bt_mesh_is_manifold` once at build time rather than defensively here. See the class
|
|
109
|
+
* docblock for the repair order.
|
|
110
|
+
*
|
|
31
111
|
* @param {Float32Array} output packed XYZ triples
|
|
32
112
|
* @param {number} start_x
|
|
33
113
|
* @param {number} start_y
|
|
@@ -41,4 +121,5 @@ export class NavigationMesh {
|
|
|
41
121
|
}
|
|
42
122
|
import { BinaryTopology } from "../../../core/geom/3d/topology/struct/binary/BinaryTopology.js";
|
|
43
123
|
import { BVH } from "../../../core/bvh2/bvh3/BVH.js";
|
|
124
|
+
import Vector3 from "../../../core/geom/Vector3.js";
|
|
44
125
|
//# sourceMappingURL=NavigationMesh.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMesh.d.ts","sourceRoot":"","sources":["../../../../../src/engine/navigation/mesh/NavigationMesh.js"],"names":[],"mappings":"AAyCA;IAEI,yBAAgC;IAEhC;;;OAGG;IACH,KAFU,GAAG,CAEG;IAEhB
|
|
1
|
+
{"version":3,"file":"NavigationMesh.d.ts","sourceRoot":"","sources":["../../../../../src/engine/navigation/mesh/NavigationMesh.js"],"names":[],"mappings":"AAyCA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH;IAEI,yBAAgC;IAEhC;;;OAGG;IACH,KAFU,GAAG,CAEG;IAEhB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH;QARmC,MAAM,EAA9B,cAAc;QACG,YAAY,GAA7B,MAAM;QACW,YAAY,GAA7B,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACW,uBAAuB,GAAxC,MAAM;QACW,qBAAqB,GAAtC,MAAM;QACY,EAAE,GAApB,OAAO;aAwBjB;IAGD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,kBATW,YAAY,WACZ,MAAM,WACN,MAAM,WACN,MAAM,UACN,MAAM,UACN,MAAM,UACN,MAAM,GACJ,MAAM,CAqClB;CAEJ;+BAvN4C,gEAAgE;oBADzF,gCAAgC;oBAEhC,+BAA+B"}
|
|
@@ -39,6 +39,59 @@ function nudge_into_face(mesh, face, point) {
|
|
|
39
39
|
point[2] += (cz - point[2]) * FACE_INTERIOR_PULL;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
/**
|
|
43
|
+
* A navigable surface, plus queries over it.
|
|
44
|
+
*
|
|
45
|
+
* ## What the builder expects, and how to check that you gave it that
|
|
46
|
+
*
|
|
47
|
+
* {@link build} wants a **manifold walkable surface**. Two things follow from that, and neither is
|
|
48
|
+
* enforced here, because a full manifold check costs more than most builds and whether to pay it is
|
|
49
|
+
* the caller's call — not something every valid input should be charged for. What follows is how to
|
|
50
|
+
* pay it when you want to.
|
|
51
|
+
*
|
|
52
|
+
* **1. A surface, not a pile of solids.** Level geometry from a brush-based editor is a set of
|
|
53
|
+
* interpenetrating closed VOLUMES: a floor brush is not a floor, it is a sealed box whose top
|
|
54
|
+
* happens to be one, with the wall brush beside it buried in its side. Feeding those in directly
|
|
55
|
+
* produces a navmesh that routes almost nothing — measured at 5% of spawn pairs on one map, and 32%
|
|
56
|
+
* on another. Extracting the walkable surface first is two filters and about forty lines: keep
|
|
57
|
+
* triangles whose normal passes your walk threshold (0.7 is the usual constant, and is what
|
|
58
|
+
* `agent_max_climb_angle` defaults near), and drop those whose space above is solid. That moved the
|
|
59
|
+
* same map from 5% to 48%.
|
|
60
|
+
*
|
|
61
|
+
* Render geometry is not a substitute. On the same measurement it produced an EMPTY navmesh, from
|
|
62
|
+
* an input that repair had made near-perfect — 8 islands over 3,301 faces with 99% in the largest.
|
|
63
|
+
* An empty build is a legitimate answer to bad input and is reported as zero faces.
|
|
64
|
+
*
|
|
65
|
+
* **2. Manifold, and welded.** `core/geom/3d/topology` is the repair toolkit and the order matters:
|
|
66
|
+
* `bt_merge_vertices_by_distance`, then `bt_mesh_fuse_duplicate_edges`, then
|
|
67
|
+
* `bt_mesh_resolve_t_junctions` — whose own docblock states both the problem (faces of differing
|
|
68
|
+
* sizes touching at a single vertex are DISCONNECTED to edge-based neighbour queries) and the
|
|
69
|
+
* recipe (run it after an initial merge/fuse, then fuse again; the mesh must be triangulated).
|
|
70
|
+
* `bt_mesh_vertex_merge_distance` documents why a hand-rolled snap is worse than the tool: below
|
|
71
|
+
* the float32 step a tolerance silently degenerates into an exact-bits match and leaves the surface
|
|
72
|
+
* cracked.
|
|
73
|
+
*
|
|
74
|
+
* Note that repair cannot invent connectivity that is not in its input. `bt_mesh_resolve_t_junctions`
|
|
75
|
+
* splits BOUNDARY edges — ones with exactly one face — so a soup of closed convex brushes has none
|
|
76
|
+
* and it reports zero splits, correctly. And welding cannot UNION overlapping coplanar patches: two
|
|
77
|
+
* floor brushes that overlap contribute two surfaces occupying the same space, they do not abut, and
|
|
78
|
+
* no vertex merge joins them. Closing that needs a boolean union or a voxel rasterisation, which is
|
|
79
|
+
* upstream of this class.
|
|
80
|
+
*
|
|
81
|
+
* **3. Check it, if you want to.** `bt_mesh_validate` and `bt_mesh_is_manifold` answer the question
|
|
82
|
+
* directly. Running one of them at build time is worth it, because {@link find_path} on a
|
|
83
|
+
* non-manifold surface can read a released vertex and **throw from inside Polyanya** rather than
|
|
84
|
+
* report no path — measured at 17 of 72 spawn pairs on one map's unrepaired brushes.
|
|
85
|
+
*
|
|
86
|
+
* **4. And consider whether you want a navmesh at all.** For brush-based level geometry a waypoint
|
|
87
|
+
* graph built by *tracing* — asking the collision system whether a player-sized box gets from here
|
|
88
|
+
* to there — routed 100% of spawn pairs where the repaired navmesh routed 48%, because a trace does
|
|
89
|
+
* not care whether the world is one surface or a hundred overlapping ones. That is available to
|
|
90
|
+
* anyone whose engine has a shape cast, which is everyone reading this.
|
|
91
|
+
*
|
|
92
|
+
* All of the above is measured; it is the substance of GAP-016, reported from a port that got it
|
|
93
|
+
* wrong twice before getting it right.
|
|
94
|
+
*/
|
|
42
95
|
export class NavigationMesh {
|
|
43
96
|
|
|
44
97
|
topology = new BinaryTopology();
|
|
@@ -50,14 +103,26 @@ export class NavigationMesh {
|
|
|
50
103
|
bvh = new BVH();
|
|
51
104
|
|
|
52
105
|
/**
|
|
53
|
-
* Build from given scene geometry
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
* @
|
|
59
|
-
*
|
|
60
|
-
*
|
|
106
|
+
* Build from given scene geometry.
|
|
107
|
+
*
|
|
108
|
+
* The source is expected to be a manifold walkable SURFACE, not a soup of
|
|
109
|
+
* solids: a build over interpenetrating closed volumes produces few or no
|
|
110
|
+
* connected faces, and an input that is not manifold can make
|
|
111
|
+
* {@link find_path} read a released vertex and throw from inside Polyanya.
|
|
112
|
+
* `core/geom/3d/topology` carries both the repair tools
|
|
113
|
+
* (`bt_merge_vertices_by_distance`, `bt_mesh_fuse_duplicate_edges`,
|
|
114
|
+
* `bt_mesh_resolve_t_junctions`) and the checks (`bt_mesh_validate`,
|
|
115
|
+
* `bt_mesh_is_manifold`). Neither is run here — a full manifold check costs
|
|
116
|
+
* more than most builds, and whether to pay it is the caller's call.
|
|
117
|
+
*
|
|
118
|
+
* @param {Object} options
|
|
119
|
+
* @param {BinaryTopology} options.source
|
|
120
|
+
* @param {number} [options.agent_radius]
|
|
121
|
+
* @param {number} [options.agent_height]
|
|
122
|
+
* @param {number} [options.agent_max_step_height] agent can bridge vertical gaps in topology, such as stepping up a stair
|
|
123
|
+
* @param {number} [options.agent_max_step_distance] agent can bridge lateral gaps in topology, such as stepping over a hole in the floor
|
|
124
|
+
* @param {number} [options.agent_max_climb_angle] In radians, how steep of an angle can the agent go up by
|
|
125
|
+
* @param {Vector3} [options.up] Defines world's "UP" direction, this is what the agent will respect for climbing constraint
|
|
61
126
|
*/
|
|
62
127
|
build({
|
|
63
128
|
source,
|
|
@@ -96,6 +161,13 @@ export class NavigationMesh {
|
|
|
96
161
|
* through folds. It is intrinsic to the surface — no global "up" is assumed — so it is correct on
|
|
97
162
|
* sloped and folded navmeshes as well as flat ones.
|
|
98
163
|
*
|
|
164
|
+
* **PRECONDITION: the surface is manifold.** This is not checked — the check costs more than
|
|
165
|
+
* most queries and charging every valid call for it is the wrong trade — but a non-manifold
|
|
166
|
+
* surface can make this read a released vertex and THROW from four frames inside Polyanya
|
|
167
|
+
* rather than return 0. If you are not certain of your input, run `bt_mesh_validate` /
|
|
168
|
+
* `bt_mesh_is_manifold` once at build time rather than defensively here. See the class
|
|
169
|
+
* docblock for the repair order.
|
|
170
|
+
*
|
|
99
171
|
* @param {Float32Array} output packed XYZ triples
|
|
100
172
|
* @param {number} start_x
|
|
101
173
|
* @param {number} start_y
|
|
@@ -419,10 +419,70 @@ export class NetworkSession {
|
|
|
419
419
|
* @returns {TimeDilation}
|
|
420
420
|
*/
|
|
421
421
|
get time_dilation(): TimeDilation;
|
|
422
|
+
/**
|
|
423
|
+
* How many entities this session treats as somebody else's — the set that is blended at render
|
|
424
|
+
* time and normalized before simulation.
|
|
425
|
+
*
|
|
426
|
+
* Exposed because its being empty is the observable symptom of a client that thinks it owns the
|
|
427
|
+
* host's world, and there was no way to see it from outside. Zero here on a connected client
|
|
428
|
+
* that has received a snapshot means nothing will be interpolated and the client is about to
|
|
429
|
+
* send the host its own state back.
|
|
430
|
+
*
|
|
431
|
+
* @returns {number}
|
|
432
|
+
*/
|
|
433
|
+
get remote_entity_count(): number;
|
|
434
|
+
/**
|
|
435
|
+
* Per-peer delivery accounting, for a game that wants to know whether the wire is actually
|
|
436
|
+
* delivering what it was handed.
|
|
437
|
+
*
|
|
438
|
+
* `skipped_unapplied` should be zero. It counts frames that reached this peer and were dropped
|
|
439
|
+
* below the applied watermark without ever running — which happens when slices reorder on a
|
|
440
|
+
* sender pinned to the ring floor, and which the sender cannot see, because the channel-level
|
|
441
|
+
* ack for the packet returns either way and credits those frames as delivered.
|
|
442
|
+
*
|
|
443
|
+
* Until this existed the shortfall was invisible from both ends: it was found by a consumer
|
|
444
|
+
* counting events dispatched on the host against events applied on the client, and a missing
|
|
445
|
+
* explosion looks like a rendering bug. Set `max_packets_per_tick: 1` and this climbs under
|
|
446
|
+
* jitter; on the default it should stay at zero.
|
|
447
|
+
*
|
|
448
|
+
* `skipped_duplicate` is the healthy counterpart and is expected to be large — it is the action
|
|
449
|
+
* stream's own redundancy arriving and being correctly ignored.
|
|
450
|
+
*
|
|
451
|
+
* @param {number} peer_id
|
|
452
|
+
* @returns {{skipped_unapplied: number, skipped_duplicate: number}}
|
|
453
|
+
*/
|
|
454
|
+
delivery_stats(peer_id: number): {
|
|
455
|
+
skipped_unapplied: number;
|
|
456
|
+
skipped_duplicate: number;
|
|
457
|
+
};
|
|
422
458
|
/**
|
|
423
459
|
* Most recent locally-completed sim frame.
|
|
424
460
|
*/
|
|
425
461
|
get current_frame(): number;
|
|
462
|
+
/**
|
|
463
|
+
* Move this session's frame counter to `frame`.
|
|
464
|
+
*
|
|
465
|
+
* **Joining a match in progress needs this and there was no way to do it.** The host is at
|
|
466
|
+
* frame 6,000; a client has to start tagging its inputs near 6,000 or the host discards every
|
|
467
|
+
* one of them — `ServerAuthoritativeServer.tick` trims pending actions older than
|
|
468
|
+
* `sim_frame - frame_capacity + 1`, and a client tagging frame 0 against a host at 6,000 has
|
|
469
|
+
* every input dropped **silently**. It moves on its own screen, never moves on the host's, and
|
|
470
|
+
* no signal fires: `onPendingActionDropped` covers the future-lead and capacity bounds, not
|
|
471
|
+
* this one.
|
|
472
|
+
*
|
|
473
|
+
* Everything needed was already there except the setter. INITIAL_SYNC carries the host's frame,
|
|
474
|
+
* `NetworkPeer` writes it, and `onInitialSync` dispatches it — and the handler named it
|
|
475
|
+
* `_frame_number` and dropped it on the floor. `#local_frame` being `#`-private meant an
|
|
476
|
+
* application could not set it either, so the only lever left was ticking the session forward
|
|
477
|
+
* with the input sampler silenced until its counter caught up: 28,801 calls and 62 ms of wall
|
|
478
|
+
* clock for an hour-old host. Reported as GAP-042.
|
|
479
|
+
*
|
|
480
|
+
* A client now seeks automatically on INITIAL_SYNC. This is the manual door, for a caller that
|
|
481
|
+
* computes its own lead.
|
|
482
|
+
*
|
|
483
|
+
* @param {number} frame
|
|
484
|
+
*/
|
|
485
|
+
seek_to_frame(frame: number): void;
|
|
426
486
|
#private;
|
|
427
487
|
}
|
|
428
488
|
import { UUID } from "../ecs/guid/UUID.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NetworkSession.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/NetworkSession.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;iCAsCoB,MAAM;AAhB1B;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AAiFH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAgPI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,0QAnDW;QACV,cAAkB,gBAAgB;QAClC,SAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAqB,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,CAAC;QACvC,IAAQ,CAAC,EAAE,QAAQ,GAAC,MAAM,CAAC;QAC3B,aAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,sBAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAmB,CAAC,EAAE,2BAA2B,CAAC;QAClD,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAiB,CAAC,EAAE,YAAY,CAAC;QACjC,qBAAyB,CAAC,EAAE,mBAAmB,CAAC;QAChD,sBAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,qBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,SAAa,CAAC,EAAE;YAChB,OAAa,CAAC,EAAE,OAAO,CAAC;YACxB,YAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B,aAAmB,CAAC,EAAE,MAAM,CAAC;YAC7B,YAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B,kBAAwB,CAAC,EAAE,MAAM,CAAC;YAClC,gBAAsB,CAAC,EAAE,MAAM,CAAC;YAChC,mBAAyB,CAAC,EAAE,OAAO,CAAC;SAC/B,CAAC;KACH,EAgJH;IAlVD;;;;;;OAMG;IACH,qBAAqB;IA0DrB;;;;;;OAMG;IACH,eAFU,IAAI,GAAC,IAAI,CAEE;IA6BrB;;;;OAIG;IACH,YAFU,MAAM,CAEU;IAE1B;;;;;OAKG;IACH,0BAFU,MAAM,CAEwB;IAExC;;;;OAIG;IACH,kBAFU,MAAM,CAEgB;IAEhC;;;;OAIG;IACH,oBAFU,MAAM,CAEkB;IAElC;;;;;;OAMG;IACH,eAFU,MAAM,CAEa;IAE7B;;;;;OAKG;IACH,6BAFU,MAAM,CAE2B;IAwGvC;;;OAGG;IACH,uCAAoC;IAEpC;;;OAGG;IACH,uCAAmC;IAEnC;;;OAGG;IACH,eAFU,kBAAkB,GAAC,MAAM,CAEnB;IAEhB;;;OAGG;IACH,yBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,iCAFU,MAAM,CAIT;IAEP;;;;;;OAMG;IACH,yBAFU,MAAM,CAEoB;IAEpC;;;OAGG;IACH,wBAFU,MAAM,CAIgC;IAEhD;;;OAGG;IACH,0BAFU,2BAA2B,CAEsC;IA0C/E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mDAFW,0BAA0B,QA4BpC;IAED;;;;;;;;OAQG;IACH,6CAIC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,uCAFmB,MAAM,KAAK,MAAM,SAAS,CAAC,GAAC,IAAI,QAWlD;IAMD;;;;;;;;;OASG;IACH,
|
|
1
|
+
{"version":3,"file":"NetworkSession.d.ts","sourceRoot":"","sources":["../../../../src/engine/network/NetworkSession.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;iCAsCoB,MAAM;AAhB1B;;;;;;;;;;;;;;;;;GAiBG;AACH;;;GAGG;AAiFH;;;;;;;;;;;;;;;;;;GAkBG;AACH;IAgPI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAmDG;IACH,0QAnDW;QACV,cAAkB,gBAAgB;QAClC,SAAa,CAAC,EAAE,MAAM,CAAC;QACvB,iBAAqB,CAAC,EAAE,CAAC,MAAM,MAAM,CAAC,CAAC;QACvC,IAAQ,CAAC,EAAE,QAAQ,GAAC,MAAM,CAAC;QAC3B,aAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,sBAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,eAAmB,CAAC,EAAE,2BAA2B,CAAC;QAClD,YAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,aAAiB,CAAC,EAAE,YAAY,CAAC;QACjC,qBAAyB,CAAC,EAAE,mBAAmB,CAAC;QAChD,sBAA0B,CAAC,EAAE,MAAM,CAAC;QACpC,qBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,SAAa,CAAC,EAAE;YAChB,OAAa,CAAC,EAAE,OAAO,CAAC;YACxB,YAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B,aAAmB,CAAC,EAAE,MAAM,CAAC;YAC7B,YAAkB,CAAC,EAAE,MAAM,CAAC;YAC5B,kBAAwB,CAAC,EAAE,MAAM,CAAC;YAClC,gBAAsB,CAAC,EAAE,MAAM,CAAC;YAChC,mBAAyB,CAAC,EAAE,OAAO,CAAC;SAC/B,CAAC;KACH,EAgJH;IAlVD;;;;;;OAMG;IACH,qBAAqB;IA0DrB;;;;;;OAMG;IACH,eAFU,IAAI,GAAC,IAAI,CAEE;IA6BrB;;;;OAIG;IACH,YAFU,MAAM,CAEU;IAE1B;;;;;OAKG;IACH,0BAFU,MAAM,CAEwB;IAExC;;;;OAIG;IACH,kBAFU,MAAM,CAEgB;IAEhC;;;;OAIG;IACH,oBAFU,MAAM,CAEkB;IAElC;;;;;;OAMG;IACH,eAFU,MAAM,CAEa;IAE7B;;;;;OAKG;IACH,6BAFU,MAAM,CAE2B;IAwGvC;;;OAGG;IACH,uCAAoC;IAEpC;;;OAGG;IACH,uCAAmC;IAEnC;;;OAGG;IACH,eAFU,kBAAkB,GAAC,MAAM,CAEnB;IAEhB;;;OAGG;IACH,yBAFU,MAAM,CAEyB;IAEzC;;;OAGG;IACH,iCAFU,MAAM,CAIT;IAEP;;;;;;OAMG;IACH,yBAFU,MAAM,CAEoB;IAEpC;;;OAGG;IACH,wBAFU,MAAM,CAIgC;IAEhD;;;OAGG;IACH,0BAFU,2BAA2B,CAEsC;IA0C/E;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mDAFW,0BAA0B,QA4BpC;IAED;;;;;;;;OAQG;IACH,6CAIC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,uCAFmB,MAAM,KAAK,MAAM,SAAS,CAAC,GAAC,IAAI,QAWlD;IAMD;;;;;;;;;OASG;IACH,uBAyNC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,wBAHW,MAAM,aACN,MAAM,QA8DhB;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,mBAHW,MAAM,WACN,MAAM,QA8BhB;IAED;;;;;;OAMG;IACH,oBAFW,MAAM,QAkChB;IAED;;OAEG;IACH,aAcC;IAMD;;;;;;OAMG;IACH,iBAFW,MAAM,QAyChB;IAED;;;;;;;;;;OAUG;IACH,2BA8BC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,sBAFW,SAAS,QAYnB;IAMD;;OAEG;IACH,wCAEC;IAED;;OAEG;IACH,wCAEC;IAED;;OAEG;IACH,wBAEC;IAED;;OAEG;IACH,0CAEC;IAED;;OAEG;IACH,iDAEC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;;;;;;OAUG;IACH,kCAEC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,wBAHW,MAAM,GACJ;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAC,CAIlE;IAED;;OAEG;IACH,4BAGC;IAED;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,qBAFW,MAAM,QAOhB;;CAk+BJ;qBA/wEoB,qBAAqB;mBAFvB,oCAAoC;4CAGV,sDAAsD;2CAUpC,gDAAgD;0BAErF,oBAAoB;0CAJJ,6CAA6C;0CAD7C,6CAA6C;4BADtC,+BAA+B;iCAK/C,sCAAsC;oCAGnC,+BAA+B;6BACtC,wBAAwB"}
|
|
@@ -792,10 +792,26 @@ export class NetworkSession {
|
|
|
792
792
|
// action-stream processing, and finalize any in-flight Tier-3
|
|
793
793
|
// resync state.
|
|
794
794
|
if (this.role === NetworkSessionRole.Client) {
|
|
795
|
-
this.#peer.onInitialSync.add((_peer_id, session_token,
|
|
795
|
+
this.#peer.onInitialSync.add((_peer_id, session_token, frame_number, buf, payload_end) => {
|
|
796
796
|
const token = new UUID();
|
|
797
797
|
token.data = session_token;
|
|
798
798
|
this.session_token = token;
|
|
799
|
+
|
|
800
|
+
/*
|
|
801
|
+
Align to the host's clock. This argument has always been on the wire and in this
|
|
802
|
+
signature -- it was named `_frame_number` and dropped -- and without it a client
|
|
803
|
+
joining a match in progress tags its inputs from 0 against a host at frame 6,000,
|
|
804
|
+
which trims every one of them silently. GAP-042.
|
|
805
|
+
|
|
806
|
+
The lead is the buffer depth the time dilation is already steering toward: an
|
|
807
|
+
input authored now arrives in the host's future, and this is how far ahead it has
|
|
808
|
+
to be tagged to land in the window rather than behind it. It only has to be in the
|
|
809
|
+
right neighbourhood -- `TimeDilation` converges on the real depth from the host's
|
|
810
|
+
feedback within a second or two -- but starting six thousand frames out is not a
|
|
811
|
+
neighbourhood, which is what made this total rather than approximate.
|
|
812
|
+
*/
|
|
813
|
+
this.seek_to_frame(frame_number + 1 + this.#time_dilation.target_buffer_depth);
|
|
814
|
+
|
|
799
815
|
this.#apply_initial_sync(buf, payload_end);
|
|
800
816
|
// Reconnecting counts as well as Resyncing: a host that has
|
|
801
817
|
// finished with our old session readmits us as a fresh peer,
|
|
@@ -1236,6 +1252,45 @@ export class NetworkSession {
|
|
|
1236
1252
|
return this.#time_dilation;
|
|
1237
1253
|
}
|
|
1238
1254
|
|
|
1255
|
+
/**
|
|
1256
|
+
* How many entities this session treats as somebody else's — the set that is blended at render
|
|
1257
|
+
* time and normalized before simulation.
|
|
1258
|
+
*
|
|
1259
|
+
* Exposed because its being empty is the observable symptom of a client that thinks it owns the
|
|
1260
|
+
* host's world, and there was no way to see it from outside. Zero here on a connected client
|
|
1261
|
+
* that has received a snapshot means nothing will be interpolated and the client is about to
|
|
1262
|
+
* send the host its own state back.
|
|
1263
|
+
*
|
|
1264
|
+
* @returns {number}
|
|
1265
|
+
*/
|
|
1266
|
+
get remote_entity_count() {
|
|
1267
|
+
return this.#remote_entities.size;
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
/**
|
|
1271
|
+
* Per-peer delivery accounting, for a game that wants to know whether the wire is actually
|
|
1272
|
+
* delivering what it was handed.
|
|
1273
|
+
*
|
|
1274
|
+
* `skipped_unapplied` should be zero. It counts frames that reached this peer and were dropped
|
|
1275
|
+
* below the applied watermark without ever running — which happens when slices reorder on a
|
|
1276
|
+
* sender pinned to the ring floor, and which the sender cannot see, because the channel-level
|
|
1277
|
+
* ack for the packet returns either way and credits those frames as delivered.
|
|
1278
|
+
*
|
|
1279
|
+
* Until this existed the shortfall was invisible from both ends: it was found by a consumer
|
|
1280
|
+
* counting events dispatched on the host against events applied on the client, and a missing
|
|
1281
|
+
* explosion looks like a rendering bug. Set `max_packets_per_tick: 1` and this climbs under
|
|
1282
|
+
* jitter; on the default it should stay at zero.
|
|
1283
|
+
*
|
|
1284
|
+
* `skipped_duplicate` is the healthy counterpart and is expected to be large — it is the action
|
|
1285
|
+
* stream's own redundancy arriving and being correctly ignored.
|
|
1286
|
+
*
|
|
1287
|
+
* @param {number} peer_id
|
|
1288
|
+
* @returns {{skipped_unapplied: number, skipped_duplicate: number}}
|
|
1289
|
+
*/
|
|
1290
|
+
delivery_stats(peer_id) {
|
|
1291
|
+
return this.#peer.replicator.delivery_stats(peer_id);
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1239
1294
|
/**
|
|
1240
1295
|
* Most recent locally-completed sim frame.
|
|
1241
1296
|
*/
|
|
@@ -1244,6 +1299,36 @@ export class NetworkSession {
|
|
|
1244
1299
|
return this.#local_frame - 1;
|
|
1245
1300
|
}
|
|
1246
1301
|
|
|
1302
|
+
/**
|
|
1303
|
+
* Move this session's frame counter to `frame`.
|
|
1304
|
+
*
|
|
1305
|
+
* **Joining a match in progress needs this and there was no way to do it.** The host is at
|
|
1306
|
+
* frame 6,000; a client has to start tagging its inputs near 6,000 or the host discards every
|
|
1307
|
+
* one of them — `ServerAuthoritativeServer.tick` trims pending actions older than
|
|
1308
|
+
* `sim_frame - frame_capacity + 1`, and a client tagging frame 0 against a host at 6,000 has
|
|
1309
|
+
* every input dropped **silently**. It moves on its own screen, never moves on the host's, and
|
|
1310
|
+
* no signal fires: `onPendingActionDropped` covers the future-lead and capacity bounds, not
|
|
1311
|
+
* this one.
|
|
1312
|
+
*
|
|
1313
|
+
* Everything needed was already there except the setter. INITIAL_SYNC carries the host's frame,
|
|
1314
|
+
* `NetworkPeer` writes it, and `onInitialSync` dispatches it — and the handler named it
|
|
1315
|
+
* `_frame_number` and dropped it on the floor. `#local_frame` being `#`-private meant an
|
|
1316
|
+
* application could not set it either, so the only lever left was ticking the session forward
|
|
1317
|
+
* with the input sampler silenced until its counter caught up: 28,801 calls and 62 ms of wall
|
|
1318
|
+
* clock for an hour-old host. Reported as GAP-042.
|
|
1319
|
+
*
|
|
1320
|
+
* A client now seeks automatically on INITIAL_SYNC. This is the manual door, for a caller that
|
|
1321
|
+
* computes its own lead.
|
|
1322
|
+
*
|
|
1323
|
+
* @param {number} frame
|
|
1324
|
+
*/
|
|
1325
|
+
seek_to_frame(frame) {
|
|
1326
|
+
assert.isNonNegativeInteger(frame, 'frame');
|
|
1327
|
+
|
|
1328
|
+
this.#local_frame = frame;
|
|
1329
|
+
this.#local_frame_accum = 0;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1247
1332
|
// ----------------------------------------------------------------
|
|
1248
1333
|
// Internal: identity observer (component-driven spawn/despawn)
|
|
1249
1334
|
// ----------------------------------------------------------------
|
|
@@ -1555,6 +1640,33 @@ export class NetworkSession {
|
|
|
1555
1640
|
this.world.addComponentToEntity(local_entity_id, component);
|
|
1556
1641
|
} else {
|
|
1557
1642
|
adapter.deserialize(buffer, existing);
|
|
1643
|
+
|
|
1644
|
+
/*
|
|
1645
|
+
Re-decide what this entity is to us.
|
|
1646
|
+
|
|
1647
|
+
Ownership DOES arrive — `NetworkIdentity` is auto-replicated as type_id 0 and
|
|
1648
|
+
the snapshot carries `owner_peer_id` in its payload. What did not happen is the
|
|
1649
|
+
consequence: `#on_identity_attached` computes remote-set membership once, when
|
|
1650
|
+
the component is ATTACHED, and this branch runs for an entity that already had
|
|
1651
|
+
one. So the field was corrected and the decision it feeds was not.
|
|
1652
|
+
|
|
1653
|
+
That branch is not an edge case, it is the normal one for any client that
|
|
1654
|
+
pre-builds its entities — which every client must, because nothing is
|
|
1655
|
+
replicated into existence (GAP-038). The client fills a pool before connecting,
|
|
1656
|
+
`#on_identity_attached` fills each negative owner with the LOCAL peer's id, the
|
|
1657
|
+
snapshot then corrects every one of them, and `#remote_entities` stays empty.
|
|
1658
|
+
|
|
1659
|
+
Two silent failures follow, and neither names ownership. Nothing is
|
|
1660
|
+
interpolated. And the client's outbound stream carries the host's own state
|
|
1661
|
+
back to it a few frames stale — the replicator logs every action it APPLIES,
|
|
1662
|
+
correctly, and `flush_outbound` packs that same log for every peer — so the
|
|
1663
|
+
host applies its own state to itself. Observed by the reporting port as the
|
|
1664
|
+
host's player teleporting 64 units downward and falling out of the level, which
|
|
1665
|
+
reads as a physics bug for as long as you let it. GAP-040.
|
|
1666
|
+
*/
|
|
1667
|
+
if (ComponentClass === NetworkIdentity) {
|
|
1668
|
+
this.#apply_ownership(local_entity_id, existing.owner_peer_id);
|
|
1669
|
+
}
|
|
1558
1670
|
}
|
|
1559
1671
|
}
|
|
1560
1672
|
|
|
@@ -1564,6 +1676,34 @@ export class NetworkSession {
|
|
|
1564
1676
|
}
|
|
1565
1677
|
}
|
|
1566
1678
|
|
|
1679
|
+
/**
|
|
1680
|
+
* Set an entity's owner and bring the remote-entity set into line with it.
|
|
1681
|
+
*
|
|
1682
|
+
* Ownership decides two separate things — whether the entity is blended at render time
|
|
1683
|
+
* (`#remote_entities`) and whether it is sent to a given peer (`OwnerAwareScope`) — and only the
|
|
1684
|
+
* second one re-reads the field. This keeps the first honest when ownership arrives, or changes,
|
|
1685
|
+
* after the component was attached.
|
|
1686
|
+
*
|
|
1687
|
+
* @param {number} entity_id
|
|
1688
|
+
* @param {number} owner_peer_id
|
|
1689
|
+
* @private
|
|
1690
|
+
*/
|
|
1691
|
+
#apply_ownership(entity_id, owner_peer_id) {
|
|
1692
|
+
const identity = this.world.getComponent(entity_id, NetworkIdentity);
|
|
1693
|
+
|
|
1694
|
+
if (identity === undefined || identity === null) {
|
|
1695
|
+
return;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
identity.owner_peer_id = owner_peer_id;
|
|
1699
|
+
|
|
1700
|
+
if (owner_peer_id === this.local_peer_id) {
|
|
1701
|
+
this.#remote_entities.delete(entity_id);
|
|
1702
|
+
} else {
|
|
1703
|
+
this.#remote_entities.add(entity_id);
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1567
1707
|
/**
|
|
1568
1708
|
*
|
|
1569
1709
|
* @param {number} peer_id
|
|
@@ -52,6 +52,24 @@ export class Replicator {
|
|
|
52
52
|
is_entity_in_scope(peer_id: number, network_id: number): boolean;
|
|
53
53
|
};
|
|
54
54
|
});
|
|
55
|
+
/**
|
|
56
|
+
* Per-peer delivery accounting. Read it, log it, put it on a HUD, fail a test on it.
|
|
57
|
+
*
|
|
58
|
+
* `skipped_unapplied` is the one that matters: frames that reached this receiver and were
|
|
59
|
+
* dropped below the watermark without ever being applied. It should be zero. It is not zero
|
|
60
|
+
* when slices reorder on a sender pinned to the ring floor, which is what
|
|
61
|
+
* `max_packets_per_tick: 1` produces under jitter.
|
|
62
|
+
*
|
|
63
|
+
* `skipped_duplicate` is the healthy counterpart — the action stream's own redundancy arriving
|
|
64
|
+
* and being correctly ignored — and is expected to be large.
|
|
65
|
+
*
|
|
66
|
+
* @param {number} peer_id
|
|
67
|
+
* @returns {{skipped_unapplied: number, skipped_duplicate: number}}
|
|
68
|
+
*/
|
|
69
|
+
delivery_stats(peer_id: number): {
|
|
70
|
+
skipped_unapplied: number;
|
|
71
|
+
skipped_duplicate: number;
|
|
72
|
+
};
|
|
55
73
|
/**
|
|
56
74
|
* Fired after each per-frame action group is fully applied via
|
|
57
75
|
* {@link unpack_from_peer}. Args: `(peer_id, frame_number)`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Replicator.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/replication/Replicator.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;
|
|
1
|
+
{"version":3,"file":"Replicator.d.ts","sourceRoot":"","sources":["../../../../../src/engine/network/replication/Replicator.js"],"names":[],"mappings":"AAqBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH;IA4JI;;;;;;;;OAQG;IACH;;;;;;wCAHiD,MAAM,cAAc,MAAM,GAAG,OAAO;;OA8BpF;IA/HD;;;;;;;;;;;;;OAaG;IACH,wBAHW,MAAM,GACJ;QAAC,iBAAiB,EAAE,MAAM,CAAC;QAAC,iBAAiB,EAAE,MAAM,CAAA;KAAC,CAUlE;IA0BD;;;;;;;;;;;;;OAaG;IACH,gBAFU,MAAM,CAEc;IAE9B;;;;;;;;;;;;;;;;;OAiBG;IACH,6BAFqB,MAAM,gBAAgB,MAAM,kBAAkB,MAAM,aAAa,YAAY,kBAAkB,MAAM,eAAe,MAAM,KAAK,IAAI,CAE/H;IAmBrB;;OAEG;IACH,sBAA4B;IAE5B;;OAEG;IACH,mCAAsC;IAEtC;;OAEG;IACH,4BAAwB;IAExB;;OAEG;IACH,iCAA4B;IAE5B;;;;OAIG;IACH;oCAFwC,MAAM,cAAc,MAAM,GAAG,OAAO;MAE5C;IAGpC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,uBAVW,MAAM,eACN,MAAM,aACN,MAAM,cACN,YAAY,cACZ,MAAM,GACJ,MAAM,CA4ElB;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,0BALW,MAAM,aACN,YAAY,iBACZ,MAAM,UACN;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAC,GAAC,IAAI,QAmEtE;IAiND;;;;;;;OAOG;IACH,qBAFW,MAAM,QAKhB;;CA8CJ;mBA1rBkB,uCAAuC;6BAD7B,sCAAsC"}
|
|
@@ -93,6 +93,80 @@ export class Replicator {
|
|
|
93
93
|
*/
|
|
94
94
|
#inbound = new Map();
|
|
95
95
|
|
|
96
|
+
/**
|
|
97
|
+
* Frames that arrived and were never applied, per peer, and the ones that were.
|
|
98
|
+
*
|
|
99
|
+
* **A skipped frame is not the same thing as a lost one, and until now neither was counted.**
|
|
100
|
+
* The action stream re-sends every unconfirmed frame each tick, so a frame arrives several
|
|
101
|
+
* times before its ack round-trips and every arrival after the first is skipped — correctly,
|
|
102
|
+
* and constantly. That is the normal case and it must not be counted as loss.
|
|
103
|
+
*
|
|
104
|
+
* What must be counted is the other one: a slice that arrives *after* a newer slice has raised
|
|
105
|
+
* the watermark past it, whose frames were therefore never applied and never will be, because
|
|
106
|
+
* its channel-level ack tells the sender they were delivered and nothing re-sends them. That is
|
|
107
|
+
* the failure `fb116d3a4` fixed for the default configuration and which
|
|
108
|
+
* `max_packets_per_tick: 1` still reproduces exactly — and the thing that made it expensive to
|
|
109
|
+
* find is that it is *silent*: a missing explosion looks like a rendering bug and nothing
|
|
110
|
+
* anywhere reports a shortfall.
|
|
111
|
+
*
|
|
112
|
+
* Telling the two apart needs one bit per frame in the window. `applied` is a ring of frame
|
|
113
|
+
* numbers indexed by `frame % capacity`, holding the frame that last wrote each slot, so a
|
|
114
|
+
* skipped frame can ask "was I ever applied?" in constant time and constant memory. A frame
|
|
115
|
+
* older than the window answers "no", which is right: it is beyond recovery either way.
|
|
116
|
+
*
|
|
117
|
+
* @type {Map<number, {applied: Int32Array, skipped_unapplied: number, skipped_duplicate: number}>}
|
|
118
|
+
* @private
|
|
119
|
+
*/
|
|
120
|
+
#delivery = new Map();
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Per-peer delivery accounting. Read it, log it, put it on a HUD, fail a test on it.
|
|
124
|
+
*
|
|
125
|
+
* `skipped_unapplied` is the one that matters: frames that reached this receiver and were
|
|
126
|
+
* dropped below the watermark without ever being applied. It should be zero. It is not zero
|
|
127
|
+
* when slices reorder on a sender pinned to the ring floor, which is what
|
|
128
|
+
* `max_packets_per_tick: 1` produces under jitter.
|
|
129
|
+
*
|
|
130
|
+
* `skipped_duplicate` is the healthy counterpart — the action stream's own redundancy arriving
|
|
131
|
+
* and being correctly ignored — and is expected to be large.
|
|
132
|
+
*
|
|
133
|
+
* @param {number} peer_id
|
|
134
|
+
* @returns {{skipped_unapplied: number, skipped_duplicate: number}}
|
|
135
|
+
*/
|
|
136
|
+
delivery_stats(peer_id) {
|
|
137
|
+
const d = this.#delivery.get(peer_id);
|
|
138
|
+
|
|
139
|
+
if (d === undefined) {
|
|
140
|
+
return { skipped_unapplied: 0, skipped_duplicate: 0 };
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
return { skipped_unapplied: d.skipped_unapplied, skipped_duplicate: d.skipped_duplicate };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* @param {number} peer_id
|
|
148
|
+
* @returns {{applied: Int32Array, skipped_unapplied: number, skipped_duplicate: number}}
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
#delivery_state(peer_id) {
|
|
152
|
+
let d = this.#delivery.get(peer_id);
|
|
153
|
+
|
|
154
|
+
if (d === undefined) {
|
|
155
|
+
const capacity = this.action_log.frame_capacity;
|
|
156
|
+
|
|
157
|
+
d = {
|
|
158
|
+
// -1 is "no frame has occupied this slot"; frame numbers are non-negative
|
|
159
|
+
applied: new Int32Array(capacity).fill(-1),
|
|
160
|
+
skipped_unapplied: 0,
|
|
161
|
+
skipped_duplicate: 0
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
this.#delivery.set(peer_id, d);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
return d;
|
|
168
|
+
}
|
|
169
|
+
|
|
96
170
|
/**
|
|
97
171
|
* Fired after each per-frame action group is fully applied via
|
|
98
172
|
* {@link unpack_from_peer}. Args: `(peer_id, frame_number)`.
|
|
@@ -396,6 +470,25 @@ export class Replicator {
|
|
|
396
470
|
// corrupt the action-log prior-state capture (see #inbound).
|
|
397
471
|
// The read cursor must still advance past this frame's actions.
|
|
398
472
|
if (frame_number < min_frame) {
|
|
473
|
+
/*
|
|
474
|
+
Was this one already applied, or is it being lost right now?
|
|
475
|
+
|
|
476
|
+
Both look identical here — a frame below the watermark, walked past to keep the
|
|
477
|
+
read cursor aligned — and the difference is the whole of GAP-043's residual. The
|
|
478
|
+
ring says which: a slot still holding this frame number means it was applied and
|
|
479
|
+
this is the action stream's own redundancy doing its job; anything else means the
|
|
480
|
+
watermark moved past a frame that never ran, and nothing will re-send it because
|
|
481
|
+
its channel-level ack already told the sender it arrived.
|
|
482
|
+
*/
|
|
483
|
+
const delivery = this.#delivery_state(peer_id);
|
|
484
|
+
const slot = frame_number % delivery.applied.length;
|
|
485
|
+
|
|
486
|
+
if (delivery.applied[slot] === frame_number) {
|
|
487
|
+
delivery.skipped_duplicate++;
|
|
488
|
+
} else {
|
|
489
|
+
delivery.skipped_unapplied++;
|
|
490
|
+
}
|
|
491
|
+
|
|
399
492
|
for (let i = 0; i < action_count; i++) {
|
|
400
493
|
if (in_buffer.position + ACTION_HEADER_BYTES > in_buffer_end) {
|
|
401
494
|
throw new MalformedPacketError(`Replicator.unpack_from_peer: action header overruns packet (skip; frame ${frame_number}, action ${i}/${action_count})`);
|
|
@@ -443,6 +536,11 @@ export class Replicator {
|
|
|
443
536
|
this.action_log.end_frame();
|
|
444
537
|
}
|
|
445
538
|
|
|
539
|
+
// Record that it ran, so a later arrival of the same frame is counted as the action
|
|
540
|
+
// stream's redundancy rather than as a loss. See #delivery.
|
|
541
|
+
const delivery = this.#delivery_state(peer_id);
|
|
542
|
+
delivery.applied[frame_number % delivery.applied.length] = frame_number;
|
|
543
|
+
|
|
446
544
|
// Fire AFTER end_frame so handlers see consistent state and can
|
|
447
545
|
// safely query the action log for the just-applied frame.
|
|
448
546
|
this.onFrameApplied.send2(peer_id, frame_number);
|