@babylonjs/inspector 8.56.2 → 9.1.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/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 +61 -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-BmiNjZiw.js} +7 -7
- package/lib/extensionsListService-BmiNjZiw.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-BCbXjPTn.js} +791 -758
- package/lib/index-BCbXjPTn.js.map +1 -0
- package/lib/index.d.ts +108 -74767
- package/lib/index.js +5 -5
- 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/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 +37 -0
- package/lib/modularity/serviceContainer.d.ts +41 -0
- package/lib/modularity/serviceDefinition.d.ts +64 -0
- package/lib/{quickCreateToolsService-BtsSLeMY.js → quickCreateToolsService-BoqrJqoM.js} +6 -6
- package/lib/quickCreateToolsService-BoqrJqoM.js.map +1 -0
- package/lib/{reflectorService-Bzs-Ykos.js → reflectorService-CFTva2GG.js} +6 -6
- package/lib/reflectorService-CFTva2GG.js.map +1 -0
- package/lib/services/defaultToolbarMetadata.d.ts +5 -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 +9 -9
- 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,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 {};
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { type CanvasGraphServiceSettings, type PerfLayoutSize } from "./graphSupportingTypes";
|
|
2
|
+
import { type IPerfDatasets, type IPerfMetadata } from "@babylonjs/core/Misc/interfaces/iPerfViewer.js";
|
|
3
|
+
/**
|
|
4
|
+
* This class acts as the main API for graphing. Here is where you will find methods to let the service know new data needs to be drawn,
|
|
5
|
+
* let it know something has been resized, etc!
|
|
6
|
+
*/
|
|
7
|
+
export declare class CanvasGraphService {
|
|
8
|
+
private _ctx;
|
|
9
|
+
private _width;
|
|
10
|
+
private _height;
|
|
11
|
+
private _sizeOfWindow;
|
|
12
|
+
private _ticks;
|
|
13
|
+
private _panPosition;
|
|
14
|
+
private _position;
|
|
15
|
+
private _datasetBounds;
|
|
16
|
+
private _globalTimeMinMax;
|
|
17
|
+
private _hoverPosition;
|
|
18
|
+
private _drawableArea;
|
|
19
|
+
private _axisHeight;
|
|
20
|
+
private _tooltipItems;
|
|
21
|
+
private _tooltipTextCache;
|
|
22
|
+
private _tickerTextCache;
|
|
23
|
+
private _tickerItems;
|
|
24
|
+
private _preprocessedTooltipInfo;
|
|
25
|
+
private _numberOfTickers;
|
|
26
|
+
private _onVisibleRangeChangedObservable?;
|
|
27
|
+
private readonly _addonFontLineHeight;
|
|
28
|
+
private readonly _defaultLineHeight;
|
|
29
|
+
/**
|
|
30
|
+
* The datasets to render.
|
|
31
|
+
*/
|
|
32
|
+
readonly datasets: IPerfDatasets;
|
|
33
|
+
/**
|
|
34
|
+
* Metadata for each dataset.
|
|
35
|
+
*/
|
|
36
|
+
metadata: Map<string, IPerfMetadata>;
|
|
37
|
+
/**
|
|
38
|
+
* Creates an instance of CanvasGraphService.
|
|
39
|
+
*
|
|
40
|
+
* @param canvas a pointer to the canvas dom element we would like to write to.
|
|
41
|
+
* @param settings settings for our service.
|
|
42
|
+
*/
|
|
43
|
+
constructor(canvas: HTMLCanvasElement, settings: CanvasGraphServiceSettings);
|
|
44
|
+
/**
|
|
45
|
+
* This method lets the service know it should get ready to update what it is displaying.
|
|
46
|
+
*/
|
|
47
|
+
update: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Update the canvas graph service with the new height and width of the canvas.
|
|
50
|
+
* @param size The new size of the canvas.
|
|
51
|
+
*/
|
|
52
|
+
resize(size: PerfLayoutSize): void;
|
|
53
|
+
/**
|
|
54
|
+
* Force resets the position in the data, effectively returning to the most current data.
|
|
55
|
+
*/
|
|
56
|
+
resetDataPosition(): void;
|
|
57
|
+
private _prevPointById;
|
|
58
|
+
private _prevValueById;
|
|
59
|
+
/**
|
|
60
|
+
* This method draws the data and sets up the appropriate scales.
|
|
61
|
+
*/
|
|
62
|
+
private _draw;
|
|
63
|
+
private _drawTickers;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the index of the closest time for the datasets.
|
|
66
|
+
* Uses a modified binary search to get value.
|
|
67
|
+
*
|
|
68
|
+
* @param targetTime the time we want to get close to.
|
|
69
|
+
* @returns index of the item with the closest time to the targetTime
|
|
70
|
+
*/
|
|
71
|
+
private _getClosestPointToTimestamp;
|
|
72
|
+
/**
|
|
73
|
+
* This is a convenience method to get the number of collected slices.
|
|
74
|
+
* @returns the total number of collected slices.
|
|
75
|
+
*/
|
|
76
|
+
private _getNumberOfSlices;
|
|
77
|
+
/**
|
|
78
|
+
* Draws the time axis, adjusts the drawable area for the graph.
|
|
79
|
+
*
|
|
80
|
+
* @param timeMinMax the minimum and maximum for the time axis.
|
|
81
|
+
* @param drawableArea the current allocated drawable area.
|
|
82
|
+
*/
|
|
83
|
+
private _drawTimeAxis;
|
|
84
|
+
/**
|
|
85
|
+
* Given a timestamp (should be the maximum timestamp in view), this function returns the maximum unit the timestamp contains.
|
|
86
|
+
* This information can be used for formatting purposes.
|
|
87
|
+
* @param timestamp the maximum timestamp to find the maximum timestamp unit for.
|
|
88
|
+
* @returns The maximum unit the timestamp has.
|
|
89
|
+
*/
|
|
90
|
+
private _getTimestampUnit;
|
|
91
|
+
/**
|
|
92
|
+
* Given a timestamp and the interval unit, this function will parse the timestamp to the appropriate format.
|
|
93
|
+
* @param timestamp The timestamp to parse
|
|
94
|
+
* @param intervalUnit The maximum unit of the maximum timestamp in an interval.
|
|
95
|
+
* @returns a string representing the parsed timestamp.
|
|
96
|
+
*/
|
|
97
|
+
private _parseTimestamp;
|
|
98
|
+
/**
|
|
99
|
+
* Generates a list of ticks given the min and max of the axis, and the space available in the axis.
|
|
100
|
+
*
|
|
101
|
+
* @param minMax the minimum and maximum values of the axis
|
|
102
|
+
* @param spaceAvailable the total amount of space we have allocated to our axis
|
|
103
|
+
*/
|
|
104
|
+
private _generateTicks;
|
|
105
|
+
/**
|
|
106
|
+
* Nice number algorithm based on psueudo code defined in "Graphics Gems" by Andrew S. Glassner.
|
|
107
|
+
* This will find a "nice" number approximately equal to num.
|
|
108
|
+
*
|
|
109
|
+
* @param num The number we want to get close to.
|
|
110
|
+
* @param shouldRound if true we will round the number, otherwise we will get the ceiling.
|
|
111
|
+
* @returns a "nice" number approximately equal to num.
|
|
112
|
+
*/
|
|
113
|
+
private _niceNumber;
|
|
114
|
+
/**
|
|
115
|
+
* Gets the min and max as a single object from an array of numbers.
|
|
116
|
+
* @param bounds
|
|
117
|
+
* @param offset
|
|
118
|
+
* @returns the min and max of the array.
|
|
119
|
+
*/
|
|
120
|
+
private _getMinMax;
|
|
121
|
+
/**
|
|
122
|
+
* Converts a single number to a pixel coordinate in a single axis by normalizing the data to a [0, 1] scale using the minimum and maximum values.
|
|
123
|
+
*
|
|
124
|
+
* @param num the number we want to get the pixel coordinate for
|
|
125
|
+
* @param minMax the min and max of the dataset in the axis we want the pixel coordinate for.
|
|
126
|
+
* @param startingPixel the starting pixel coordinate (this means it takes account for any offset).
|
|
127
|
+
* @param spaceAvailable the total space available in this axis.
|
|
128
|
+
* @param shouldFlipValue if we should use a [1, 0] scale instead of a [0, 1] scale.
|
|
129
|
+
* @returns the pixel coordinate of the value in a single axis.
|
|
130
|
+
*/
|
|
131
|
+
private _getPixelForNumber;
|
|
132
|
+
/**
|
|
133
|
+
* Add in any necessary event listeners.
|
|
134
|
+
*
|
|
135
|
+
* @param canvas The canvas we want to attach listeners to.
|
|
136
|
+
*/
|
|
137
|
+
private _attachEventListeners;
|
|
138
|
+
/**
|
|
139
|
+
* We remove all event listeners we added.
|
|
140
|
+
*
|
|
141
|
+
* @param canvas The canvas we want to remove listeners from.
|
|
142
|
+
*/
|
|
143
|
+
private _removeEventListeners;
|
|
144
|
+
/**
|
|
145
|
+
* Handles what to do when we are hovering over the canvas and not panning.
|
|
146
|
+
*
|
|
147
|
+
* @param event A reference to the event to be handled.
|
|
148
|
+
*/
|
|
149
|
+
private _handleDataHover;
|
|
150
|
+
/**
|
|
151
|
+
* Debounced processing and drawing of tooltip.
|
|
152
|
+
*/
|
|
153
|
+
private _debouncedTooltip;
|
|
154
|
+
/**
|
|
155
|
+
* Handles what to do when we stop hovering over the canvas.
|
|
156
|
+
*/
|
|
157
|
+
private _handleStopHover;
|
|
158
|
+
/**
|
|
159
|
+
* Given a line defined by P1: (x1, y1) and P2: (x2, y2) get the distance of P0 (x0, y0) from the line.
|
|
160
|
+
* https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_line#Line_defined_by_two_points
|
|
161
|
+
* @param x1 x position of point P1
|
|
162
|
+
* @param y1 y position of point P1
|
|
163
|
+
* @param x2 x position of point P2
|
|
164
|
+
* @param y2 y position of point P2
|
|
165
|
+
* @param x0 x position of point P0
|
|
166
|
+
* @param y0 y position of point P0
|
|
167
|
+
* @returns distance of P0 from the line defined by P1 and P2
|
|
168
|
+
*/
|
|
169
|
+
private _getDistanceFromLine;
|
|
170
|
+
/**
|
|
171
|
+
* This method does preprocessing calculations for the tooltip.
|
|
172
|
+
* @param pos the position of our mouse.
|
|
173
|
+
* @param drawableArea the remaining drawable area.
|
|
174
|
+
*/
|
|
175
|
+
private _preprocessTooltip;
|
|
176
|
+
/**
|
|
177
|
+
* Draws the tooltip given the area it is allowed to draw in and the current pixel position.
|
|
178
|
+
*
|
|
179
|
+
* @param pos the position of the mouse cursor in pixels (x, y).
|
|
180
|
+
* @param drawableArea the available area we can draw in.
|
|
181
|
+
*/
|
|
182
|
+
private _drawTooltip;
|
|
183
|
+
/**
|
|
184
|
+
* Gets the number from a pixel position given the minimum and maximum value in range, and the starting pixel and the ending pixel.
|
|
185
|
+
*
|
|
186
|
+
* @param pixel current pixel position we want to get the number for.
|
|
187
|
+
* @param minMax the minimum and maximum number in the range.
|
|
188
|
+
* @param startingPixel position of the starting pixel in range.
|
|
189
|
+
* @param endingPixel position of ending pixel in range.
|
|
190
|
+
* @param shouldFlip if we should use a [1, 0] scale instead of a [0, 1] scale.
|
|
191
|
+
* @returns number corresponding to pixel position
|
|
192
|
+
*/
|
|
193
|
+
private _getNumberFromPixel;
|
|
194
|
+
/**
|
|
195
|
+
* The handler for when we want to zoom in and out of the graph.
|
|
196
|
+
*
|
|
197
|
+
* @param event a mouse wheel event.
|
|
198
|
+
*/
|
|
199
|
+
private _handleZoom;
|
|
200
|
+
/**
|
|
201
|
+
* Initializes the panning object and attaches appropriate listener.
|
|
202
|
+
*
|
|
203
|
+
* @param event the mouse event containing positional information.
|
|
204
|
+
*/
|
|
205
|
+
private _handlePanStart;
|
|
206
|
+
/**
|
|
207
|
+
* While panning this event will keep track of the delta and update the "positions".
|
|
208
|
+
*
|
|
209
|
+
* @param event The mouse event that contains positional information.
|
|
210
|
+
*/
|
|
211
|
+
private _handlePan;
|
|
212
|
+
/**
|
|
213
|
+
* Clears the panning object and removes the appropriate listener.
|
|
214
|
+
*/
|
|
215
|
+
private _handlePanStop;
|
|
216
|
+
/**
|
|
217
|
+
* Method which returns true if the data should become realtime, false otherwise.
|
|
218
|
+
*
|
|
219
|
+
* @returns if the data should become realtime or not.
|
|
220
|
+
*/
|
|
221
|
+
private _shouldBecomeRealtime;
|
|
222
|
+
/**
|
|
223
|
+
* Will generate a playhead with a futurebox that takes up (1-scalefactor)*100% of the canvas.
|
|
224
|
+
*
|
|
225
|
+
* @param drawableArea The remaining drawable area.
|
|
226
|
+
* @param scaleFactor The Percentage between 0.0 and 1.0 of the canvas the data gets drawn on.
|
|
227
|
+
*/
|
|
228
|
+
private _drawPlayheadRegion;
|
|
229
|
+
/**
|
|
230
|
+
* Method to do cleanup when the object is done being used.
|
|
231
|
+
*
|
|
232
|
+
*/
|
|
233
|
+
destroy(): void;
|
|
234
|
+
/**
|
|
235
|
+
* This method clears the canvas
|
|
236
|
+
*/
|
|
237
|
+
clear(): void;
|
|
238
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { type IPerfDatasets } from "@babylonjs/core/Misc/interfaces/iPerfViewer.js";
|
|
2
|
+
import { type Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
|
+
/**
|
|
4
|
+
* Defines a structure to hold max, min and a optional current.
|
|
5
|
+
*/
|
|
6
|
+
export type PerfMinMax = {
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
current?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Defines structure of the object which contains information related to panning.
|
|
13
|
+
*/
|
|
14
|
+
export type PerfMousePanningPosition = {
|
|
15
|
+
xPos: number;
|
|
16
|
+
delta: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Defines structure of the object which contains information regarding the bounds of each dataset we want to consider.
|
|
20
|
+
*/
|
|
21
|
+
export type PerfIndexBounds = {
|
|
22
|
+
start: number;
|
|
23
|
+
end: number;
|
|
24
|
+
};
|
|
25
|
+
export type PerfLayoutSize = {
|
|
26
|
+
width: number;
|
|
27
|
+
height: number;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Defines the structure of the meta object for the tooltip that appears when hovering over a performance graph!
|
|
31
|
+
*/
|
|
32
|
+
export type PerfTooltip = {
|
|
33
|
+
text: string;
|
|
34
|
+
color: string;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Defines the structure of a cache object used to store the result of measureText().
|
|
38
|
+
*/
|
|
39
|
+
export type PerfTextMeasureCache = {
|
|
40
|
+
text: string;
|
|
41
|
+
width: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Defines a structure defining the available space in a drawable area.
|
|
45
|
+
*/
|
|
46
|
+
export type GraphDrawableArea = {
|
|
47
|
+
top: number;
|
|
48
|
+
left: number;
|
|
49
|
+
bottom: number;
|
|
50
|
+
right: number;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Defines the structure representing necessary ticker information.
|
|
54
|
+
*/
|
|
55
|
+
export type PerfTicker = PerfMinMax & {
|
|
56
|
+
id: string;
|
|
57
|
+
text: string;
|
|
58
|
+
};
|
|
59
|
+
export type VisibleRangeChangedObservableProps = {
|
|
60
|
+
valueMap: Map<string, PerfMinMax>;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Defines what settings our canvas graphing service accepts
|
|
64
|
+
*/
|
|
65
|
+
export type CanvasGraphServiceSettings = {
|
|
66
|
+
datasets: IPerfDatasets;
|
|
67
|
+
onVisibleRangeChangedObservable?: Observable<VisibleRangeChangedObservableProps>;
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Defines the structure representing the preprocessable tooltip information.
|
|
71
|
+
*/
|
|
72
|
+
export type TooltipPreprocessedInformation = {
|
|
73
|
+
xForActualTimestamp: number;
|
|
74
|
+
numberOfTooltipItems: number;
|
|
75
|
+
longestText: string;
|
|
76
|
+
focusedId: string;
|
|
77
|
+
};
|
|
78
|
+
export type PerfTooltipHoverPosition = {
|
|
79
|
+
xPos: number;
|
|
80
|
+
yPos: number;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Defines the supported timestamp units.
|
|
84
|
+
*/
|
|
85
|
+
export declare enum TimestampUnit {
|
|
86
|
+
Milliseconds = 0,
|
|
87
|
+
Seconds = 1,
|
|
88
|
+
Minutes = 2,
|
|
89
|
+
Hours = 3
|
|
90
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
|
+
import { type PerformanceViewerCollector } from "@babylonjs/core/Misc/PerformanceViewer/performanceViewerCollector.js";
|
|
4
|
+
import { type VisibleRangeChangedObservableProps } from "./graphSupportingTypes";
|
|
5
|
+
interface IPerformanceSidebarProps {
|
|
6
|
+
collector: PerformanceViewerCollector;
|
|
7
|
+
onVisibleRangeChangedObservable?: Observable<VisibleRangeChangedObservableProps>;
|
|
8
|
+
}
|
|
9
|
+
export declare const PerformanceSidebar: FunctionComponent<IPerformanceSidebarProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type PerformanceViewerCollector } from "@babylonjs/core/Misc/PerformanceViewer/performanceViewerCollector.js";
|
|
2
|
+
import { type Observable } from "@babylonjs/core/Misc/observable.js";
|
|
3
|
+
import { type Scene } from "@babylonjs/core/scene.js";
|
|
4
|
+
import { type FunctionComponent } from "react";
|
|
5
|
+
import { type PerfLayoutSize } from "./graphSupportingTypes";
|
|
6
|
+
import { type Vector2 } from "@babylonjs/core/Maths/math.vector.js";
|
|
7
|
+
type PerformanceViewerProps = {
|
|
8
|
+
scene: Scene;
|
|
9
|
+
layoutObservable: Observable<PerfLayoutSize>;
|
|
10
|
+
returnToLiveObservable: Observable<void>;
|
|
11
|
+
performanceCollector: PerformanceViewerCollector;
|
|
12
|
+
initialGraphSize?: Vector2;
|
|
13
|
+
};
|
|
14
|
+
export declare const PerformanceViewer: FunctionComponent<PerformanceViewerProps>;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type Nullable, type Scene } from "@babylonjs/core/index.js";
|
|
3
|
+
import { type IGizmoService } from "../services/gizmoService";
|
|
4
|
+
export declare const PickingToolbar: FunctionComponent<{
|
|
5
|
+
scene: Scene;
|
|
6
|
+
selectEntity: (entity: Nullable<object>) => void;
|
|
7
|
+
gizmoService: IGizmoService;
|
|
8
|
+
ignoreBackfaces?: boolean;
|
|
9
|
+
highlightSelectedEntity?: boolean;
|
|
10
|
+
onHighlightSelectedEntityChange?: (value: boolean) => void;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type AnimationGroup } from "@babylonjs/core/Animations/animationGroup.js";
|
|
3
|
+
export declare const AnimationGroupControlProperties: FunctionComponent<{
|
|
4
|
+
animationGroup: AnimationGroup;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const AnimationGroupInfoProperties: FunctionComponent<{
|
|
7
|
+
animationGroup: AnimationGroup;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type AnimationRange } from "@babylonjs/core/Animations/animationRange.js";
|
|
3
|
+
import { type Nullable } from "@babylonjs/core/types.js";
|
|
4
|
+
import { type IAnimatable } from "@babylonjs/core/Animations/animatable.interface.js";
|
|
5
|
+
import { type Scene } from "@babylonjs/core/scene.js";
|
|
6
|
+
import { AnimationPropertiesOverride } from "@babylonjs/core/Animations/animationPropertiesOverride.js";
|
|
7
|
+
export interface IAnimationRangeContainer {
|
|
8
|
+
getAnimationRanges(): Nullable<AnimationRange>[];
|
|
9
|
+
}
|
|
10
|
+
export interface IAnimatableContainer {
|
|
11
|
+
getAnimatables(): IAnimatable[];
|
|
12
|
+
}
|
|
13
|
+
declare module "@babylonjs/core/Animations/animatable.js" {
|
|
14
|
+
interface Animatable {
|
|
15
|
+
animationPropertiesOverride?: AnimationPropertiesOverride;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export declare const AnimationsProperties: FunctionComponent<{
|
|
19
|
+
scene: Scene;
|
|
20
|
+
entity: Partial<IAnimatable & IAnimationRangeContainer & IAnimatableContainer>;
|
|
21
|
+
}>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type TargetedAnimation } from "@babylonjs/core/index.js";
|
|
3
|
+
import { type ISelectionService } from "../../../services/selectionService";
|
|
4
|
+
export declare const TargetedAnimationGeneralProperties: FunctionComponent<{
|
|
5
|
+
targetedAnimation: TargetedAnimation;
|
|
6
|
+
selectionService: ISelectionService;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type Atmosphere } from "@babylonjs/addons/atmosphere/atmosphere.js";
|
|
3
|
+
export declare const GeneralAtmosphereProperties: FunctionComponent<{
|
|
4
|
+
entity: Atmosphere;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ScatteringAndAbsorptionProperties: FunctionComponent<{
|
|
7
|
+
entity: Atmosphere;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const MultipleScatteringProperties: FunctionComponent<{
|
|
10
|
+
entity: Atmosphere;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const AerialPerspectiveProperties: FunctionComponent<{
|
|
13
|
+
entity: Atmosphere;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const DiffuseIrradianceProperties: FunctionComponent<{
|
|
16
|
+
entity: Atmosphere;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const RenderingOptionsProperties: FunctionComponent<{
|
|
19
|
+
entity: Atmosphere;
|
|
20
|
+
}>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type Sound } from "@babylonjs/core/index.js";
|
|
2
|
+
import { type FunctionComponent } from "react";
|
|
3
|
+
export declare const SoundGeneralProperties: FunctionComponent<{
|
|
4
|
+
sound: Sound;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const SoundCommandProperties: FunctionComponent<{
|
|
7
|
+
sound: Sound;
|
|
8
|
+
}>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { type ComponentProps, type ComponentType } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Helper type to check if a type includes null or undefined
|
|
4
|
+
*/
|
|
5
|
+
type IsNullable<T> = null extends T ? true : undefined extends T ? true : false;
|
|
6
|
+
/**
|
|
7
|
+
* Base props for BoundProperty
|
|
8
|
+
*/
|
|
9
|
+
type BaseBoundPropertyProps<TargetT extends object, PropertyKeyT extends keyof TargetT, ComponentT extends ComponentType<any>> = Omit<ComponentProps<ComponentT>, "value" | "onChange" | "nullable" | "defaultValue" | "ignoreNullable"> & {
|
|
10
|
+
component: ComponentT;
|
|
11
|
+
target: TargetT | null | undefined;
|
|
12
|
+
propertyKey: PropertyKeyT;
|
|
13
|
+
/** Optional propertyPath used to generate the copyString if path to property is not equal to entity.target */
|
|
14
|
+
propertyPath?: string;
|
|
15
|
+
convertTo?: (value: TargetT[PropertyKeyT]) => TargetT[PropertyKeyT];
|
|
16
|
+
convertFrom?: (value: TargetT[PropertyKeyT]) => TargetT[PropertyKeyT];
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Enhanced BoundProperty props that enforces strict nullable handling
|
|
20
|
+
*/
|
|
21
|
+
export type BoundPropertyProps<TargetT extends object, PropertyKeyT extends keyof TargetT, ComponentT extends ComponentType<any>> = BaseBoundPropertyProps<TargetT, PropertyKeyT, ComponentT> & (IsNullable<TargetT[PropertyKeyT]> extends true ? {
|
|
22
|
+
defaultValue: null;
|
|
23
|
+
nullable?: never;
|
|
24
|
+
ignoreNullable?: never;
|
|
25
|
+
} | (ComponentProps<ComponentT> extends {
|
|
26
|
+
nullable?: boolean;
|
|
27
|
+
} ? {
|
|
28
|
+
nullable: true;
|
|
29
|
+
defaultValue: NonNullable<TargetT[PropertyKeyT]>;
|
|
30
|
+
ignoreNullable?: never;
|
|
31
|
+
} | {
|
|
32
|
+
ignoreNullable: true;
|
|
33
|
+
defaultValue: NonNullable<TargetT[PropertyKeyT]>;
|
|
34
|
+
nullable?: never;
|
|
35
|
+
} : never) : {});
|
|
36
|
+
declare function BoundPropertyImpl<TargetT extends object, PropertyKeyT extends keyof TargetT, ComponentT extends ComponentType<any>>(props: BoundPropertyProps<TargetT, PropertyKeyT, ComponentT>, ref?: any): import("react/jsx-runtime").JSX.Element | null;
|
|
37
|
+
/**
|
|
38
|
+
* Intercepts the passed in component's target[propertyKey] with useInterceptObservable and sets component state using useObservableState.
|
|
39
|
+
* Renders the passed in component with value as the new observableState value and onChange as a callback to set the target[propertyKey] value.
|
|
40
|
+
*
|
|
41
|
+
* NOTE: BoundProperty has strict nullable enforcement!
|
|
42
|
+
*
|
|
43
|
+
* If Target[PropertyKey] is Nullable, caller has three options:
|
|
44
|
+
* 1. `nullable: true` + `defaultValue: NonNullable<T>` - Shows enable/disable checkbox UI
|
|
45
|
+
* 2. `ignoreNullable: true` + `defaultValue: NonNullable<T>` - Shows disabled state when null
|
|
46
|
+
* 3. `defaultValue: null` - Skips nullable handling entirely, passes value through as-is
|
|
47
|
+
*
|
|
48
|
+
* @param props BoundPropertyProps with strict nullable validation
|
|
49
|
+
* @returns JSX element
|
|
50
|
+
*/
|
|
51
|
+
export declare const BoundProperty: typeof BoundPropertyImpl;
|
|
52
|
+
/**
|
|
53
|
+
* Mutually exclusive propertyPath or functionPath - one required
|
|
54
|
+
*/
|
|
55
|
+
type RequiredPropertyPath = {
|
|
56
|
+
propertyPath: string;
|
|
57
|
+
functionPath?: never;
|
|
58
|
+
} | {
|
|
59
|
+
functionPath: string;
|
|
60
|
+
propertyPath?: never;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* Props for Property component - a simpler version of BoundProperty that only handles onCopy functionality
|
|
64
|
+
* Pass in the full propertyPath from entity to property (e.g. "meshes[0].position.x") to ensure copyString is accurate
|
|
65
|
+
* Use functionPath for function-based properties (e.g. "setEnabled" generates "debugNode.setEnabled(value)")
|
|
66
|
+
*/
|
|
67
|
+
export type PropertyProps<ComponentT extends ComponentType<any>> = Omit<ComponentProps<ComponentT>, "onCopy"> & {
|
|
68
|
+
component: ComponentT;
|
|
69
|
+
} & RequiredPropertyPath;
|
|
70
|
+
declare function PropertyImpl<ComponentT extends ComponentType<any>>(props: PropertyProps<ComponentT>, ref?: any): import("react/jsx-runtime").JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* A simpler version of BoundProperty that only provides the onCopy functionality.
|
|
73
|
+
* Does not bind the value/onChange - those must be provided by the caller.
|
|
74
|
+
* Use this when you need copy support but have custom value/onChange handling.
|
|
75
|
+
*
|
|
76
|
+
* @param props PropertyProps with propertyName for copy support
|
|
77
|
+
* @returns JSX element
|
|
78
|
+
*/
|
|
79
|
+
export declare const Property: typeof PropertyImpl;
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type FunctionComponent } from "react";
|
|
2
|
+
import { type ArcRotateCamera } from "@babylonjs/core/index.js";
|
|
3
|
+
export declare const ArcRotateCameraTransformProperties: FunctionComponent<{
|
|
4
|
+
camera: ArcRotateCamera;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const ArcRotateCameraControlProperties: FunctionComponent<{
|
|
7
|
+
camera: ArcRotateCamera;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const ArcRotateCameraCollisionProperties: FunctionComponent<{
|
|
10
|
+
camera: ArcRotateCamera;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const ArcRotateCameraLimitsProperties: FunctionComponent<{
|
|
13
|
+
camera: ArcRotateCamera;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const ArcRotateCameraBehaviorsProperties: FunctionComponent<{
|
|
16
|
+
camera: ArcRotateCamera;
|
|
17
|
+
}>;
|