@babylonjs/inspector 8.30.0-preview → 8.30.1-preview

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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { B as ButtonLine, a as SyncedSliderPropertyLine, S as SwitchPropertyLine, C as Collapse, T as ToolsServiceIdentity } from './index-BTXdoz_s.js';
2
+ import { ButtonLine, SyncedSliderPropertyLine, SwitchPropertyLine, Collapse, ToolsServiceIdentity } from './index.js';
3
3
  import { useState, useRef, useCallback } from 'react';
4
4
  import { Tools } from '@babylonjs/core/Misc/tools.js';
5
5
  import { VideoRecorder } from '@babylonjs/core/Misc/videoRecorder.js';
@@ -183,4 +183,4 @@ var captureService = {
183
183
  };
184
184
 
185
185
  export { CaptureServiceDefinition, captureService as default };
186
- //# sourceMappingURL=captureService-BEferXko.js.map
186
+ //# sourceMappingURL=captureService-BaLg4gki.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"captureService-BEferXko.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/captureTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/captureService.tsx"],"sourcesContent":["import { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { useState, useRef, useCallback } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { SyncedSliderPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine\";\r\nimport type { IScreenshotSize } from \"core/Misc/interfaces/screenshotSize\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\nimport { VideoRecorder } from \"core/Misc/videoRecorder\";\r\nimport { captureEquirectangularFromScene } from \"core/Misc/equirectangularCapture\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\nimport { CameraRegular, RecordRegular, RecordStopRegular } from \"@fluentui/react-icons\";\r\nimport { FrameGraphUtils } from \"core/FrameGraph/frameGraphUtils\";\r\n\r\nexport const CaptureRttTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [useWidthHeight, setUseWidthHeight] = useState(false);\r\n const [screenshotSize, setScreenshotSize] = useState<IScreenshotSize>({ precision: 1 });\r\n\r\n const captureRender = useCallback(async () => {\r\n const sizeToUse: IScreenshotSize = { ...screenshotSize };\r\n if (!useWidthHeight) {\r\n sizeToUse.width = undefined;\r\n sizeToUse.height = undefined;\r\n }\r\n\r\n if (scene.activeCamera) {\r\n Tools.CreateScreenshotUsingRenderTarget(scene.getEngine(), scene.activeCamera, sizeToUse, undefined, undefined, 4);\r\n }\r\n }, [scene, screenshotSize, useWidthHeight]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Capture\" icon={CameraRegular} onClick={captureRender} />\r\n <SyncedSliderPropertyLine\r\n label=\"Precision\"\r\n value={screenshotSize.precision ?? 1}\r\n onChange={(value) => setScreenshotSize({ ...screenshotSize, precision: value ?? 1 })}\r\n min={0.1}\r\n max={10}\r\n step={0.1}\r\n />\r\n <SwitchPropertyLine label=\"Use Custom Width/Height\" value={useWidthHeight} onChange={(value) => setUseWidthHeight(value)} />\r\n <Collapse visible={useWidthHeight}>\r\n <SyncedSliderPropertyLine\r\n label=\"Width\"\r\n value={screenshotSize.width ?? 512}\r\n onChange={(data) => setScreenshotSize({ ...screenshotSize, width: data ?? 512 })}\r\n min={1}\r\n step={1}\r\n />\r\n <SyncedSliderPropertyLine\r\n label=\"Height\"\r\n value={screenshotSize.height ?? 512}\r\n onChange={(data) => setScreenshotSize({ ...screenshotSize, height: data ?? 512 })}\r\n min={1}\r\n step={1}\r\n />\r\n </Collapse>\r\n </>\r\n );\r\n};\r\n\r\nexport const CaptureScreenshotTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [isRecording, setIsRecording] = useState(false);\r\n const videoRecorder = useRef<VideoRecorder>();\r\n\r\n const captureScreenshot = useCallback(() => {\r\n const camera = scene.frameGraph ? FrameGraphUtils.FindMainCamera(scene.frameGraph) : scene.activeCamera;\r\n if (camera) {\r\n Tools.CreateScreenshot(scene.getEngine(), camera, { precision: 1 });\r\n }\r\n }, [scene]);\r\n\r\n const captureEquirectangularAsync = useCallback(async () => {\r\n const currentActiveCamera = scene.activeCamera;\r\n if (!currentActiveCamera && scene.frameGraph) {\r\n scene.activeCamera = FrameGraphUtils.FindMainCamera(scene.frameGraph);\r\n }\r\n if (scene.activeCamera) {\r\n await captureEquirectangularFromScene(scene, { size: 1024, filename: \"equirectangular_capture.png\" });\r\n }\r\n // eslint-disable-next-line require-atomic-updates\r\n scene.activeCamera = currentActiveCamera;\r\n }, [scene]);\r\n\r\n const recordVideoAsync = useCallback(async () => {\r\n if (videoRecorder.current && videoRecorder.current.isRecording) {\r\n videoRecorder.current.stopRecording();\r\n setIsRecording(false);\r\n return;\r\n }\r\n\r\n if (!videoRecorder.current) {\r\n videoRecorder.current = new VideoRecorder(scene.getEngine());\r\n }\r\n\r\n void videoRecorder.current.startRecording();\r\n setIsRecording(true);\r\n }, [scene]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Capture\" icon={CameraRegular} onClick={captureScreenshot} />\r\n <ButtonLine label=\"Capture Equirectangular\" icon={CameraRegular} onClick={captureEquirectangularAsync} />\r\n <ButtonLine label={isRecording ? \"Stop Recording\" : \"Record Video\"} icon={isRecording ? RecordStopRegular : RecordRegular} onClick={recordVideoAsync} />\r\n </>\r\n );\r\n};\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport { CaptureRttTools, CaptureScreenshotTools } from \"../../../components/tools/captureTools\";\r\n\r\nexport const CaptureServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Capture Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // Screenshot capture content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Screenshot Capture\",\r\n section: \"Screenshot Capture\",\r\n component: ({ context }) => <CaptureScreenshotTools scene={context} />,\r\n })\r\n );\r\n\r\n // RTT capture content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"RTT Capture\",\r\n section: \"RTT Capture\",\r\n component: ({ context }) => <CaptureRttTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [CaptureServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,eAAe,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;IAC9E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC3D,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAkB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAEvF,IAAA,MAAM,aAAa,GAAG,WAAW,CAAC,YAAW;AACzC,QAAA,MAAM,SAAS,GAAoB,EAAE,GAAG,cAAc,EAAE;QACxD,IAAI,CAAC,cAAc,EAAE;AACjB,YAAA,SAAS,CAAC,KAAK,GAAG,SAAS;AAC3B,YAAA,SAAS,CAAC,MAAM,GAAG,SAAS;;AAGhC,QAAA,IAAI,KAAK,CAAC,YAAY,EAAE;YACpB,KAAK,CAAC,iCAAiC,CAAC,KAAK,CAAC,S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;AAC7B,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,sBAAsB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACzE,SAAA,CAAC,CACL;;AAGD,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,aAAa;AAClB,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,eAAe,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AAClE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;aACzE;SACJ;KACJ;;AAGL,qBAAe;IACX,kBAAkB,EAAE,CAAC,wBAAwB,CAAC;CACxC;;;;"}
1
+ {"version":3,"file":"captureService-BaLg4gki.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/captureTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/captureService.tsx"],"sourcesContent":["import { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { useState, useRef, useCallback } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { SyncedSliderPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine\";\r\nimport type { IScreenshotSize } from \"core/Misc/interfaces/screenshotSize\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\nimport { VideoRecorder } from \"core/Misc/videoRecorder\";\r\nimport { captureEquirectangularFromScene } from \"core/Misc/equirectangularCapture\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\nimport { CameraRegular, RecordRegular, RecordStopRegular } from \"@fluentui/react-icons\";\r\nimport { FrameGraphUtils } from \"core/FrameGraph/frameGraphUtils\";\r\n\r\nexport const CaptureRttTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [useWidthHeight, setUseWidthHeight] = useState(false);\r\n const [screenshotSize, setScreenshotSize] = useState<IScreenshotSize>({ precision: 1 });\r\n\r\n const captureRender = useCallback(async () => {\r\n const sizeToUse: IScreenshotSize = { ...screenshotSize };\r\n if (!useWidthHeight) {\r\n sizeToUse.width = undefined;\r\n sizeToUse.height = undefined;\r\n }\r\n\r\n if (scene.activeCamera) {\r\n Tools.CreateScreenshotUsingRenderTarget(scene.getEngine(), scene.activeCamera, sizeToUse, undefined, undefined, 4);\r\n }\r\n }, [scene, screenshotSize, useWidthHeight]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Capture\" icon={CameraRegular} onClick={captureRender} />\r\n <SyncedSliderPropertyLine\r\n label=\"Precision\"\r\n value={screenshotSize.precision ?? 1}\r\n onChange={(value) => setScreenshotSize({ ...screenshotSize, precision: value ?? 1 })}\r\n min={0.1}\r\n max={10}\r\n step={0.1}\r\n />\r\n <SwitchPropertyLine label=\"Use Custom Width/Height\" value={useWidthHeight} onChange={(value) => setUseWidthHeight(value)} />\r\n <Collapse visible={useWidthHeight}>\r\n <SyncedSliderPropertyLine\r\n label=\"Width\"\r\n value={screenshotSize.width ?? 512}\r\n onChange={(data) => setScreenshotSize({ ...screenshotSize, width: data ?? 512 })}\r\n min={1}\r\n step={1}\r\n />\r\n <SyncedSliderPropertyLine\r\n label=\"Height\"\r\n value={screenshotSize.height ?? 512}\r\n onChange={(data) => setScreenshotSize({ ...screenshotSize, height: data ?? 512 })}\r\n min={1}\r\n step={1}\r\n />\r\n </Collapse>\r\n </>\r\n );\r\n};\r\n\r\nexport const CaptureScreenshotTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [isRecording, setIsRecording] = useState(false);\r\n const videoRecorder = useRef<VideoRecorder>();\r\n\r\n const captureScreenshot = useCallback(() => {\r\n const camera = scene.frameGraph ? FrameGraphUtils.FindMainCamera(scene.frameGraph) : scene.activeCamera;\r\n if (camera) {\r\n Tools.CreateScreenshot(scene.getEngine(), camera, { precision: 1 });\r\n }\r\n }, [scene]);\r\n\r\n const captureEquirectangularAsync = useCallback(async () => {\r\n const currentActiveCamera = scene.activeCamera;\r\n if (!currentActiveCamera && scene.frameGraph) {\r\n scene.activeCamera = FrameGraphUtils.FindMainCamera(scene.frameGraph);\r\n }\r\n if (scene.activeCamera) {\r\n await captureEquirectangularFromScene(scene, { size: 1024, filename: \"equirectangular_capture.png\" });\r\n }\r\n // eslint-disable-next-line require-atomic-updates\r\n scene.activeCamera = currentActiveCamera;\r\n }, [scene]);\r\n\r\n const recordVideoAsync = useCallback(async () => {\r\n if (videoRecorder.current && videoRecorder.current.isRecording) {\r\n videoRecorder.current.stopRecording();\r\n setIsRecording(false);\r\n return;\r\n }\r\n\r\n if (!videoRecorder.current) {\r\n videoRecorder.current = new VideoRecorder(scene.getEngine());\r\n }\r\n\r\n void videoRecorder.current.startRecording();\r\n setIsRecording(true);\r\n }, [scene]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Capture\" icon={CameraRegular} onClick={captureScreenshot} />\r\n <ButtonLine label=\"Capture Equirectangular\" icon={CameraRegular} onClick={captureEquirectangularAsync} />\r\n <ButtonLine label={isRecording ? \"Stop Recording\" : \"Record Video\"} icon={isRecording ? RecordStopRegular : RecordRegular} onClick={recordVideoAsync} />\r\n </>\r\n );\r\n};\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport { CaptureRttTools, CaptureScreenshotTools } from \"../../../components/tools/captureTools\";\r\n\r\nexport const CaptureServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Capture Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // Screenshot capture content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Screenshot Capture\",\r\n section: \"Screenshot Capture\",\r\n component: ({ context }) => <CaptureScreenshotTools scene={context} />,\r\n })\r\n );\r\n\r\n // RTT capture content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"RTT Capture\",\r\n section: \"RTT Capture\",\r\n component: ({ context }) => <CaptureRttTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [CaptureServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_jsx","_Fragment"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcO,MAAM,eAAe,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;IAC9E,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC;AAC3D,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAkB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;AAEvF,IAAA,MAAM,aAAa,GAAG,WAAW,CAAC,YAAW;AACzC,QAAA,MAAM,SAAS,GAAoB,EAAE,GAAG,cAAc,EAAE;QACxD,IAAI,CAAC,cAAc,EAAE;AACjB,YAAA,SAAS,CAAC,KAAK,GAAG,SAAS;AAC3B,YAAA,SAAS,CAAC,MAAM,GAAG,SAAS;;AAGhC,QAAA,IAAI,KAAK,CAAC,YAAY,EAAE;YACpB,KAAK,CAAC,iCAAiC,CAAC,KAAK,CAAC,SAAS,EAAE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AAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,sBAAsB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACzE,SAAA,CAAC,CACL;;AAGD,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,aAAa;AAClB,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,eAAe,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AAClE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;aACzE;SACJ;KACJ;;AAGL,qBAAe;IACX,kBAAkB,EAAE,CAAC,wBAAwB,CAAC;CACxC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { M as MakeLazyComponent, B as ButtonLine, S as SwitchPropertyLine, N as NumberDropdownPropertyLine, C as Collapse, a as SyncedSliderPropertyLine, T as ToolsServiceIdentity } from './index-BTXdoz_s.js';
2
+ import { MakeLazyComponent, ButtonLine, SwitchPropertyLine, NumberDropdownPropertyLine, Collapse, SyncedSliderPropertyLine, ToolsServiceIdentity } from './index.js';
3
3
  import { SceneSerializer } from '@babylonjs/core/Misc/sceneSerializer.js';
4
4
  import { Tools } from '@babylonjs/core/Misc/tools.js';
5
5
  import { EnvironmentTextureTools } from '@babylonjs/core/Misc/environmentTextureTools.js';
@@ -229,4 +229,4 @@ var exportService = {
229
229
  };
230
230
 
231
231
  export { ExportServiceDefinition, exportService as default };
232
- //# sourceMappingURL=exportService-DRm8glYV.js.map
232
+ //# sourceMappingURL=exportService-DEj9QNTe.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exportService-DRm8glYV.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/exportTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/exportService.tsx"],"sourcesContent":["import { NumberDropdownPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/dropdownPropertyLine\";\r\nimport { SceneSerializer } from \"core/Misc/sceneSerializer\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { EnvironmentTextureTools } from \"core/Misc/environmentTextureTools\";\r\nimport type { CubeTexture } from \"core/Materials/Textures/cubeTexture\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { useCallback, useState } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { SyncedSliderPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine\";\r\nimport type { Node } from \"core/node\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { StandardMaterial } from \"core/Materials/standardMaterial\";\r\nimport type { BackgroundMaterial } from \"core/Materials/Background/backgroundMaterial\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Camera } from \"core/Cameras/camera\";\r\nimport { Light } from \"core/Lights/light\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\n\r\nimport { MakeLazyComponent } from \"shared-ui-components/fluent/primitives/lazyComponent\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\nimport { ArrowDownloadRegular } from \"@fluentui/react-icons\";\r\n\r\nconst EnvExportImageTypes = [\r\n { label: \"PNG\", value: 0, imageType: \"image/png\" },\r\n { label: \"WebP\", value: 1, imageType: \"image/webp\" },\r\n] as const;\r\n\r\ninterface IBabylonExportOptionsState {\r\n imageTypeIndex: number;\r\n imageQuality: number;\r\n iblDiffuse: boolean;\r\n}\r\n\r\nexport const ExportBabylonTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [babylonExportOptions, setBabylonExportOptions] = useState<Readonly<IBabylonExportOptionsState>>({\r\n imageTypeIndex: 0,\r\n imageQuality: 0.8,\r\n iblDiffuse: false,\r\n });\r\n\r\n const exportBabylon = useCallback(async () => {\r\n const strScene = JSON.stringify(SceneSerializer.Serialize(scene));\r\n const blob = new Blob([strScene], { type: \"octet/stream\" });\r\n Tools.Download(blob, \"scene.babylon\");\r\n }, [scene]);\r\n\r\n const createEnvTexture = useCallback(async () => {\r\n if (!scene.environmentTexture) {\r\n return;\r\n }\r\n\r\n try {\r\n const buffer = await EnvironmentTextureTools.CreateEnvTextureAsync(scene.environmentTexture as CubeTexture, {\r\n imageType: EnvExportImageTypes[babylonExportOptions.imageTypeIndex].imageType,\r\n imageQuality: babylonExportOptions.imageQuality,\r\n disableIrradianceTexture: !babylonExportOptions.iblDiffuse,\r\n });\r\n const blob = new Blob([buffer], { type: \"octet/stream\" });\r\n Tools.Download(blob, \"environment.env\");\r\n } catch (error: any) {\r\n Logger.Error(error);\r\n alert(error);\r\n }\r\n }, [scene, babylonExportOptions]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Export to Babylon\" icon={ArrowDownloadRegular} onClick={exportBabylon} />\r\n {!scene.getEngine().premultipliedAlpha && scene.environmentTexture && scene.environmentTexture._prefiltered && scene.activeCamera && (\r\n <>\r\n <ButtonLine label=\"Generate .env texture\" icon={ArrowDownloadRegular} onClick={createEnvTexture} />\r\n {scene.environmentTexture.irradianceTexture && (\r\n <SwitchPropertyLine\r\n key=\"iblDiffuse\"\r\n label=\"Diffuse Texture\"\r\n description=\"Export diffuse texture for IBL\"\r\n value={babylonExportOptions.iblDiffuse}\r\n onChange={(value: boolean) => {\r\n setBabylonExportOptions((prev) => ({ ...prev, iblDiffuse: value }));\r\n }}\r\n />\r\n )}\r\n <NumberDropdownPropertyLine\r\n label=\"Image type\"\r\n options={EnvExportImageTypes}\r\n value={babylonExportOptions.imageTypeIndex}\r\n onChange={(val) => {\r\n setBabylonExportOptions((prev) => ({ ...prev, imageTypeIndex: val as number }));\r\n }}\r\n />\r\n <Collapse visible={babylonExportOptions.imageTypeIndex > 0}>\r\n <SyncedSliderPropertyLine\r\n label=\"Quality\"\r\n value={babylonExportOptions.imageQuality}\r\n onChange={(value) => setBabylonExportOptions((prev) => ({ ...prev, imageQuality: value }))}\r\n min={0}\r\n max={1}\r\n />\r\n </Collapse>\r\n </>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\ninterface IGltfExportOptionsState {\r\n exportDisabledNodes: boolean;\r\n exportSkyboxes: boolean;\r\n exportCameras: boolean;\r\n exportLights: boolean;\r\n}\r\n\r\nexport const ExportGltfTools = MakeLazyComponent(async () => {\r\n // Defer importing anything from the serializers package until this component is actually mounted.\r\n const { GLTF2Export } = await import(\"serializers/glTF/2.0/glTFSerializer\");\r\n\r\n return (props: { scene: Scene }) => {\r\n const [isExportingGltf, setIsExportingGltf] = useState(false);\r\n const [gltfExportOptions, setGltfExportOptions] = useState<Readonly<IGltfExportOptionsState>>({\r\n exportDisabledNodes: false,\r\n exportSkyboxes: false,\r\n exportCameras: false,\r\n exportLights: false,\r\n });\r\n\r\n const exportGLTF = useCallback(async () => {\r\n setIsExportingGltf(true);\r\n\r\n const shouldExport = (node: Node): boolean => {\r\n if (!gltfExportOptions.exportDisabledNodes) {\r\n if (!node.isEnabled()) {\r\n return false;\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportSkyboxes) {\r\n if (node instanceof Mesh) {\r\n if (node.material) {\r\n const material = node.material as PBRMaterial | StandardMaterial | BackgroundMaterial;\r\n const reflectionTexture = material.reflectionTexture;\r\n if (reflectionTexture && reflectionTexture.coordinatesMode === Texture.SKYBOX_MODE) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportCameras) {\r\n if (node instanceof Camera) {\r\n return false;\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportLights) {\r\n if (node instanceof Light) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n try {\r\n const glb = await GLTF2Export.GLBAsync(props.scene, \"scene\", { shouldExportNode: (node) => shouldExport(node) });\r\n glb.downloadFiles();\r\n } catch (reason) {\r\n Logger.Error(`Failed to export GLB: ${reason}`);\r\n } finally {\r\n setIsExportingGltf(false);\r\n }\r\n }, [gltfExportOptions, props.scene]);\r\n\r\n return (\r\n <>\r\n <SwitchPropertyLine\r\n key=\"GLTFExportDisabledNodes\"\r\n label=\"Export Disabled Nodes\"\r\n description=\"Whether to export nodes that are disabled in the scene.\"\r\n value={gltfExportOptions.exportDisabledNodes}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportDisabledNodes: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportSkyboxes\"\r\n label=\"Export Skyboxes\"\r\n description=\"Whether to export skybox nodes in the scene.\"\r\n value={gltfExportOptions.exportSkyboxes}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportSkyboxes: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportCameras\"\r\n label=\"Export Cameras\"\r\n description=\"Whether to export cameras in the scene.\"\r\n value={gltfExportOptions.exportCameras}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportCameras: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportLights\"\r\n label=\"Export Lights\"\r\n description=\"Whether to export lights in the scene.\"\r\n value={gltfExportOptions.exportLights}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportLights: checked })}\r\n />\r\n <ButtonLine label=\"Export to GLB\" icon={ArrowDownloadRegular} onClick={exportGLTF} disabled={isExportingGltf} />\r\n </>\r\n );\r\n };\r\n});\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport { ExportBabylonTools, ExportGltfTools } from \"../../../components/tools/exportTools\";\r\n\r\nexport const ExportServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Export Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // glTF export content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"glTF Export\",\r\n section: \"glTF Export\",\r\n component: ({ context }) => <ExportGltfTools scene={context} />,\r\n })\r\n );\r\n\r\n // Babylon export content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Babylon Export\",\r\n section: \"Babylon Export\",\r\n component: ({ context }) => <ExportBabylonTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [ExportServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAM,mBAAmB,GAAG;IACxB,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,WAAW,EAAE;IAClD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE;CAC9C;AAQH,MAAM,kBAAkB,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;AACjF,IAAA,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAuC;AACnG,QAAA,cAAc,EAAE,CAAC;AACjB,QAAA,YAAY,EAAE,GA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CAAA;AAClE,SAAA,CAAC,CACL;;AAGD,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,gBAAgB;AACrB,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,kBAAkB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACrE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;aACzE;SACJ;KACJ;;AAGL,oBAAe;IACX,kBAAkB,EAAE,CAAC,uBAAuB,CAAC;CACvC;;;;"}
1
+ {"version":3,"file":"exportService-DEj9QNTe.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/exportTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/exportService.tsx"],"sourcesContent":["import { NumberDropdownPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/dropdownPropertyLine\";\r\nimport { SceneSerializer } from \"core/Misc/sceneSerializer\";\r\nimport { Tools } from \"core/Misc/tools\";\r\nimport { EnvironmentTextureTools } from \"core/Misc/environmentTextureTools\";\r\nimport type { CubeTexture } from \"core/Materials/Textures/cubeTexture\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { useCallback, useState } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport type { Scene } from \"core/scene\";\r\nimport { ButtonLine } from \"shared-ui-components/fluent/hoc/buttonLine\";\r\nimport { SyncedSliderPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/syncedSliderPropertyLine\";\r\nimport type { Node } from \"core/node\";\r\nimport { Mesh } from \"core/Meshes/mesh\";\r\nimport type { PBRMaterial } from \"core/Materials/PBR/pbrMaterial\";\r\nimport type { StandardMaterial } from \"core/Materials/standardMaterial\";\r\nimport type { BackgroundMaterial } from \"core/Materials/Background/backgroundMaterial\";\r\nimport { Texture } from \"core/Materials/Textures/texture\";\r\nimport { Camera } from \"core/Cameras/camera\";\r\nimport { Light } from \"core/Lights/light\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\n\r\nimport { MakeLazyComponent } from \"shared-ui-components/fluent/primitives/lazyComponent\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\nimport { ArrowDownloadRegular } from \"@fluentui/react-icons\";\r\n\r\nconst EnvExportImageTypes = [\r\n { label: \"PNG\", value: 0, imageType: \"image/png\" },\r\n { label: \"WebP\", value: 1, imageType: \"image/webp\" },\r\n] as const;\r\n\r\ninterface IBabylonExportOptionsState {\r\n imageTypeIndex: number;\r\n imageQuality: number;\r\n iblDiffuse: boolean;\r\n}\r\n\r\nexport const ExportBabylonTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [babylonExportOptions, setBabylonExportOptions] = useState<Readonly<IBabylonExportOptionsState>>({\r\n imageTypeIndex: 0,\r\n imageQuality: 0.8,\r\n iblDiffuse: false,\r\n });\r\n\r\n const exportBabylon = useCallback(async () => {\r\n const strScene = JSON.stringify(SceneSerializer.Serialize(scene));\r\n const blob = new Blob([strScene], { type: \"octet/stream\" });\r\n Tools.Download(blob, \"scene.babylon\");\r\n }, [scene]);\r\n\r\n const createEnvTexture = useCallback(async () => {\r\n if (!scene.environmentTexture) {\r\n return;\r\n }\r\n\r\n try {\r\n const buffer = await EnvironmentTextureTools.CreateEnvTextureAsync(scene.environmentTexture as CubeTexture, {\r\n imageType: EnvExportImageTypes[babylonExportOptions.imageTypeIndex].imageType,\r\n imageQuality: babylonExportOptions.imageQuality,\r\n disableIrradianceTexture: !babylonExportOptions.iblDiffuse,\r\n });\r\n const blob = new Blob([buffer], { type: \"octet/stream\" });\r\n Tools.Download(blob, \"environment.env\");\r\n } catch (error: any) {\r\n Logger.Error(error);\r\n alert(error);\r\n }\r\n }, [scene, babylonExportOptions]);\r\n\r\n return (\r\n <>\r\n <ButtonLine label=\"Export to Babylon\" icon={ArrowDownloadRegular} onClick={exportBabylon} />\r\n {!scene.getEngine().premultipliedAlpha && scene.environmentTexture && scene.environmentTexture._prefiltered && scene.activeCamera && (\r\n <>\r\n <ButtonLine label=\"Generate .env texture\" icon={ArrowDownloadRegular} onClick={createEnvTexture} />\r\n {scene.environmentTexture.irradianceTexture && (\r\n <SwitchPropertyLine\r\n key=\"iblDiffuse\"\r\n label=\"Diffuse Texture\"\r\n description=\"Export diffuse texture for IBL\"\r\n value={babylonExportOptions.iblDiffuse}\r\n onChange={(value: boolean) => {\r\n setBabylonExportOptions((prev) => ({ ...prev, iblDiffuse: value }));\r\n }}\r\n />\r\n )}\r\n <NumberDropdownPropertyLine\r\n label=\"Image type\"\r\n options={EnvExportImageTypes}\r\n value={babylonExportOptions.imageTypeIndex}\r\n onChange={(val) => {\r\n setBabylonExportOptions((prev) => ({ ...prev, imageTypeIndex: val as number }));\r\n }}\r\n />\r\n <Collapse visible={babylonExportOptions.imageTypeIndex > 0}>\r\n <SyncedSliderPropertyLine\r\n label=\"Quality\"\r\n value={babylonExportOptions.imageQuality}\r\n onChange={(value) => setBabylonExportOptions((prev) => ({ ...prev, imageQuality: value }))}\r\n min={0}\r\n max={1}\r\n />\r\n </Collapse>\r\n </>\r\n )}\r\n </>\r\n );\r\n};\r\n\r\ninterface IGltfExportOptionsState {\r\n exportDisabledNodes: boolean;\r\n exportSkyboxes: boolean;\r\n exportCameras: boolean;\r\n exportLights: boolean;\r\n}\r\n\r\nexport const ExportGltfTools = MakeLazyComponent(async () => {\r\n // Defer importing anything from the serializers package until this component is actually mounted.\r\n const { GLTF2Export } = await import(\"serializers/glTF/2.0/glTFSerializer\");\r\n\r\n return (props: { scene: Scene }) => {\r\n const [isExportingGltf, setIsExportingGltf] = useState(false);\r\n const [gltfExportOptions, setGltfExportOptions] = useState<Readonly<IGltfExportOptionsState>>({\r\n exportDisabledNodes: false,\r\n exportSkyboxes: false,\r\n exportCameras: false,\r\n exportLights: false,\r\n });\r\n\r\n const exportGLTF = useCallback(async () => {\r\n setIsExportingGltf(true);\r\n\r\n const shouldExport = (node: Node): boolean => {\r\n if (!gltfExportOptions.exportDisabledNodes) {\r\n if (!node.isEnabled()) {\r\n return false;\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportSkyboxes) {\r\n if (node instanceof Mesh) {\r\n if (node.material) {\r\n const material = node.material as PBRMaterial | StandardMaterial | BackgroundMaterial;\r\n const reflectionTexture = material.reflectionTexture;\r\n if (reflectionTexture && reflectionTexture.coordinatesMode === Texture.SKYBOX_MODE) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportCameras) {\r\n if (node instanceof Camera) {\r\n return false;\r\n }\r\n }\r\n\r\n if (!gltfExportOptions.exportLights) {\r\n if (node instanceof Light) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n try {\r\n const glb = await GLTF2Export.GLBAsync(props.scene, \"scene\", { shouldExportNode: (node) => shouldExport(node) });\r\n glb.downloadFiles();\r\n } catch (reason) {\r\n Logger.Error(`Failed to export GLB: ${reason}`);\r\n } finally {\r\n setIsExportingGltf(false);\r\n }\r\n }, [gltfExportOptions, props.scene]);\r\n\r\n return (\r\n <>\r\n <SwitchPropertyLine\r\n key=\"GLTFExportDisabledNodes\"\r\n label=\"Export Disabled Nodes\"\r\n description=\"Whether to export nodes that are disabled in the scene.\"\r\n value={gltfExportOptions.exportDisabledNodes}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportDisabledNodes: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportSkyboxes\"\r\n label=\"Export Skyboxes\"\r\n description=\"Whether to export skybox nodes in the scene.\"\r\n value={gltfExportOptions.exportSkyboxes}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportSkyboxes: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportCameras\"\r\n label=\"Export Cameras\"\r\n description=\"Whether to export cameras in the scene.\"\r\n value={gltfExportOptions.exportCameras}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportCameras: checked })}\r\n />\r\n <SwitchPropertyLine\r\n key=\"GLTFExportLights\"\r\n label=\"Export Lights\"\r\n description=\"Whether to export lights in the scene.\"\r\n value={gltfExportOptions.exportLights}\r\n onChange={(checked: boolean) => setGltfExportOptions({ ...gltfExportOptions, exportLights: checked })}\r\n />\r\n <ButtonLine label=\"Export to GLB\" icon={ArrowDownloadRegular} onClick={exportGLTF} disabled={isExportingGltf} />\r\n </>\r\n );\r\n };\r\n});\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport type { IDisposable } from \"core/scene\";\r\nimport { ExportBabylonTools, ExportGltfTools } from \"../../../components/tools/exportTools\";\r\n\r\nexport const ExportServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Export Tools\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistrations: IDisposable[] = [];\r\n\r\n // glTF export content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"glTF Export\",\r\n section: \"glTF Export\",\r\n component: ({ context }) => <ExportGltfTools scene={context} />,\r\n })\r\n );\r\n\r\n // Babylon export content\r\n contentRegistrations.push(\r\n toolsService.addSectionContent({\r\n key: \"Babylon Export\",\r\n section: \"Babylon Export\",\r\n component: ({ context }) => <ExportBabylonTools scene={context} />,\r\n })\r\n );\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistrations.forEach((registration) => registration.dispose());\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [ExportServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_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AE,oBAAoB,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,eAAe,EAAI,CAAA,CAAA,EAAA,CACjH;AAEX,KAAC;AACL,CAAC,CAAC;;AC3MW,MAAA,uBAAuB,GAA2C;AAC3E,IAAA,YAAY,EAAE,cAAc;IAC5B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;AAChC,IAAA,OAAO,EAAE,CAAC,YAAY,KAAI;QACtB,MAAM,oBAAoB,GAAkB,EAAE;;AAG9C,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,aAAa;AAClB,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,eAAe,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AAClE,SAAA,CAAC,CACL;;AAGD,QAAA,oBAAoB,CAAC,IAAI,CACrB,YAAY,CAAC,iBAAiB,CAAC;AAC3B,YAAA,GAAG,EAAE,gBAAgB;AACrB,YAAA,OAAO,EAAE,gBAAgB;AACzB,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,kBAAkB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACrE,SAAA,CAAC,CACL;QAED,OAAO;YACH,OAAO,EAAE,MAAK;AACV,gBAAA,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,KAAK,YAAY,CAAC,OAAO,EAAE,CAAC;aACzE;SACJ;KACJ;;AAGL,oBAAe;IACX,kBAAkB,EAAE,CAAC,uBAAuB,CAAC;CACvC;;;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
2
- import { F as FileUploadLine, S as SwitchPropertyLine, C as Collapse, N as NumberDropdownPropertyLine, T as ToolsServiceIdentity } from './index-BTXdoz_s.js';
2
+ import { FileUploadLine, SwitchPropertyLine, Collapse, NumberDropdownPropertyLine, ToolsServiceIdentity } from './index.js';
3
3
  import { useState } from 'react';
4
4
  import { ImportAnimationsAsync } from '@babylonjs/core/Loading/sceneLoader.js';
5
5
  import { FilesInput } from '@babylonjs/core/Misc/filesInput.js';
@@ -165,4 +165,4 @@ var importService = {
165
165
  };
166
166
 
167
167
  export { SceneImportServiceDefinition, importService as default };
168
- //# sourceMappingURL=importService-CUFQ5Mb2.js.map
168
+ //# sourceMappingURL=importService-BoR1TPvc.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"importService-CUFQ5Mb2.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/importTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/importService.tsx"],"sourcesContent":["import { useState } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport type { Scene } from \"core/scene\";\r\nimport type { DropdownOption } from \"shared-ui-components/fluent/primitives/dropdown\";\r\nimport { ImportAnimationsAsync, SceneLoaderAnimationGroupLoadingMode } from \"core/Loading/sceneLoader\";\r\nimport { FilesInput } from \"core/Misc/filesInput\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\nimport { NumberDropdownPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/dropdownPropertyLine\";\r\nimport { FileUploadLine } from \"shared-ui-components/fluent/hoc/fileUploadLine\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\n\r\nconst AnimationGroupLoadingModes = [\r\n { label: \"Clean\", value: SceneLoaderAnimationGroupLoadingMode.Clean },\r\n { label: \"Stop\", value: SceneLoaderAnimationGroupLoadingMode.Stop },\r\n { label: \"Sync\", value: SceneLoaderAnimationGroupLoadingMode.Sync },\r\n { label: \"NoSync\", value: SceneLoaderAnimationGroupLoadingMode.NoSync },\r\n] as const satisfies DropdownOption<number>[];\r\n\r\nexport const ImportAnimationsTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [importDefaults, setImportDefaults] = useState({\r\n overwriteAnimations: true,\r\n animationGroupLoadingMode: SceneLoaderAnimationGroupLoadingMode.Clean,\r\n });\r\n\r\n const importAnimations = (event: FileList) => {\r\n const reloadAsync = async function (sceneFile: File) {\r\n if (sceneFile) {\r\n try {\r\n await ImportAnimationsAsync(sceneFile, scene, {\r\n overwriteAnimations: importDefaults.overwriteAnimations,\r\n animationGroupLoadingMode: importDefaults.animationGroupLoadingMode,\r\n });\r\n\r\n if (scene.animationGroups.length > 0) {\r\n const currentGroup = scene.animationGroups[0];\r\n currentGroup.play(true);\r\n }\r\n } catch (error) {\r\n Logger.Error(`Error importing animations: ${error}`);\r\n }\r\n }\r\n };\r\n\r\n const filesInputAnimation = new FilesInput(scene.getEngine(), scene, null, null, null, null, null, reloadAsync, null);\r\n filesInputAnimation.loadFiles(event);\r\n filesInputAnimation.dispose();\r\n };\r\n\r\n return (\r\n <>\r\n <FileUploadLine label=\"Import Animations\" accept=\"gltf\" onClick={(evt: FileList) => importAnimations(evt)} />\r\n <SwitchPropertyLine\r\n label=\"Overwrite Animations\"\r\n value={importDefaults.overwriteAnimations}\r\n onChange={(value) => {\r\n setImportDefaults({ ...importDefaults, overwriteAnimations: value });\r\n }}\r\n />\r\n <Collapse visible={!importDefaults.overwriteAnimations}>\r\n <NumberDropdownPropertyLine\r\n label=\"Animation Merge Mode\"\r\n options={AnimationGroupLoadingModes}\r\n value={importDefaults.animationGroupLoadingMode}\r\n onChange={(value) => {\r\n setImportDefaults({ ...importDefaults, animationGroupLoadingMode: value });\r\n }}\r\n />\r\n </Collapse>\r\n </>\r\n );\r\n};\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport { ImportAnimationsTools } from \"../../../components/tools/importTools\";\r\n\r\nexport const SceneImportServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Import Tool\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistration = toolsService.addSectionContent({\r\n key: \"AnimationImport\",\r\n section: \"Animation Import\",\r\n component: ({ context }) => <ImportAnimationsTools scene={context} />,\r\n });\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistration.dispose();\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [SceneImportServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,0BAA0B,GAAG;AAC/B,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,sDAA8C;AACrE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,qDAA6C;AACnE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,qDAA6C;AACnE,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,uDAA+C;CAC9B;AAEtC,MAAM,qBAAqB,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;AACpF,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,yBAAyB,EAA4C,CAAA;AACxE,KAAA,CAAC;AAEF,IAAA,MAAM,gBAAgB,GAAG,CAAC,KAAe,KAAI;AACzC,QAAA,MAAM,WAAW,GAAG,gBAAgB,SAAe,EAAA;YAC/C,IAAI,SAAS,EAAE;AACX,gBAAA,IAAI;AACA,oBAAA,MAAM,qBAAqB,CAAC,SAAS,EAAE,KAAK,EAAE;wBAC1C,mBAAmB,EAAE,cAAc,CAAC,mBAAmB;wBACvD,yBAAyB,EAAE,cAAc,CAAC,yBAAyB;AACtE,qBAAA,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,EAAE,yBAAyB,EAAE,KAAK,EAAE,CAAC;AAC9E,qBAAC,EACH,CAAA,EAAA,CACK,CACZ,EAAA,CAAA;AAEX,CAAC;;AClEY,MAAA,4BAA4B,GAA2C;AAChF,IAAA,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;AAChC,IAAA,OAAO,EAAE,CAAC,YAAY,KAAI;AACtB,QAAA,MAAM,mBAAmB,GAAG,YAAY,CAAC,iBAAiB,CAAC;AACvD,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,OAAO,EAAE,kBAAkB;AAC3B,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,qBAAqB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACxE,SAAA,CAAC;QAEF,OAAO;YACH,OAAO,EAAE,MAAK;gBACV,mBAAmB,CAAC,OAAO,EAAE;aAChC;SACJ;KACJ;;AAGL,oBAAe;IACX,kBAAkB,EAAE,CAAC,4BAA4B,CAAC;CAC5C;;;;"}
1
+ {"version":3,"file":"importService-BoR1TPvc.js","sources":["../../../../../../../../dev/inspector-v2/src/components/tools/importTools.tsx","../../../../../../../../dev/inspector-v2/src/services/panes/tools/importService.tsx"],"sourcesContent":["import { useState } from \"react\";\r\nimport type { FunctionComponent } from \"react\";\r\nimport type { Scene } from \"core/scene\";\r\nimport type { DropdownOption } from \"shared-ui-components/fluent/primitives/dropdown\";\r\nimport { ImportAnimationsAsync, SceneLoaderAnimationGroupLoadingMode } from \"core/Loading/sceneLoader\";\r\nimport { FilesInput } from \"core/Misc/filesInput\";\r\nimport { Logger } from \"core/Misc/logger\";\r\nimport { SwitchPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/switchPropertyLine\";\r\nimport { NumberDropdownPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/dropdownPropertyLine\";\r\nimport { FileUploadLine } from \"shared-ui-components/fluent/hoc/fileUploadLine\";\r\nimport { Collapse } from \"shared-ui-components/fluent/primitives/collapse\";\r\n\r\nconst AnimationGroupLoadingModes = [\r\n { label: \"Clean\", value: SceneLoaderAnimationGroupLoadingMode.Clean },\r\n { label: \"Stop\", value: SceneLoaderAnimationGroupLoadingMode.Stop },\r\n { label: \"Sync\", value: SceneLoaderAnimationGroupLoadingMode.Sync },\r\n { label: \"NoSync\", value: SceneLoaderAnimationGroupLoadingMode.NoSync },\r\n] as const satisfies DropdownOption<number>[];\r\n\r\nexport const ImportAnimationsTools: FunctionComponent<{ scene: Scene }> = ({ scene }) => {\r\n const [importDefaults, setImportDefaults] = useState({\r\n overwriteAnimations: true,\r\n animationGroupLoadingMode: SceneLoaderAnimationGroupLoadingMode.Clean,\r\n });\r\n\r\n const importAnimations = (event: FileList) => {\r\n const reloadAsync = async function (sceneFile: File) {\r\n if (sceneFile) {\r\n try {\r\n await ImportAnimationsAsync(sceneFile, scene, {\r\n overwriteAnimations: importDefaults.overwriteAnimations,\r\n animationGroupLoadingMode: importDefaults.animationGroupLoadingMode,\r\n });\r\n\r\n if (scene.animationGroups.length > 0) {\r\n const currentGroup = scene.animationGroups[0];\r\n currentGroup.play(true);\r\n }\r\n } catch (error) {\r\n Logger.Error(`Error importing animations: ${error}`);\r\n }\r\n }\r\n };\r\n\r\n const filesInputAnimation = new FilesInput(scene.getEngine(), scene, null, null, null, null, null, reloadAsync, null);\r\n filesInputAnimation.loadFiles(event);\r\n filesInputAnimation.dispose();\r\n };\r\n\r\n return (\r\n <>\r\n <FileUploadLine label=\"Import Animations\" accept=\"gltf\" onClick={(evt: FileList) => importAnimations(evt)} />\r\n <SwitchPropertyLine\r\n label=\"Overwrite Animations\"\r\n value={importDefaults.overwriteAnimations}\r\n onChange={(value) => {\r\n setImportDefaults({ ...importDefaults, overwriteAnimations: value });\r\n }}\r\n />\r\n <Collapse visible={!importDefaults.overwriteAnimations}>\r\n <NumberDropdownPropertyLine\r\n label=\"Animation Merge Mode\"\r\n options={AnimationGroupLoadingModes}\r\n value={importDefaults.animationGroupLoadingMode}\r\n onChange={(value) => {\r\n setImportDefaults({ ...importDefaults, animationGroupLoadingMode: value });\r\n }}\r\n />\r\n </Collapse>\r\n </>\r\n );\r\n};\r\n","import type { ServiceDefinition } from \"../../../modularity/serviceDefinition\";\r\nimport { ToolsServiceIdentity } from \"../toolsService\";\r\nimport type { IToolsService } from \"../toolsService\";\r\nimport { ImportAnimationsTools } from \"../../../components/tools/importTools\";\r\n\r\nexport const SceneImportServiceDefinition: ServiceDefinition<[], [IToolsService]> = {\r\n friendlyName: \"Import Tool\",\r\n consumes: [ToolsServiceIdentity],\r\n factory: (toolsService) => {\r\n const contentRegistration = toolsService.addSectionContent({\r\n key: \"AnimationImport\",\r\n section: \"Animation Import\",\r\n component: ({ context }) => <ImportAnimationsTools scene={context} />,\r\n });\r\n\r\n return {\r\n dispose: () => {\r\n contentRegistration.dispose();\r\n },\r\n };\r\n },\r\n};\r\n\r\nexport default {\r\n serviceDefinitions: [SceneImportServiceDefinition],\r\n} as const;\r\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,0BAA0B,GAAG;AAC/B,IAAA,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,sDAA8C;AACrE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,qDAA6C;AACnE,IAAA,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,qDAA6C;AACnE,IAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,uDAA+C;CAC9B;AAEtC,MAAM,qBAAqB,GAAwC,CAAC,EAAE,KAAK,EAAE,KAAI;AACpF,IAAA,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,yBA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mBAAmB,EAAE,KAAK,EAAE,CAAC;AACxE,iBAAC,EACH,CAAA,EACFA,GAAC,CAAA,QAAQ,IAAC,OAAO,EAAE,CAAC,cAAc,CAAC,mBAAmB,EAAA,QAAA,EAClDA,GAAC,CAAA,0BAA0B,IACvB,KAAK,EAAC,sBAAsB,EAC5B,OAAO,EAAE,0BAA0B,EACnC,KAAK,EAAE,cAAc,CAAC,yBAAyB,EAC/C,QAAQ,EAAE,CAAC,KAAK,KAAI;wBAChB,iBAAiB,CAAC,EAAE,GAAG,cAAc,EAAE,yBAAyB,EAAE,KAAK,EAAE,CAAC;AAC9E,qBAAC,EACH,CAAA,EAAA,CACK,CACZ,EAAA,CAAA;AAEX,CAAC;;AClEY,MAAA,4BAA4B,GAA2C;AAChF,IAAA,YAAY,EAAE,aAAa;IAC3B,QAAQ,EAAE,CAAC,oBAAoB,CAAC;AAChC,IAAA,OAAO,EAAE,CAAC,YAAY,KAAI;AACtB,QAAA,MAAM,mBAAmB,GAAG,YAAY,CAAC,iBAAiB,CAAC;AACvD,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,OAAO,EAAE,kBAAkB;AAC3B,YAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAKA,GAAA,CAAC,qBAAqB,EAAA,EAAC,KAAK,EAAE,OAAO,EAAI,CAAA;AACxE,SAAA,CAAC;QAEF,OAAO;YACH,OAAO,EAAE,MAAK;gBACV,mBAAmB,CAAC,OAAO,EAAE;aAChC;SACJ;KACJ;;AAGL,oBAAe;IACX,kBAAkB,EAAE,CAAC,4BAA4B,CAAC;CAC5C;;;;"}
package/lib/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
- import { ComponentType, ComponentProps, FunctionComponent, PropsWithChildren, ElementRef, ReactNode, ReactElement } from 'react';
3
+ import { ComponentType, ComponentProps, FunctionComponent, PropsWithChildren, HTMLProps, ElementRef, ReactNode, ReactElement } from 'react';
4
4
  import { IDisposable as IDisposable$1, Nullable as Nullable$1, IReadonlyObservable as IReadonlyObservable$1, Scene as Scene$1 } from '@babylonjs/core/index.js';
5
5
  import { Nullable as Nullable$2 } from '@babylonjs/core/types.js';
6
6
  import { PositioningImperativeRef, OnOpenChangeData, SpinnerProps } from '@fluentui/react-components';
@@ -148,6 +148,16 @@ type NonExpandableProperty = {
148
148
  expandedContent?: undefined;
149
149
  };
150
150
  type PropertyLineProps<ValueT> = BasePropertyLineProps & (NullableProperty<ValueT> | NonNullableProperty | IgnoreNullable<ValueT>) & (ExpandableProperty | NonExpandableProperty);
151
+ /**
152
+ * A reusable component that renders a property line with a label and child content, and an optional description, copy button, and expandable section.
153
+ *
154
+ * @param props - The properties for the PropertyLine component.
155
+ * @returns A React element representing the property line.
156
+ *
157
+ */
158
+ declare const PropertyLine: react.ForwardRefExoticComponent<PropsWithChildren<PropertyLineProps<any>> & react.RefAttributes<HTMLDivElement>>;
159
+ declare const LineContainer: react.ForwardRefExoticComponent<Omit<PropsWithChildren<HTMLProps<HTMLDivElement>>, "ref"> & react.RefAttributes<HTMLDivElement>>;
160
+ declare const PlaceholderPropertyLine: FunctionComponent<PrimitiveProps<any> & PropertyLineProps<any>>;
151
161
 
152
162
  /**
153
163
  * A helper to create a service factory function from a class constructor.
@@ -46052,10 +46062,9 @@ declare class FrameGraphTextureManager {
46052
46062
  * Gets or sets a boolean indicating if debug logs should be shown when applying texture allocation optimization (default: false)
46053
46063
  */
46054
46064
  showDebugLogsForTextureAllcationOptimization: boolean;
46055
- /** If provided (greater than 0), forces the output screen width for percentage-based textures. If not provided (0), engine.getRenderWidth() will be used */
46056
- forcedOutputScreenWidth: number;
46057
- /** If provided (greater than 0), forces the output screen height for percentage-based textures. If not provided (0), engine.getRenderHeight() will be used */
46058
- forcedOutputScreenHeight: number;
46065
+ private _backBufferTextureEntry;
46066
+ private _backBufferDepthStencilTextureEntry;
46067
+ private _backBufferTextureOverriden;
46059
46068
  /**
46060
46069
  * Constructs a new instance of the texture manager
46061
46070
  * @param engine The engine to use
@@ -46069,6 +46078,8 @@ declare class FrameGraphTextureManager {
46069
46078
  * @returns True if the handle is a backbuffer handle
46070
46079
  */
46071
46080
  isBackbuffer(handle: FrameGraphTextureHandle): boolean;
46081
+ /** @internal */
46082
+ _isBackbuffer(handle: FrameGraphTextureHandle): boolean;
46072
46083
  /**
46073
46084
  * Checks if a handle is a backbuffer color handle
46074
46085
  * @param handle The handle to check
@@ -46110,11 +46121,12 @@ declare class FrameGraphTextureManager {
46110
46121
  getTextureHandleOrCreateTexture(handle?: FrameGraphTextureHandle, newTextureName?: string, creationOptions?: FrameGraphTextureCreationOptions): FrameGraphTextureHandle;
46111
46122
  /**
46112
46123
  * Gets a texture from a handle.
46113
- * Note that if the texture is a history texture, the read texture for the current frame will be returned.
46124
+ * Note that if the texture is a history texture, the read texture for the current frame will be returned, except if historyGetWriteTexture is true.
46114
46125
  * @param handle The handle of the texture
46126
+ * @param historyGetWriteTexture If true and the texture is a history texture, the write texture for the current frame will be returned (default: false)
46115
46127
  * @returns The texture or null if not found
46116
46128
  */
46117
- getTextureFromHandle(handle: FrameGraphTextureHandle): Nullable<InternalTexture>;
46129
+ getTextureFromHandle(handle: FrameGraphTextureHandle, historyGetWriteTexture?: boolean): Nullable<InternalTexture>;
46118
46130
  /**
46119
46131
  * Imports a texture into the texture manager
46120
46132
  * @param name Name of the texture
@@ -46176,6 +46188,30 @@ declare class FrameGraphTextureManager {
46176
46188
  * @returns The total size of all textures
46177
46189
  */
46178
46190
  computeTotalTextureSize(optimizedSize: boolean, outputWidth: number, outputHeight: number): number;
46191
+ /**
46192
+ * True if the back buffer texture has been overriden by a call to setBackBufferTexture
46193
+ */
46194
+ get backBufferTextureOverriden(): boolean;
46195
+ /**
46196
+ * Overrides the default back buffer color/depth-stencil textures used by the frame graph.
46197
+ * Note that if both textureCreationOptions and depthStencilTextureCreationOptions are provided,
46198
+ * the engine will use them to create the back buffer color and depth/stencil textures respectively.
46199
+ * In that case, width and height are ignored.
46200
+ * @param width The width of the back buffer color/depth-stencil texture (if 0, the engine's current back buffer color/depth-stencil texture width will be used)
46201
+ * @param height The height of the back buffer color/depth-stencil texture (if 0, the engine's current back buffer color/depth-stencil texture height will be used)
46202
+ * @param textureCreationOptions The color texture creation options (optional)
46203
+ * @param depthStencilTextureCreationOptions The depth/stencil texture creation options (optional)
46204
+ */
46205
+ setBackBufferTextures(width: number, height: number, textureCreationOptions?: FrameGraphTextureCreationOptions, depthStencilTextureCreationOptions?: FrameGraphTextureCreationOptions): void;
46206
+ /**
46207
+ * Resets the back buffer color/depth-stencil textures to the default (the engine's current back buffer textures)
46208
+ * It has no effect if setBackBufferTextures has not been called before.
46209
+ */
46210
+ resetBackBufferTextures(): void;
46211
+ /**
46212
+ * Returns true if the texture manager has at least one history texture
46213
+ */
46214
+ get hasHistoryTextures(): boolean;
46179
46215
  /** @internal */
46180
46216
  _dispose(): void;
46181
46217
  /** @internal */
@@ -46255,6 +46291,10 @@ declare class FrameGraph implements IDisposable {
46255
46291
  * Gets the list of tasks in the frame graph
46256
46292
  */
46257
46293
  get tasks(): FrameGraphTask[];
46294
+ /**
46295
+ * Indicates whether the execution of the frame graph is paused (default is false)
46296
+ */
46297
+ pausedExecution: boolean;
46258
46298
  /**
46259
46299
  * Gets the node render graph linked to the frame graph (if any)
46260
46300
  * @returns the linked node render graph or null if none
@@ -46454,8 +46494,9 @@ declare class NodeRenderGraph {
46454
46494
  attachedBlocks: NodeRenderGraphBlock[];
46455
46495
  /**
46456
46496
  * Observable raised when the node render graph is built
46497
+ * Note that this is the same observable as the one in the underlying FrameGraph!
46457
46498
  */
46458
- onBuildObservable: Observable<NodeRenderGraph>;
46499
+ get onBuildObservable(): Observable<FrameGraph>;
46459
46500
  /**
46460
46501
  * Observable raised when an error is detected
46461
46502
  */
@@ -47415,8 +47456,9 @@ declare class FrameGraphRenderContext extends FrameGraphContext {
47415
47456
  * this method several times with different render targets without incurring the cost of binding if no draw calls are made
47416
47457
  * @param renderTarget The handle of the render target texture to bind (default: undefined, meaning "back buffer"). Pass an array for MRT rendering.
47417
47458
  * @param debugMessage Optional debug message to display when the render target is bound (visible in PIX, for example)
47459
+ * @param applyImmediately If true, the render target will be applied immediately (otherwise it will be applied at first use). Default is false (delayed application).
47418
47460
  */
47419
- bindRenderTarget(renderTarget?: FrameGraphRenderTarget, debugMessage?: string): void;
47461
+ bindRenderTarget(renderTarget?: FrameGraphRenderTarget, debugMessage?: string, applyImmediately?: boolean): void;
47420
47462
  /** @internal */
47421
47463
  _flushDebugMessages(): void;
47422
47464
  /** @internal */
@@ -68630,5 +68672,159 @@ type PaneProps = {
68630
68672
  };
68631
68673
  declare const Pane: FunctionComponent<PropsWithChildren<PaneProps>>;
68632
68674
 
68633
- export { Accordion, AccordionSection, BoundProperty, BuiltInsExtensionFeed, Button, ButtonLine, CalculatePrecision, Checkbox, Collapse, Color3GradientComponent, Color3GradientList, Color4GradientComponent, Color4GradientList, ColorPickerPopup, ColorStepGradientComponent, ComboBox, ConstructorFactory, DebugServiceIdentity, DraggableLine, Dropdown, ExtensibleAccordion, FactorGradientComponent, FactorGradientList, FileUploadLine, GetPropertyDescriptor, HideInspector, InfoLabel, InputHexField, InputHsvField, Inspector, InterceptFunction, InterceptProperty, IsInspectorVisible, IsPropertyReadonly, LinkToEntityPropertyLine, List, MakeDialogTeachingMoment, MakeLazyComponent, MakePopoverTeachingMoment, MakePropertyHook, MakeTeachingMoment, MessageBar, NumberDropdown, Pane, Pane$1 as PaneContainer, PositionedPopover, PropertiesServiceIdentity, SceneContextIdentity, SceneExplorerServiceIdentity, SearchBar, SearchBox, SelectionServiceDefinition, SelectionServiceIdentity, SettingsContextIdentity, SettingsServiceIdentity, ShellServiceIdentity, ShowInspector, SpinButton, StatsServiceIdentity, StringDropdown, Switch, SyncedSliderInput, TeachingMoment, TextInput, Textarea, ToggleButton, ToolsServiceIdentity, useAngleConverters, useAsyncResource, useColor3Property, useColor4Property, useEventfulState, useInterceptObservable, useObservableCollection, useObservableState, useOrderedObservableCollection, usePollingObservable, useProperty, useQuaternionProperty, useResource, useVector3Property };
68634
- export type { AcceptedDropdownValue, AccordionSectionProps, BasePrimitiveProps, BoundPropertyProps, BuiltInExtension, ButtonProps, CentralContent, ColorPickerProps, ComboBoxProps, DraggableLineProps, DropdownOption, DropdownProps, DynamicAccordionSection, DynamicAccordionSectionContent, EntityBase, EntityDisplayInfo, ExtensionMetadata, ExtensionModule, FunctionHooks, IDebugService, IExtensionFeed, IExtensionMetadataQuery, IPropertiesService, ISceneContext, ISceneExplorerService, ISelectionService, IService, ISettingsContext, ISettingsService, IShellService, IStatsService, IToolsService, ImmutablePrimitiveProps, InfoLabelParentProps, InfoLabelProps, InputHexProps, ListItem, PaneProps, PrimitiveProps, PropertyHooks, SceneExplorerCommand, SceneExplorerCommandProvider, SceneExplorerSection, ServiceDefinition, ServiceFactory, SidePane, SpinButtonProps, SwitchProps, SyncedSliderProps, TextInputProps, TextareaProps, ToolbarItem };
68675
+ /**
68676
+ * Displays an icon indicating enabled (green check) or disabled (red cross) state
68677
+ * @param props - The properties for the PropertyLine, including the boolean value to display.
68678
+ * @returns A PropertyLine component with a PresenceBadge indicating the boolean state.
68679
+ */
68680
+ declare const BooleanBadgePropertyLine: FunctionComponent<PropertyLineProps<boolean> & ImmutablePrimitiveProps<boolean>>;
68681
+
68682
+ /**
68683
+ * Wraps a checkbox in a property line
68684
+ * @param props - PropertyLineProps and CheckboxProps
68685
+ * @returns property-line wrapped checkbox
68686
+ */
68687
+ declare const CheckboxPropertyLine: FunctionComponent<PropertyLineProps<boolean> & PrimitiveProps<boolean>>;
68688
+
68689
+ type ColorPropertyLineProps = ColorPickerProps<Color3 | Color4> & PropertyLineProps<Color3 | Color4>;
68690
+ declare const Color3PropertyLine: FunctionComponent<ColorPickerProps<Color3> & PropertyLineProps<Color3>>;
68691
+ declare const Color4PropertyLine: FunctionComponent<ColorPickerProps<Color4> & PropertyLineProps<Color4>>;
68692
+
68693
+ type DropdownPropertyLineProps<V extends AcceptedDropdownValue> = DropdownProps<V> & PropertyLineProps<V>;
68694
+ /**
68695
+ * Dropdown component for number values.
68696
+ */
68697
+ declare const NumberDropdownPropertyLine: FunctionComponent<DropdownPropertyLineProps<number>>;
68698
+ /**
68699
+ * Dropdown component for string values
68700
+ */
68701
+ declare const StringDropdownPropertyLine: FunctionComponent<DropdownPropertyLineProps<string>>;
68702
+
68703
+ /**
68704
+ * Wraps a hex input in a property line
68705
+ * @param props - PropertyLineProps and InputHexProps
68706
+ * @returns property-line wrapped input hex component
68707
+ */
68708
+ declare const HexPropertyLine: FunctionComponent<InputHexProps & PropertyLineProps<Color3 | Color4>>;
68709
+
68710
+ /**
68711
+ * Wraps a text input in a property line
68712
+ * @param props - PropertyLineProps and InputProps
68713
+ * @returns property-line wrapped input component
68714
+ */
68715
+ declare const TextInputPropertyLine: FunctionComponent<TextInputProps & PropertyLineProps<string>>;
68716
+ /**
68717
+ * Wraps a number input in a property line
68718
+ * To force integer values, use forceInt param (this is distinct from the 'step' param, which will still allow submitting an integer value. forceInt will not)
68719
+ * @param props - PropertyLineProps and InputProps
68720
+ * @returns property-line wrapped input component
68721
+ */
68722
+ declare const NumberInputPropertyLine: FunctionComponent<SpinButtonProps & PropertyLineProps<number> & {
68723
+ forceInt?: boolean;
68724
+ }>;
68725
+
68726
+ type LinkProps = ImmutablePrimitiveProps<string> & {
68727
+ onLink?: () => void;
68728
+ url?: string;
68729
+ };
68730
+ /**
68731
+ * Wraps a link in a property line
68732
+ * @param props - PropertyLineProps and LinkProps
68733
+ * @returns property-line wrapped link
68734
+ */
68735
+ declare const LinkPropertyLine: FunctionComponent<PropertyLineProps<string> & LinkProps>;
68736
+
68737
+ declare const SpinButtonPropertyLine: FunctionComponent<PropertyLineProps<number> & SpinButtonProps>;
68738
+
68739
+ type StringifiedPropertyLineProps = PropertyLineProps<number> & ImmutablePrimitiveProps<number> & {
68740
+ precision?: number;
68741
+ units?: string;
68742
+ };
68743
+ /**
68744
+ * Expects a numerical value and converts it toFixed(if precision is supplied) or toLocaleString
68745
+ * Can pass optional units to be appending to the end of the string
68746
+ * @param props
68747
+ * @returns
68748
+ */
68749
+ declare const StringifiedPropertyLine: FunctionComponent<StringifiedPropertyLineProps>;
68750
+
68751
+ /**
68752
+ * Wraps a switch in a property line
68753
+ * @param props - The properties for the switch and property line
68754
+ * @returns A React element representing the property line with a switch
68755
+ */
68756
+ declare const SwitchPropertyLine: FunctionComponent<PropertyLineProps<boolean> & SwitchProps>;
68757
+
68758
+ type SyncedSliderPropertyProps = SyncedSliderProps & PropertyLineProps<number>;
68759
+ /**
68760
+ * Renders a simple wrapper around the SyncedSliderInput
68761
+ * @param props
68762
+ * @returns
68763
+ */
68764
+ declare const SyncedSliderPropertyLine: react.ForwardRefExoticComponent<SyncedSliderPropertyProps & react.RefAttributes<HTMLDivElement>>;
68765
+
68766
+ /**
68767
+ * Wraps textarea in a property line
68768
+ * @param props - PropertyLineProps and TextProps
68769
+ * @returns property-line wrapped text
68770
+ */
68771
+ declare const TextAreaPropertyLine: FunctionComponent<PropertyLineProps<string> & TextareaProps>;
68772
+
68773
+ /**
68774
+ * Wraps text in a property line
68775
+ * @param props - PropertyLineProps and TextProps
68776
+ * @returns property-line wrapped text
68777
+ */
68778
+ declare const TextPropertyLine: FunctionComponent<PropertyLineProps<string> & ImmutablePrimitiveProps<string>>;
68779
+
68780
+ type TensorPropertyLineProps<V extends Vector2 | Vector3 | Vector4 | Quaternion> = PropertyLineProps<V> & PrimitiveProps<V> & {
68781
+ /**
68782
+ * If passed, all sliders will use this for the min value
68783
+ */
68784
+ min?: number;
68785
+ /**
68786
+ * If passed, all sliders will use this for the max value
68787
+ */
68788
+ max?: number;
68789
+ /**
68790
+ * Will be displayed in the input UI to indicate the unit of measurement
68791
+ */
68792
+ unit?: string;
68793
+ /**
68794
+ * Internal spinbutton's step
68795
+ */
68796
+ step?: number;
68797
+ /**
68798
+ * If passed, the UX will use the conversion functions to display/update values
68799
+ */
68800
+ valueConverter?: {
68801
+ /**
68802
+ * Will call from(val) before displaying in the UX
68803
+ */
68804
+ from: (val: number) => number;
68805
+ /**
68806
+ * Will call to(val) before calling onChange
68807
+ */
68808
+ to: (val: number) => number;
68809
+ };
68810
+ };
68811
+ type RotationVectorPropertyLineProps = TensorPropertyLineProps<Vector3> & {
68812
+ /**
68813
+ * Display angles as degrees instead of radians
68814
+ */
68815
+ useDegrees?: boolean;
68816
+ };
68817
+ declare const RotationVectorPropertyLine: FunctionComponent<RotationVectorPropertyLineProps>;
68818
+ type QuaternionPropertyLineProps = TensorPropertyLineProps<Quaternion> & {
68819
+ /**
68820
+ * Display angles as degrees instead of radians
68821
+ */
68822
+ useDegrees?: boolean;
68823
+ };
68824
+ declare const QuaternionPropertyLine: FunctionComponent<QuaternionPropertyLineProps>;
68825
+ declare const Vector2PropertyLine: FunctionComponent<TensorPropertyLineProps<Vector2>>;
68826
+ declare const Vector3PropertyLine: FunctionComponent<TensorPropertyLineProps<Vector3>>;
68827
+ declare const Vector4PropertyLine: FunctionComponent<TensorPropertyLineProps<Vector4>>;
68828
+
68829
+ export { Accordion, AccordionSection, BooleanBadgePropertyLine, BoundProperty, BuiltInsExtensionFeed, Button, ButtonLine, CalculatePrecision, Checkbox, CheckboxPropertyLine, Collapse, Color3GradientComponent, Color3GradientList, Color3PropertyLine, Color4GradientComponent, Color4GradientList, Color4PropertyLine, ColorPickerPopup, ColorStepGradientComponent, ComboBox, ConstructorFactory, DebugServiceIdentity, DraggableLine, Dropdown, ExtensibleAccordion, FactorGradientComponent, FactorGradientList, FileUploadLine, GetPropertyDescriptor, HexPropertyLine, HideInspector, InfoLabel, InputHexField, InputHsvField, Inspector, InterceptFunction, InterceptProperty, IsInspectorVisible, IsPropertyReadonly, LineContainer, LinkPropertyLine, LinkToEntityPropertyLine, List, MakeDialogTeachingMoment, MakeLazyComponent, MakePopoverTeachingMoment, MakePropertyHook, MakeTeachingMoment, MessageBar, NumberDropdown, NumberDropdownPropertyLine, NumberInputPropertyLine, ObservableCollection, Pane, Pane$1 as PaneContainer, PlaceholderPropertyLine, PositionedPopover, PropertiesServiceIdentity, PropertyLine, QuaternionPropertyLine, RotationVectorPropertyLine, SceneContextIdentity, SceneExplorerServiceIdentity, SearchBar, SearchBox, SelectionServiceDefinition, SelectionServiceIdentity, SettingsContextIdentity, SettingsServiceIdentity, ShellServiceIdentity, ShowInspector, SpinButton, SpinButtonPropertyLine, StatsServiceIdentity, StringDropdown, StringDropdownPropertyLine, StringifiedPropertyLine, Switch, SwitchPropertyLine, SyncedSliderInput, SyncedSliderPropertyLine, TeachingMoment, TextAreaPropertyLine, TextInput, TextInputPropertyLine, TextPropertyLine, Textarea, ToggleButton, ToolsServiceIdentity, Vector2PropertyLine, Vector3PropertyLine, Vector4PropertyLine, useAngleConverters, useAsyncResource, useColor3Property, useColor4Property, useEventfulState, useInterceptObservable, useObservableCollection, useObservableState, useOrderedObservableCollection, usePollingObservable, useProperty, useQuaternionProperty, useResource, useVector3Property };
68830
+ export type { AcceptedDropdownValue, AccordionSectionProps, BasePrimitiveProps, BoundPropertyProps, BuiltInExtension, ButtonProps, CentralContent, ColorPickerProps, ColorPropertyLineProps, ComboBoxProps, DraggableLineProps, DropdownOption, DropdownProps, DynamicAccordionSection, DynamicAccordionSectionContent, EntityBase, EntityDisplayInfo, ExtensionMetadata, ExtensionModule, FunctionHooks, IDebugService, IExtensionFeed, IExtensionMetadataQuery, IPropertiesService, ISceneContext, ISceneExplorerService, ISelectionService, IService, ISettingsContext, ISettingsService, IShellService, IStatsService, IToolsService, ImmutablePrimitiveProps, InfoLabelParentProps, InfoLabelProps, InputHexProps, ListItem, PaneProps, PrimitiveProps, PropertyHooks, PropertyLineProps, SceneExplorerCommand, SceneExplorerCommandProvider, SceneExplorerSection, ServiceDefinition, ServiceFactory, SidePane, SpinButtonProps, SwitchProps, SyncedSliderProps, TensorPropertyLineProps, TextInputProps, TextareaProps, ToolbarItem };