@babylonjs/inspector 9.0.0 → 9.2.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/bin/inspector-bridge.mjs +4734 -0
- package/bin/inspector-cli.mjs +4931 -0
- package/lib/cli/protocol.d.ts +180 -0
- package/lib/components/curveEditor/bottomBar/rangeSelector.d.ts +6 -0
- package/lib/components/curveEditor/bottomBar.d.ts +6 -0
- package/lib/components/curveEditor/canvas/canvas.d.ts +6 -0
- package/lib/components/curveEditor/canvas/curve.d.ts +14 -0
- package/lib/components/curveEditor/canvas/curveData.d.ts +40 -0
- package/lib/components/curveEditor/canvas/frameBar.d.ts +12 -0
- package/lib/components/curveEditor/canvas/graph.d.ts +11 -0
- package/lib/components/curveEditor/canvas/keyPoint.d.ts +34 -0
- package/lib/components/curveEditor/canvas/playHead.d.ts +12 -0
- package/lib/components/curveEditor/canvas/rangeFrameBar.d.ts +10 -0
- package/lib/components/curveEditor/curveEditor.d.ts +29 -0
- package/lib/components/curveEditor/curveEditorButton.d.ts +31 -0
- package/lib/components/curveEditor/curveEditorColors.d.ts +56 -0
- package/lib/components/curveEditor/curveEditorContext.d.ts +267 -0
- package/lib/components/curveEditor/rangeSelector.d.ts +6 -0
- package/lib/components/curveEditor/sideBar/addAnimationPanel.d.ts +10 -0
- package/lib/components/curveEditor/sideBar/animationList.d.ts +6 -0
- package/lib/components/curveEditor/sideBar/editAnimationPanel.d.ts +12 -0
- package/lib/components/curveEditor/sideBar/loadAnimationPanel.d.ts +10 -0
- package/lib/components/curveEditor/sideBar/saveAnimationPanel.d.ts +10 -0
- package/lib/components/curveEditor/sideBar.d.ts +6 -0
- package/lib/components/curveEditor/topBar.d.ts +6 -0
- package/lib/components/debug/debugPane.d.ts +6 -0
- package/lib/components/errorBoundary.d.ts +31 -0
- package/lib/components/extensibleAccordion.d.ts +67 -0
- package/lib/components/gizmoToolbar.d.ts +7 -0
- package/lib/components/pane.d.ts +4 -0
- package/lib/components/performanceViewer/canvasGraph.d.ts +16 -0
- package/lib/components/performanceViewer/canvasGraphService.d.ts +238 -0
- package/lib/components/performanceViewer/graphSupportingTypes.d.ts +90 -0
- package/lib/components/performanceViewer/performanceSidebar.d.ts +10 -0
- package/lib/components/performanceViewer/performanceViewer.d.ts +15 -0
- package/lib/components/pickingToolbar.d.ts +11 -0
- package/lib/components/properties/animation/animationGroupProperties.d.ts +8 -0
- package/lib/components/properties/animation/animationsProperties.d.ts +21 -0
- package/lib/components/properties/animation/targetedAnimationProperties.d.ts +7 -0
- package/lib/components/properties/atmosphereProperties.d.ts +20 -0
- package/lib/components/properties/audio/soundProperties.d.ts +8 -0
- package/lib/components/properties/boundProperty.d.ts +80 -0
- package/lib/components/properties/cameras/arcRotateCameraProperties.d.ts +17 -0
- package/lib/components/properties/cameras/cameraProperties.d.ts +10 -0
- package/lib/components/properties/cameras/followCameraProperties.d.ts +8 -0
- package/lib/components/properties/cameras/freeCameraProperties.d.ts +11 -0
- package/lib/components/properties/cameras/geospatialCameraProperties.d.ts +11 -0
- package/lib/components/properties/cameras/targetCameraProperties.d.ts +8 -0
- package/lib/components/properties/commonGeneralProperties.d.ts +16 -0
- package/lib/components/properties/frameGraph/frameGraphProperties.d.ts +8 -0
- package/lib/components/properties/generateCopyString.d.ts +7 -0
- package/lib/components/properties/lights/areaLightProperties.d.ts +5 -0
- package/lib/components/properties/lights/clusteredLightContainerProperties.d.ts +10 -0
- package/lib/components/properties/lights/directionalLightProperties.d.ts +8 -0
- package/lib/components/properties/lights/hemisphericLightProperties.d.ts +5 -0
- package/lib/components/properties/lights/lightProperties.d.ts +7 -0
- package/lib/components/properties/lights/pointLightProperties.d.ts +5 -0
- package/lib/components/properties/lights/shadowGeneratorProperties.d.ts +6 -0
- package/lib/components/properties/lights/shadowLightProperties.d.ts +5 -0
- package/lib/components/properties/lights/spotLightProperties.d.ts +5 -0
- package/lib/components/properties/linkToEntityPropertyLine.d.ts +27 -0
- package/lib/components/properties/materials/materialProperties.d.ts +11 -0
- package/lib/components/properties/materials/multiMaterialProperties.d.ts +7 -0
- package/lib/components/properties/materials/nodeMaterialProperties.d.ts +8 -0
- package/lib/components/properties/materials/normalMapProperties.d.ts +19 -0
- package/lib/components/properties/materials/openpbrMaterialProperties.d.ts +64 -0
- package/lib/components/properties/materials/pbrBaseMaterialProperties.d.ts +285 -0
- package/lib/components/properties/materials/skyMaterialProperties.d.ts +5 -0
- package/lib/components/properties/materials/standardMaterialProperties.d.ts +29 -0
- package/lib/components/properties/metadataProperties.d.ts +12 -0
- package/lib/components/properties/nodes/abstractMeshProperties.d.ts +27 -0
- package/lib/components/properties/nodes/gaussianSplattingProperties.d.ts +5 -0
- package/lib/components/properties/nodes/meshProperties.d.ts +11 -0
- package/lib/components/properties/nodes/nodeProperties.d.ts +7 -0
- package/lib/components/properties/particles/attractor.d.ts +23 -0
- package/lib/components/properties/particles/attractorAdapter.d.ts +56 -0
- package/lib/components/properties/particles/attractorList.d.ts +15 -0
- package/lib/components/properties/particles/attractorProperties.d.ts +11 -0
- package/lib/components/properties/particles/colorProperties.d.ts +11 -0
- package/lib/components/properties/particles/commandsProperties.d.ts +13 -0
- package/lib/components/properties/particles/emissionProperties.d.ts +11 -0
- package/lib/components/properties/particles/emitterProperties.d.ts +13 -0
- package/lib/components/properties/particles/lifetimeProperties.d.ts +11 -0
- package/lib/components/properties/particles/nodeEditorProperties.d.ts +12 -0
- package/lib/components/properties/particles/rotationProperties.d.ts +11 -0
- package/lib/components/properties/particles/sizeProperties.d.ts +11 -0
- package/lib/components/properties/particles/spritesheetProperties.d.ts +11 -0
- package/lib/components/properties/particles/systemProperties.d.ts +13 -0
- package/lib/components/properties/physics/physicsProperties.d.ts +6 -0
- package/lib/components/properties/postProcesses/postProcessProperties.d.ts +10 -0
- package/lib/components/properties/propertiesPane.d.ts +2 -0
- package/lib/components/properties/renderingPipelines/defaultRenderingPipelineProperties.d.ts +23 -0
- package/lib/components/properties/renderingPipelines/iblShadowsRenderPipelineProperties.d.ts +11 -0
- package/lib/components/properties/renderingPipelines/lensRenderingPipelineProperties.d.ts +8 -0
- package/lib/components/properties/renderingPipelines/postProcessRenderPipelineProperties.d.ts +5 -0
- package/lib/components/properties/renderingPipelines/ssao2RenderingPipelineProperties.d.ts +8 -0
- package/lib/components/properties/renderingPipelines/ssaoRenderingPipelineProperties.d.ts +5 -0
- package/lib/components/properties/renderingPipelines/ssrRenderingPipelineProperties.d.ts +17 -0
- package/lib/components/properties/skeleton/boneProperties.d.ts +7 -0
- package/lib/components/properties/skeleton/skeletonProperties.d.ts +8 -0
- package/lib/components/properties/sprites/spriteManagerProperties.d.ts +25 -0
- package/lib/components/properties/sprites/spriteProperties.d.ts +19 -0
- package/lib/components/properties/textures/advancedDynamicTextureProperties.d.ts +11 -0
- package/lib/components/properties/textures/baseTextureProperties.d.ts +16 -0
- package/lib/components/properties/textures/cubeTextureProperties.d.ts +5 -0
- package/lib/components/properties/textures/multiRenderTargetProperties.d.ts +5 -0
- package/lib/components/properties/textures/renderTargetTextureProperties.d.ts +5 -0
- package/lib/components/properties/textures/textureFormatUtils.d.ts +48 -0
- package/lib/components/properties/textures/texturePreview.d.ts +17 -0
- package/lib/components/properties/textures/textureProperties.d.ts +11 -0
- package/lib/components/properties/textures/thinTextureProperties.d.ts +8 -0
- package/lib/components/properties/transformProperties.d.ts +11 -0
- package/lib/components/scene/sceneExplorer.d.ts +182 -0
- package/lib/components/scene/sceneExplorerDragDrop.d.ts +38 -0
- package/lib/components/scene/sceneProperties.d.ts +19 -0
- package/lib/components/stats/countStats.d.ts +5 -0
- package/lib/components/stats/frameStepStats.d.ts +8 -0
- package/lib/components/stats/performanceStats.d.ts +6 -0
- package/lib/components/stats/statsPane.d.ts +3 -0
- package/lib/components/stats/systemStats.d.ts +5 -0
- package/lib/components/teachingMoment.d.ts +20 -0
- package/lib/components/textureEditor/canvasManager.d.ts +113 -0
- package/lib/components/textureEditor/canvasShader.d.ts +10 -0
- package/lib/components/textureEditor/channels.d.ts +25 -0
- package/lib/components/textureEditor/properties.d.ts +23 -0
- package/lib/components/textureEditor/status.d.ts +13 -0
- package/lib/components/textureEditor/textureEditor.d.ts +113 -0
- package/lib/components/textureEditor/tools.d.ts +20 -0
- package/lib/components/theme.d.ts +10 -0
- package/lib/components/tools/capture/equirectangularCaptureTool.d.ts +5 -0
- package/lib/components/tools/capture/gifCaptureTool.d.ts +7 -0
- package/lib/components/tools/capture/sceneReplayTool.d.ts +5 -0
- package/lib/components/tools/capture/screenshotTool.d.ts +5 -0
- package/lib/components/tools/capture/videoCaptureTool.d.ts +5 -0
- package/lib/components/tools/exportTools.d.ts +11 -0
- package/lib/components/tools/import/gltfAnimationImportTool.d.ts +5 -0
- package/lib/components/tools/import/gltfLoaderOptionsTool.d.ts +8 -0
- package/lib/components/tools/import/gltfValidationTool.d.ts +5 -0
- package/lib/components/tools/reflectorTools.d.ts +5 -0
- package/lib/components/tools/toolsPane.d.ts +3 -0
- package/lib/components/uxContextProvider.d.ts +2 -0
- package/lib/contexts/extensionManagerContext.d.ts +6 -0
- package/lib/contexts/propertyContext.d.ts +30 -0
- package/lib/contexts/settingsContext.d.ts +3 -0
- package/lib/contexts/watcherContext.d.ts +3 -0
- package/lib/extensibility/builtInsExtensionFeed.d.ts +21 -0
- package/lib/extensibility/defaultInspectorExtensionFeed.d.ts +5 -0
- package/lib/extensibility/extensionFeed.d.ts +113 -0
- package/lib/extensibility/extensionManager.d.ts +111 -0
- package/lib/extensions/quickCreate/cameras.d.ts +14 -0
- package/lib/extensions/quickCreate/frameGraphs.d.ts +14 -0
- package/lib/extensions/quickCreate/lights.d.ts +14 -0
- package/lib/extensions/quickCreate/materials.d.ts +14 -0
- package/lib/extensions/quickCreate/meshes.d.ts +10 -0
- package/lib/extensions/quickCreate/particles.d.ts +15 -0
- package/lib/extensions/quickCreate/quickCreateLayout.d.ts +44 -0
- package/lib/extensions/quickCreate/quickCreateToolsService.d.ts +11 -0
- package/lib/extensions/quickCreate/renderingPipelines.d.ts +14 -0
- package/lib/extensions/quickCreate/settingsPopover.d.ts +14 -0
- package/lib/extensions/quickCreate/spriteManagers.d.ts +14 -0
- package/lib/{extensionsListService-zYdKn8uM.js → extensionsListService-eRZtqcfj.js} +8 -8
- package/lib/extensionsListService-eRZtqcfj.js.map +1 -0
- package/lib/hooks/compoundPropertyHooks.d.ts +24 -0
- package/lib/hooks/instrumentationHooks.d.ts +9 -0
- package/lib/hooks/observableHooks.d.ts +35 -0
- package/lib/hooks/pollingHooks.d.ts +7 -0
- package/lib/hooks/resourceHooks.d.ts +20 -0
- package/lib/hooks/settingsHooks.d.ts +13 -0
- package/lib/hooks/teachingMomentHooks.d.ts +34 -0
- package/lib/hooks/themeHooks.d.ts +17 -0
- package/lib/hooks/useObservableArray.d.ts +11 -0
- package/lib/hooks/useResizeHandle.d.ts +35 -0
- package/lib/{index-DuVF9zYN.js → index-FWuITINA.js} +1932 -1031
- package/lib/index-FWuITINA.js.map +1 -0
- package/lib/index.d.ts +111 -74767
- package/lib/index.js +6 -6
- package/lib/inspectable.d.ts +67 -0
- package/lib/inspector.d.ts +41 -0
- package/lib/instrumentation/functionInstrumentation.d.ts +20 -0
- package/lib/instrumentation/propertyInstrumentation.d.ts +33 -0
- package/lib/legacy/debugLayer.d.ts +24 -0
- package/lib/legacy/inspectableCustomPropertiesService.d.ts +3 -0
- package/lib/legacy/inspector.d.ts +39 -0
- package/lib/legacy/legacy.d.ts +9 -0
- package/lib/legacy/propertiesSectionMapping.d.ts +99 -0
- package/lib/misc/arrayUtils.d.ts +4 -0
- package/lib/misc/assert.d.ts +5 -0
- package/lib/misc/defaultPerfStrategies.d.ts +16 -0
- package/lib/misc/graphUtils.d.ts +44 -0
- package/lib/misc/nodeGeometryEditor.d.ts +3 -0
- package/lib/misc/nodeMaterialEditor.d.ts +2 -0
- package/lib/misc/nodeParticleEditor.d.ts +2 -0
- package/lib/misc/nodeRenderGraphEditor.d.ts +2 -0
- package/lib/misc/observableCollection.d.ts +23 -0
- package/lib/misc/snippetUtils.d.ts +74 -0
- package/lib/misc/textureTools.d.ts +34 -0
- package/lib/modularTool.d.ts +42 -0
- package/lib/modularity/serviceContainer.d.ts +64 -0
- package/lib/modularity/serviceDefinition.d.ts +64 -0
- package/lib/{quickCreateToolsService-BtsSLeMY.js → quickCreateToolsService-MzZbVrvr.js} +7 -7
- package/lib/quickCreateToolsService-MzZbVrvr.js.map +1 -0
- package/lib/{reflectorService-Bzs-Ykos.js → reflectorService-DdPEZLjO.js} +7 -7
- package/lib/reflectorService-DdPEZLjO.js.map +1 -0
- package/lib/services/cli/cliConnectionStatus.d.ts +19 -0
- package/lib/services/cli/entityQueryService.d.ts +8 -0
- package/lib/services/cli/inspectableBridgeService.d.ts +22 -0
- package/lib/services/cli/inspectableCommandRegistry.d.ts +58 -0
- package/lib/services/cli/perfTraceCommandService.d.ts +9 -0
- package/lib/services/cli/screenshotCommandService.d.ts +8 -0
- package/lib/services/cli/shaderCommandService.d.ts +7 -0
- package/lib/services/cli/statsCommandService.d.ts +9 -0
- package/lib/services/cliConnectionStatusService.d.ts +4 -0
- package/lib/services/defaultToolbarMetadata.d.ts +6 -0
- package/lib/services/extensionsListService.d.ts +3 -0
- package/lib/services/gizmoService.d.ts +84 -0
- package/lib/services/gizmoToolbarService.d.ts +5 -0
- package/lib/services/globalSettings.d.ts +5 -0
- package/lib/services/highlightService.d.ts +8 -0
- package/lib/services/miniStatsService.d.ts +4 -0
- package/lib/services/panes/debugService.d.ts +25 -0
- package/lib/services/panes/properties/animationGroupPropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/animationPropertiesService.d.ts +5 -0
- package/lib/services/panes/properties/atmospherePropertiesService.d.ts +5 -0
- package/lib/services/panes/properties/audioPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/cameraPropertiesService.d.ts +7 -0
- package/lib/services/panes/properties/commonPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/effectLayerPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/frameGraphPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/lightPropertiesServices.d.ts +4 -0
- package/lib/services/panes/properties/materialPropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/metadataPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/nodePropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/particleSystemPropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/physicsPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/postProcessPropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/propertiesService.d.ts +53 -0
- package/lib/services/panes/properties/renderingPipelinePropertiesService.d.ts +3 -0
- package/lib/services/panes/properties/scenePropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/skeletonPropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/spritePropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/texturePropertiesService.d.ts +4 -0
- package/lib/services/panes/properties/transformPropertiesService.d.ts +3 -0
- package/lib/services/panes/scene/animationGroupExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/atmosphereExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/defaultSectionsMetadata.d.ts +33 -0
- package/lib/services/panes/scene/disposableCommandService.d.ts +4 -0
- package/lib/services/panes/scene/effectLayersExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/frameGraphExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/guiExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/materialExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/nodeExplorerService.d.ts +7 -0
- package/lib/services/panes/scene/particleSystemExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/postProcessExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/renderingPipelinesExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/sceneExplorerService.d.ts +34 -0
- package/lib/services/panes/scene/skeletonExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/soundExplorerService.d.ts +5 -0
- package/lib/services/panes/scene/spriteManagerExplorerService.d.ts +6 -0
- package/lib/services/panes/scene/texturesExplorerService.d.ts +5 -0
- package/lib/services/panes/settingsService.d.ts +25 -0
- package/lib/services/panes/statsService.d.ts +28 -0
- package/lib/services/panes/tools/captureService.d.ts +3 -0
- package/lib/services/panes/tools/exportService.d.ts +3 -0
- package/lib/services/panes/tools/import/gltfAnimationImportService.d.ts +3 -0
- package/lib/services/panes/tools/import/gltfLoaderOptionsDefaults.d.ts +46 -0
- package/lib/services/panes/tools/import/gltfLoaderOptionsService.d.ts +4 -0
- package/lib/services/panes/tools/import/gltfValidationService.d.ts +3 -0
- package/lib/services/panes/tools/reflectorService.d.ts +7 -0
- package/lib/services/panes/toolsService.d.ts +29 -0
- package/lib/services/pickingService.d.ts +7 -0
- package/lib/services/reactContextService.d.ts +18 -0
- package/lib/services/sceneContext.d.ts +19 -0
- package/lib/services/selectionService.d.ts +24 -0
- package/lib/services/settingsStore.d.ts +55 -0
- package/lib/services/shellService.d.ts +256 -0
- package/lib/services/shellSettingsService.d.ts +3 -0
- package/lib/services/textureEditor/textureEditorService.d.ts +21 -0
- package/lib/services/textureEditor/tools/contrast.d.ts +2 -0
- package/lib/services/textureEditor/tools/eyedropper.d.ts +5 -0
- package/lib/services/textureEditor/tools/floodfill.d.ts +5 -0
- package/lib/services/textureEditor/tools/paintbrush.d.ts +2 -0
- package/lib/services/textureEditor/tools/rectangularSelect.d.ts +5 -0
- package/lib/services/themeSelectorService.d.ts +3 -0
- package/lib/services/themeService.d.ts +60 -0
- package/lib/services/userFeedbackService.d.ts +3 -0
- package/lib/services/watcherService.d.ts +38 -0
- package/lib/themes/babylonTheme.d.ts +3 -0
- package/package.json +12 -5
- package/readme.md +27 -0
- package/lib/extensionsListService-zYdKn8uM.js.map +0 -1
- package/lib/index-DuVF9zYN.js.map +0 -1
- package/lib/quickCreateToolsService-BtsSLeMY.js.map +0 -1
- package/lib/reflectorService-Bzs-Ykos.js.map +0 -1
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
import { type Dispatch, type FunctionComponent, type PropsWithChildren, type SetStateAction } from "react";
|
|
2
|
+
import { type Nullable } from "@babylonjs/core/types.js";
|
|
3
|
+
import { type Animation } from "@babylonjs/core/Animations/animation.js";
|
|
4
|
+
import { type TargetedAnimation, type AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
|
5
|
+
import { type Scene } from "@babylonjs/core/scene.js";
|
|
6
|
+
import { type IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
|
|
7
|
+
import { type AnimationKeyInterpolation } from "@babylonjs/core/Animations/animationKey.js";
|
|
8
|
+
import { type CurveData } from "./canvas/curveData";
|
|
9
|
+
/**
|
|
10
|
+
* Represents a key point on a curve
|
|
11
|
+
*/
|
|
12
|
+
export type KeyPoint = {
|
|
13
|
+
/** The curve data this key point belongs to */
|
|
14
|
+
curve: CurveData;
|
|
15
|
+
/** The key index in the animation */
|
|
16
|
+
keyId: number;
|
|
17
|
+
};
|
|
18
|
+
/** Payload sent when a main key point is designated for multi-point coordination */
|
|
19
|
+
export type MainKeyPointInfo = {
|
|
20
|
+
x: number;
|
|
21
|
+
y: number;
|
|
22
|
+
curve: CurveData;
|
|
23
|
+
keyId: number;
|
|
24
|
+
};
|
|
25
|
+
/** Payload sent when the main key point moves during drag */
|
|
26
|
+
export type MainKeyPointPosition = {
|
|
27
|
+
x: number;
|
|
28
|
+
y: number;
|
|
29
|
+
};
|
|
30
|
+
import { Observable } from "@babylonjs/core/Misc/observable.js";
|
|
31
|
+
/**
|
|
32
|
+
* Options for active animation changed event
|
|
33
|
+
*/
|
|
34
|
+
export type ActiveAnimationChangedOptions = {
|
|
35
|
+
/** Whether to evaluate keys */
|
|
36
|
+
evaluateKeys?: boolean;
|
|
37
|
+
/** Whether to update frame */
|
|
38
|
+
frame?: boolean;
|
|
39
|
+
/** Whether to update range */
|
|
40
|
+
range?: boolean;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* State for the curve editor
|
|
44
|
+
*/
|
|
45
|
+
export type CurveEditorState = {
|
|
46
|
+
/** Editor title */
|
|
47
|
+
title: string;
|
|
48
|
+
/** All animations in the editor */
|
|
49
|
+
animations: Nullable<Animation[] | TargetedAnimation[]>;
|
|
50
|
+
/** The scene */
|
|
51
|
+
scene: Scene;
|
|
52
|
+
/** Target animatable */
|
|
53
|
+
target: Nullable<IAnimatable>;
|
|
54
|
+
/** Root animation group if any */
|
|
55
|
+
rootAnimationGroup: Nullable<AnimationGroup>;
|
|
56
|
+
/** Currently active/selected animations */
|
|
57
|
+
activeAnimations: Animation[];
|
|
58
|
+
/** Active color channels by animation ID */
|
|
59
|
+
activeChannels: {
|
|
60
|
+
[key: number]: string;
|
|
61
|
+
};
|
|
62
|
+
/** Currently selected key points */
|
|
63
|
+
activeKeyPoints: Nullable<KeyPoint[]>;
|
|
64
|
+
/** The main/primary selected key point */
|
|
65
|
+
mainKeyPoint: Nullable<KeyPoint>;
|
|
66
|
+
/** Snippet ID for sharing */
|
|
67
|
+
snippetId: string;
|
|
68
|
+
/** Whether using targeted animations */
|
|
69
|
+
useTargetAnimations: boolean;
|
|
70
|
+
/** Current playhead frame */
|
|
71
|
+
activeFrame: number;
|
|
72
|
+
/** Start of visible/play range */
|
|
73
|
+
fromKey: number;
|
|
74
|
+
/** End of visible/play range */
|
|
75
|
+
toKey: number;
|
|
76
|
+
/** Whether to use existing play range */
|
|
77
|
+
useExistingPlayRange: boolean;
|
|
78
|
+
/** Playback direction */
|
|
79
|
+
forwardAnimation: boolean;
|
|
80
|
+
/** Whether animation is playing */
|
|
81
|
+
isPlaying: boolean;
|
|
82
|
+
/** Total clip length in frames */
|
|
83
|
+
clipLength: number;
|
|
84
|
+
/** Minimum reference frame */
|
|
85
|
+
referenceMinFrame: number;
|
|
86
|
+
/** Maximum reference frame */
|
|
87
|
+
referenceMaxFrame: number;
|
|
88
|
+
/** Whether an input is focused */
|
|
89
|
+
focusedInput: boolean;
|
|
90
|
+
/** Lock last frame value */
|
|
91
|
+
lockLastFrameValue: boolean;
|
|
92
|
+
/** Lock last frame frame number */
|
|
93
|
+
lockLastFrameFrame: boolean;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Actions available in the curve editor
|
|
97
|
+
*/
|
|
98
|
+
export type CurveEditorActions = {
|
|
99
|
+
/** Set active animations */
|
|
100
|
+
setActiveAnimations: Dispatch<SetStateAction<Animation[]>>;
|
|
101
|
+
/** Set active frame */
|
|
102
|
+
setActiveFrame: Dispatch<SetStateAction<number>>;
|
|
103
|
+
/** Set from key */
|
|
104
|
+
setFromKey: Dispatch<SetStateAction<number>>;
|
|
105
|
+
/** Set to key */
|
|
106
|
+
setToKey: Dispatch<SetStateAction<number>>;
|
|
107
|
+
/** Set is playing */
|
|
108
|
+
setIsPlaying: Dispatch<SetStateAction<boolean>>;
|
|
109
|
+
/** Set clip length */
|
|
110
|
+
setClipLength: Dispatch<SetStateAction<number>>;
|
|
111
|
+
/** Set reference max frame */
|
|
112
|
+
setReferenceMaxFrame: Dispatch<SetStateAction<number>>;
|
|
113
|
+
/** Set focused input */
|
|
114
|
+
setFocusedInput: Dispatch<SetStateAction<boolean>>;
|
|
115
|
+
/** Set active key points */
|
|
116
|
+
setActiveKeyPoints: Dispatch<SetStateAction<Nullable<KeyPoint[]>>>;
|
|
117
|
+
/** Set main key point */
|
|
118
|
+
setMainKeyPoint: Dispatch<SetStateAction<Nullable<KeyPoint>>>;
|
|
119
|
+
/** Set active channels */
|
|
120
|
+
setActiveChannels: Dispatch<SetStateAction<{
|
|
121
|
+
[key: number]: string;
|
|
122
|
+
}>>;
|
|
123
|
+
/** Play animation */
|
|
124
|
+
play: (forward: boolean) => void;
|
|
125
|
+
/** Stop animation */
|
|
126
|
+
stop: () => void;
|
|
127
|
+
/** Move to specific frame */
|
|
128
|
+
moveToFrame: (frame: number) => void;
|
|
129
|
+
/** Refresh target state */
|
|
130
|
+
refreshTarget: () => void;
|
|
131
|
+
/** Clear key point selection */
|
|
132
|
+
clearSelection: () => void;
|
|
133
|
+
/** Enable a channel for an animation */
|
|
134
|
+
enableChannel: (animation: Animation, color: string) => void;
|
|
135
|
+
/** Disable a channel for an animation */
|
|
136
|
+
disableChannel: (animation: Animation) => void;
|
|
137
|
+
/** Check if channel is enabled */
|
|
138
|
+
isChannelEnabled: (animation: Animation, color: string) => boolean;
|
|
139
|
+
/** Get active channel color */
|
|
140
|
+
getActiveChannel: (animation: Animation) => string | undefined;
|
|
141
|
+
/** Reset all active channels */
|
|
142
|
+
resetAllActiveChannels: () => void;
|
|
143
|
+
/** Get previous key frame */
|
|
144
|
+
getPrevKey: () => Nullable<number>;
|
|
145
|
+
/** Get next key frame */
|
|
146
|
+
getNextKey: () => Nullable<number>;
|
|
147
|
+
/** Prepare the editor */
|
|
148
|
+
prepare: () => void;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* Observables for curve editor events
|
|
152
|
+
*/
|
|
153
|
+
export type CurveEditorObservables = {
|
|
154
|
+
/** Fired when active animation changes */
|
|
155
|
+
onActiveAnimationChanged: Observable<ActiveAnimationChangedOptions>;
|
|
156
|
+
/** Fired when active key point changes */
|
|
157
|
+
onActiveKeyPointChanged: Observable<void>;
|
|
158
|
+
/** Fired when host window is resized */
|
|
159
|
+
onHostWindowResized: Observable<void>;
|
|
160
|
+
/** Fired to select all keys */
|
|
161
|
+
onSelectAllKeys: Observable<void>;
|
|
162
|
+
/** Fired when active key frame changes */
|
|
163
|
+
onActiveKeyFrameChanged: Observable<number>;
|
|
164
|
+
/** Fired when frame is set */
|
|
165
|
+
onFrameSet: Observable<number>;
|
|
166
|
+
/** Fired when frame is manually entered */
|
|
167
|
+
onFrameManuallyEntered: Observable<number>;
|
|
168
|
+
/** Fired when main key point is set for multi-point coordination */
|
|
169
|
+
onMainKeyPointSet: Observable<MainKeyPointInfo>;
|
|
170
|
+
/** Fired when main key point moves during drag */
|
|
171
|
+
onMainKeyPointMoved: Observable<MainKeyPointPosition>;
|
|
172
|
+
/** Fired when value is set */
|
|
173
|
+
onValueSet: Observable<number>;
|
|
174
|
+
/** Fired when value is manually entered */
|
|
175
|
+
onValueManuallyEntered: Observable<number>;
|
|
176
|
+
/** Fired when frame is required */
|
|
177
|
+
onFrameRequired: Observable<void>;
|
|
178
|
+
/** Fired when create or update key point is required */
|
|
179
|
+
onCreateOrUpdateKeyPointRequired: Observable<void>;
|
|
180
|
+
/** Fired when flatten tangent is required */
|
|
181
|
+
onFlattenTangentRequired: Observable<void>;
|
|
182
|
+
/** Fired when linear tangent is required */
|
|
183
|
+
onLinearTangentRequired: Observable<void>;
|
|
184
|
+
/** Fired when break tangent is required */
|
|
185
|
+
onBreakTangentRequired: Observable<void>;
|
|
186
|
+
/** Fired when unify tangent is required */
|
|
187
|
+
onUnifyTangentRequired: Observable<void>;
|
|
188
|
+
/** Fired when step tangent is required */
|
|
189
|
+
onStepTangentRequired: Observable<void>;
|
|
190
|
+
/** Fired when animation should be deleted */
|
|
191
|
+
onDeleteAnimation: Observable<Animation>;
|
|
192
|
+
/** Fired when graph is moved */
|
|
193
|
+
onGraphMoved: Observable<number>;
|
|
194
|
+
/** Fired when graph is scaled */
|
|
195
|
+
onGraphScaled: Observable<number>;
|
|
196
|
+
/** Fired when range is updated */
|
|
197
|
+
onRangeUpdated: Observable<void>;
|
|
198
|
+
/** Fired when move to frame is required */
|
|
199
|
+
onMoveToFrameRequired: Observable<number>;
|
|
200
|
+
/** Fired when animation state changes */
|
|
201
|
+
onAnimationStateChanged: Observable<void>;
|
|
202
|
+
/** Fired when delete active key points is required */
|
|
203
|
+
onDeleteKeyActiveKeyPoints: Observable<void>;
|
|
204
|
+
/** Fired when selection rectangle is moved */
|
|
205
|
+
onSelectionRectangleMoved: Observable<DOMRect>;
|
|
206
|
+
/** Fired when animations are loaded */
|
|
207
|
+
onAnimationsLoaded: Observable<void>;
|
|
208
|
+
/** Fired when clip length is increased */
|
|
209
|
+
onClipLengthIncreased: Observable<number>;
|
|
210
|
+
/** Fired when clip length is decreased */
|
|
211
|
+
onClipLengthDecreased: Observable<number>;
|
|
212
|
+
/** Fired when interpolation mode is set */
|
|
213
|
+
onInterpolationModeSet: Observable<{
|
|
214
|
+
keyId: number;
|
|
215
|
+
value: AnimationKeyInterpolation;
|
|
216
|
+
}>;
|
|
217
|
+
/** Fired when select to is activated */
|
|
218
|
+
onSelectToActivated: Observable<{
|
|
219
|
+
from: number;
|
|
220
|
+
to: number;
|
|
221
|
+
}>;
|
|
222
|
+
/** Fired when range frame bar is resized */
|
|
223
|
+
onRangeFrameBarResized: Observable<number>;
|
|
224
|
+
/** Fired when playhead is moved */
|
|
225
|
+
onPlayheadMoved: Observable<number>;
|
|
226
|
+
/** Fired when active key data changes */
|
|
227
|
+
onActiveKeyDataChanged: Observable<number>;
|
|
228
|
+
};
|
|
229
|
+
/**
|
|
230
|
+
* Combined context value
|
|
231
|
+
*/
|
|
232
|
+
export type CurveEditorContextValue = {
|
|
233
|
+
/** Editor state */
|
|
234
|
+
state: CurveEditorState;
|
|
235
|
+
/** Editor actions */
|
|
236
|
+
actions: CurveEditorActions;
|
|
237
|
+
/** Editor observables */
|
|
238
|
+
observables: CurveEditorObservables;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* Props for the CurveEditorProvider
|
|
242
|
+
*/
|
|
243
|
+
export type CurveEditorProviderProps = {
|
|
244
|
+
/** The scene */
|
|
245
|
+
scene: Scene;
|
|
246
|
+
/** Target animatable */
|
|
247
|
+
target: Nullable<IAnimatable>;
|
|
248
|
+
/** Animations to edit */
|
|
249
|
+
animations: Nullable<Animation[] | TargetedAnimation[]>;
|
|
250
|
+
/** Root animation group if any */
|
|
251
|
+
rootAnimationGroup?: Nullable<AnimationGroup>;
|
|
252
|
+
/** Editor title */
|
|
253
|
+
title?: string;
|
|
254
|
+
/** Whether using targeted animations */
|
|
255
|
+
useTargetAnimations?: boolean;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Provider component for curve editor context
|
|
259
|
+
* @param props - Provider props including scene, target, and animations
|
|
260
|
+
* @returns The provider component with context
|
|
261
|
+
*/
|
|
262
|
+
export declare const CurveEditorProvider: FunctionComponent<PropsWithChildren<CurveEditorProviderProps>>;
|
|
263
|
+
/**
|
|
264
|
+
* Hook to access the curve editor context
|
|
265
|
+
* @returns The curve editor context value
|
|
266
|
+
*/
|
|
267
|
+
export declare function useCurveEditor(): CurveEditorContextValue;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
type AddAnimationPanelProps = {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Panel for adding new animations
|
|
7
|
+
* @returns The add animation panel component
|
|
8
|
+
*/
|
|
9
|
+
export declare const AddAnimationPanel: FunctionComponent<AddAnimationPanelProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type Animation } from "@babylonjs/core/Animations/animation.js";
|
|
3
|
+
type EditAnimationPanelProps = {
|
|
4
|
+
animation: Animation;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Panel for editing animation properties
|
|
9
|
+
* @returns The edit animation panel component
|
|
10
|
+
*/
|
|
11
|
+
export declare const EditAnimationPanel: FunctionComponent<EditAnimationPanelProps>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
type LoadAnimationPanelProps = {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Panel for loading animations from file or snippet server
|
|
7
|
+
* @returns The load animation panel component
|
|
8
|
+
*/
|
|
9
|
+
export declare const LoadAnimationPanel: FunctionComponent<LoadAnimationPanelProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
type SaveAnimationPanelProps = {
|
|
3
|
+
onClose: () => void;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Panel for saving animations to file or snippet server
|
|
7
|
+
* @returns The save animation panel component
|
|
8
|
+
*/
|
|
9
|
+
export declare const SaveAnimationPanel: FunctionComponent<SaveAnimationPanelProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type Scene } from "@babylonjs/core/index.js";
|
|
2
|
+
import { ExtensibleAccordion } from "../extensibleAccordion";
|
|
3
|
+
export declare const HelpersDebugSectionIdentity: unique symbol;
|
|
4
|
+
export declare const TextureChannelsDebugSectionIdentity: unique symbol;
|
|
5
|
+
export declare const FeaturesDebugSectionIdentity: unique symbol;
|
|
6
|
+
export declare const DebugPane: typeof ExtensibleAccordion<Scene>;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type ErrorInfo, type ReactNode, Component } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Props for the {@link ErrorBoundary} component.
|
|
4
|
+
*/
|
|
5
|
+
type ErrorBoundaryProps = {
|
|
6
|
+
/** Child components to render */
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/** Optional fallback UI to show on error */
|
|
9
|
+
fallback?: ReactNode;
|
|
10
|
+
/** Optional callback when an error occurs */
|
|
11
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
12
|
+
/** Optional name for identifying this boundary in logs */
|
|
13
|
+
name?: string;
|
|
14
|
+
};
|
|
15
|
+
type ErrorBoundaryState = {
|
|
16
|
+
hasError: boolean;
|
|
17
|
+
error: Error | null;
|
|
18
|
+
errorInfo: ErrorInfo | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Error boundary component that catches JavaScript errors in child components
|
|
22
|
+
* and displays a fallback UI instead of crashing the entire application.
|
|
23
|
+
*/
|
|
24
|
+
export declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
25
|
+
constructor(props: ErrorBoundaryProps);
|
|
26
|
+
static getDerivedStateFromError(error: Error): Partial<ErrorBoundaryState>;
|
|
27
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
28
|
+
private _handleRetry;
|
|
29
|
+
render(): string | number | boolean | Iterable<ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { type ComponentType, type PropsWithChildren, type Ref } from "react";
|
|
2
|
+
import { type AccordionProps } from "@babylonjs/shared-ui-components/fluent/primitives/accordion.js";
|
|
3
|
+
/**
|
|
4
|
+
* Describes a section within a dynamic accordion that can be added at runtime.
|
|
5
|
+
*/
|
|
6
|
+
export type DynamicAccordionSection = Readonly<{
|
|
7
|
+
/**
|
|
8
|
+
* A unique identity for the section, which can be referenced by section content.
|
|
9
|
+
*/
|
|
10
|
+
identity: string;
|
|
11
|
+
/**
|
|
12
|
+
* An optional order for the section, relative to other sections.
|
|
13
|
+
* Defaults to 0.
|
|
14
|
+
*/
|
|
15
|
+
order?: number;
|
|
16
|
+
/**
|
|
17
|
+
* An optional flag indicating whether the section should be collapsed by default.
|
|
18
|
+
* Defaults to false.
|
|
19
|
+
*/
|
|
20
|
+
collapseByDefault?: boolean;
|
|
21
|
+
}>;
|
|
22
|
+
/**
|
|
23
|
+
* Describes content that belongs to a section within a dynamic accordion.
|
|
24
|
+
*/
|
|
25
|
+
export type DynamicAccordionSectionContent<ContextT> = Readonly<{
|
|
26
|
+
/**
|
|
27
|
+
* A unique key for the the content.
|
|
28
|
+
*/
|
|
29
|
+
key: string;
|
|
30
|
+
/**
|
|
31
|
+
* The section this content belongs to.
|
|
32
|
+
*/
|
|
33
|
+
section: string;
|
|
34
|
+
/**
|
|
35
|
+
* An optional order for the content within the section.
|
|
36
|
+
* Defaults to 0.
|
|
37
|
+
*/
|
|
38
|
+
order?: number;
|
|
39
|
+
/**
|
|
40
|
+
* The React component that will be rendered for this content.
|
|
41
|
+
*/
|
|
42
|
+
component: ComponentType<{
|
|
43
|
+
context: ContextT;
|
|
44
|
+
}>;
|
|
45
|
+
}>;
|
|
46
|
+
/**
|
|
47
|
+
* Imperative handle for controlling section highlights on the extensible accordion.
|
|
48
|
+
*/
|
|
49
|
+
export type SectionsImperativeRef = {
|
|
50
|
+
/**
|
|
51
|
+
* Highlights the specified sections, collapsing all others until the context changes.
|
|
52
|
+
* @param sections The identity strings of the sections to highlight.
|
|
53
|
+
*/
|
|
54
|
+
highlightSections: (sections: readonly string[]) => void;
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* An accordion component that supports dynamically adding sections and section content at runtime.
|
|
58
|
+
* Combines statically defined children sections with dynamically registered sections and content.
|
|
59
|
+
* @param props The accordion props including sections, section content, context, and an optional imperative ref.
|
|
60
|
+
* @returns The extensible accordion component.
|
|
61
|
+
*/
|
|
62
|
+
export declare function ExtensibleAccordion<ContextT = unknown>(props: PropsWithChildren<{
|
|
63
|
+
sections: readonly DynamicAccordionSection[];
|
|
64
|
+
sectionContent: readonly DynamicAccordionSectionContent<ContextT>[];
|
|
65
|
+
context: ContextT;
|
|
66
|
+
sectionsRef?: Ref<SectionsImperativeRef>;
|
|
67
|
+
} & AccordionProps>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type IGizmoService } from "../services/gizmoService";
|
|
3
|
+
import { type ISceneContext } from "../services/sceneContext";
|
|
4
|
+
export declare const GizmoToolbar: FunctionComponent<{
|
|
5
|
+
gizmoService: IGizmoService;
|
|
6
|
+
sceneContext: ISceneContext;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Used to apply common styles to panes.
|
|
3
|
+
*/
|
|
4
|
+
export declare const SidePaneContainer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type PerformanceViewerCollector } from "@babylonjs/core/Misc/PerformanceViewer/performanceViewerCollector.js";
|
|
2
|
+
import { type Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
|
+
import { type FunctionComponent } from "react";
|
|
4
|
+
import { type PerfLayoutSize, type VisibleRangeChangedObservableProps } from "./graphSupportingTypes";
|
|
5
|
+
import { type Scene } from "@babylonjs/core/scene.js";
|
|
6
|
+
import { type Vector2 } from "@babylonjs/core/Maths/math.vector.js";
|
|
7
|
+
type CanvasGraphProps = {
|
|
8
|
+
scene: Scene;
|
|
9
|
+
collector: PerformanceViewerCollector;
|
|
10
|
+
layoutObservable?: Observable<PerfLayoutSize>;
|
|
11
|
+
returnToPlayheadObservable?: Observable<void>;
|
|
12
|
+
onVisibleRangeChangedObservable?: Observable<VisibleRangeChangedObservableProps>;
|
|
13
|
+
initialGraphSize?: Vector2;
|
|
14
|
+
};
|
|
15
|
+
export declare const CanvasGraph: FunctionComponent<CanvasGraphProps>;
|
|
16
|
+
export {};
|