@babylonjs/inspector 8.32.2-preview → 8.32.3-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.
- package/lib/{captureService-BZVSfioR.js → captureService-OpT4QhL3.js} +2 -2
- package/lib/{captureService-BZVSfioR.js.map → captureService-OpT4QhL3.js.map} +1 -1
- package/lib/{exportService-C7h0qYdM.js → exportService-DMqaQAx2.js} +2 -2
- package/lib/{exportService-C7h0qYdM.js.map → exportService-DMqaQAx2.js.map} +1 -1
- package/lib/{importService-BBWfTnVO.js → importService-1dkQq3dn.js} +2 -2
- package/lib/{importService-BBWfTnVO.js.map → importService-1dkQq3dn.js.map} +1 -1
- package/lib/index.d.ts +33 -10
- package/lib/index.js +29 -10
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -71,8 +71,8 @@ import '@babylonjs/core/Materials/PBR/pbrBaseMaterial.js';
|
|
|
71
71
|
import '@babylonjs/core/Materials/PBR/pbrBaseSimpleMaterial.js';
|
|
72
72
|
import '@babylonjs/core/Materials/PBR/pbrMaterial.js';
|
|
73
73
|
import '@babylonjs/materials/sky/skyMaterial.js';
|
|
74
|
-
import '@babylonjs/core/Engines/engine.js';
|
|
75
74
|
import '@babylonjs/core/Engines/constants.js';
|
|
75
|
+
import '@babylonjs/core/Engines/engine.js';
|
|
76
76
|
import '@babylonjs/core/Particles/particleSystem.js';
|
|
77
77
|
import '@babylonjs/core/Misc/fileTools.js';
|
|
78
78
|
import '@babylonjs/core/Meshes/mesh.js';
|
|
@@ -187,4 +187,4 @@ var captureService = {
|
|
|
187
187
|
};
|
|
188
188
|
|
|
189
189
|
export { CaptureServiceDefinition, captureService as default };
|
|
190
|
-
//# sourceMappingURL=captureService-
|
|
190
|
+
//# sourceMappingURL=captureService-OpT4QhL3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captureService-BZVSfioR.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,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ureTools.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,MA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
|
import '@babylonjs/core/Materials/PBR/pbrBaseSimpleMaterial.js';
|
|
73
73
|
import '@babylonjs/core/Materials/PBR/pbrMaterial.js';
|
|
74
74
|
import '@babylonjs/materials/sky/skyMaterial.js';
|
|
75
|
-
import '@babylonjs/core/Engines/engine.js';
|
|
76
75
|
import '@babylonjs/core/Engines/constants.js';
|
|
76
|
+
import '@babylonjs/core/Engines/engine.js';
|
|
77
77
|
import '@babylonjs/core/Particles/particleSystem.js';
|
|
78
78
|
import '@babylonjs/core/Misc/fileTools.js';
|
|
79
79
|
import '@babylonjs/core/Debug/skeletonViewer.js';
|
|
@@ -233,4 +233,4 @@ var exportService = {
|
|
|
233
233
|
};
|
|
234
234
|
|
|
235
235
|
export { ExportServiceDefinition, exportService as default };
|
|
236
|
-
//# sourceMappingURL=exportService-
|
|
236
|
+
//# sourceMappingURL=exportService-DMqaQAx2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"exportService-C7h0qYdM.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\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AkB,CAKxB,EACFA,GAAC,CAAA,UAAU,IAAC,KAAK,EAAC,eAAe,EAAC,IAAI,EAAE,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
|
+
{"version":3,"file":"exportService-DMqaQAx2.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,GAAG;AACjB,QAAA,UAAU,EAAE,KAAK;AACpB,KAAA,CAAC;AAEF,IAAA,MAAM,aA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Y,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;;;;"}
|
|
@@ -71,8 +71,8 @@ import '@babylonjs/core/Materials/PBR/pbrBaseMaterial.js';
|
|
|
71
71
|
import '@babylonjs/core/Materials/PBR/pbrBaseSimpleMaterial.js';
|
|
72
72
|
import '@babylonjs/core/Materials/PBR/pbrMaterial.js';
|
|
73
73
|
import '@babylonjs/materials/sky/skyMaterial.js';
|
|
74
|
-
import '@babylonjs/core/Engines/engine.js';
|
|
75
74
|
import '@babylonjs/core/Engines/constants.js';
|
|
75
|
+
import '@babylonjs/core/Engines/engine.js';
|
|
76
76
|
import '@babylonjs/core/Particles/particleSystem.js';
|
|
77
77
|
import '@babylonjs/core/Misc/fileTools.js';
|
|
78
78
|
import '@babylonjs/core/Meshes/mesh.js';
|
|
@@ -169,4 +169,4 @@ var importService = {
|
|
|
169
169
|
};
|
|
170
170
|
|
|
171
171
|
export { SceneImportServiceDefinition, importService as default };
|
|
172
|
-
//# sourceMappingURL=importService-
|
|
172
|
+
//# sourceMappingURL=importService-1dkQq3dn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"importService-
|
|
1
|
+
{"version":3,"file":"importService-1dkQq3dn.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AqB,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
|
@@ -15407,6 +15407,10 @@ declare class Material implements IAnimatable, IClipPlanesHolder {
|
|
|
15407
15407
|
* Event observable which raises global events common to all materials (like MaterialPluginEvent.Created)
|
|
15408
15408
|
*/
|
|
15409
15409
|
static OnEventObservable: Observable<Material>;
|
|
15410
|
+
/**
|
|
15411
|
+
* If true, all materials will have their vertex output set to invariant (see the vertexOutputInvariant property).
|
|
15412
|
+
*/
|
|
15413
|
+
static ForceVertexOutputInvariant: boolean;
|
|
15410
15414
|
/**
|
|
15411
15415
|
* Custom callback helping to override the default shader used in the material.
|
|
15412
15416
|
*/
|
|
@@ -15771,7 +15775,7 @@ declare class Material implements IAnimatable, IClipPlanesHolder {
|
|
|
15771
15775
|
*/
|
|
15772
15776
|
get useLogarithmicDepth(): boolean;
|
|
15773
15777
|
set useLogarithmicDepth(value: boolean);
|
|
15774
|
-
protected
|
|
15778
|
+
protected _isVertexOutputInvariant: boolean;
|
|
15775
15779
|
/**
|
|
15776
15780
|
* Gets or sets the vertex output invariant state
|
|
15777
15781
|
* Setting this property to true will force the shader compiler to disable some optimization to make sure the vertex output is always calculated
|
|
@@ -15779,8 +15783,8 @@ declare class Material implements IAnimatable, IClipPlanesHolder {
|
|
|
15779
15783
|
* You may need to enable this option if you are seeing some depth artifacts when using a depth pre-pass, for e.g.
|
|
15780
15784
|
* Note that this may have an impact on performance, so leave this option disabled if not needed.
|
|
15781
15785
|
*/
|
|
15782
|
-
get
|
|
15783
|
-
set
|
|
15786
|
+
get isVertexOutputInvariant(): boolean;
|
|
15787
|
+
set isVertexOutputInvariant(value: boolean);
|
|
15784
15788
|
/**
|
|
15785
15789
|
* @internal
|
|
15786
15790
|
* Stores the effects for the material
|
|
@@ -21204,7 +21208,7 @@ declare class NodeParticleSystemSet {
|
|
|
21204
21208
|
*/
|
|
21205
21209
|
constructor(name: string);
|
|
21206
21210
|
/**
|
|
21207
|
-
* Gets the current class name of the
|
|
21211
|
+
* Gets the current class name of the node particle set e.g. "NodeParticleSystemSet"
|
|
21208
21212
|
* @returns the class name
|
|
21209
21213
|
*/
|
|
21210
21214
|
getClassName(): string;
|
|
@@ -21232,7 +21236,7 @@ declare class NodeParticleSystemSet {
|
|
|
21232
21236
|
*/
|
|
21233
21237
|
buildAsync(scene: Scene, verbose?: boolean): Promise<ParticleSystemSet>;
|
|
21234
21238
|
/**
|
|
21235
|
-
* Clear the current
|
|
21239
|
+
* Clear the current node particle set
|
|
21236
21240
|
*/
|
|
21237
21241
|
clear(): void;
|
|
21238
21242
|
/**
|
|
@@ -21252,8 +21256,8 @@ declare class NodeParticleSystemSet {
|
|
|
21252
21256
|
parseSerializedObject(source: any, merge?: boolean): void;
|
|
21253
21257
|
private _restoreConnections;
|
|
21254
21258
|
/**
|
|
21255
|
-
* Serializes this
|
|
21256
|
-
* @param selectedBlocks defines the list of blocks to save (if null the whole
|
|
21259
|
+
* Serializes this node particle set in a JSON representation
|
|
21260
|
+
* @param selectedBlocks defines the list of blocks to save (if null the whole node particle set will be saved)
|
|
21257
21261
|
* @returns the serialized particle system set object
|
|
21258
21262
|
*/
|
|
21259
21263
|
serialize(selectedBlocks?: NodeParticleBlock[]): any;
|
|
@@ -21280,10 +21284,18 @@ declare class NodeParticleSystemSet {
|
|
|
21280
21284
|
*/
|
|
21281
21285
|
static Parse(source: any): NodeParticleSystemSet;
|
|
21282
21286
|
/**
|
|
21283
|
-
* Creates a node particle set from a snippet saved
|
|
21287
|
+
* Creates a node particle set from a snippet saved in a remote file
|
|
21288
|
+
* @param name defines the name of the node particle set to create
|
|
21289
|
+
* @param url defines the url to load from
|
|
21290
|
+
* @param nodeParticleSet defines a node particle set to update (instead of creating a new one)
|
|
21291
|
+
* @returns a promise that will resolve to the new node particle set
|
|
21292
|
+
*/
|
|
21293
|
+
static ParseFromFileAsync(name: string, url: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet>;
|
|
21294
|
+
/**
|
|
21295
|
+
* Creates a node particle set from a snippet saved by the node particle editor
|
|
21284
21296
|
* @param snippetId defines the snippet to load
|
|
21285
21297
|
* @param nodeParticleSet defines a node particle set to update (instead of creating a new one)
|
|
21286
|
-
* @returns a promise that will resolve to the new node
|
|
21298
|
+
* @returns a promise that will resolve to the new node particle set
|
|
21287
21299
|
*/
|
|
21288
21300
|
static ParseFromSnippetAsync(snippetId: string, nodeParticleSet?: NodeParticleSystemSet): Promise<NodeParticleSystemSet>;
|
|
21289
21301
|
}
|
|
@@ -29141,6 +29153,8 @@ declare class MorphTargetManager implements IDisposable {
|
|
|
29141
29153
|
* @returns the requested target
|
|
29142
29154
|
*/
|
|
29143
29155
|
getTargetByName(name: string): Nullable<MorphTarget>;
|
|
29156
|
+
private _influencesAreDirty;
|
|
29157
|
+
private _needUpdateInfluences;
|
|
29144
29158
|
/**
|
|
29145
29159
|
* Add a new target to this manager
|
|
29146
29160
|
* @param target defines the target to add
|
|
@@ -49024,6 +49038,15 @@ declare class FrameGraphTextureManager {
|
|
|
49024
49038
|
width: number;
|
|
49025
49039
|
height: number;
|
|
49026
49040
|
};
|
|
49041
|
+
/**
|
|
49042
|
+
* Gets the absolute dimensions of a texture from its handle or creation options.
|
|
49043
|
+
* @param handleOrCreationOptions The handle or creation options of the texture
|
|
49044
|
+
* @returns The absolute dimensions of the texture
|
|
49045
|
+
*/
|
|
49046
|
+
getTextureAbsoluteDimensions(handleOrCreationOptions: FrameGraphTextureHandle | FrameGraphTextureCreationOptions): {
|
|
49047
|
+
width: number;
|
|
49048
|
+
height: number;
|
|
49049
|
+
};
|
|
49027
49050
|
/**
|
|
49028
49051
|
* Calculates the total byte size of all textures used by the frame graph texture manager (including external textures)
|
|
49029
49052
|
* @param optimizedSize True if the calculation should not factor in aliased textures
|
|
@@ -62175,7 +62198,7 @@ declare class Vector2 implements Vector<Tuple<number, 2>, IVector2Like>, IVector
|
|
|
62175
62198
|
/**
|
|
62176
62199
|
* Negate the current Vector2 and stores the result in the given vector "result" coordinates
|
|
62177
62200
|
* Example Playground https://playground.babylonjs.com/#QYBWV4#41
|
|
62178
|
-
* @param result defines the
|
|
62201
|
+
* @param result defines the Vector2 object where to store the result
|
|
62179
62202
|
* @returns the result
|
|
62180
62203
|
*/
|
|
62181
62204
|
negateToRef<T extends IVector2Like>(result: T): T;
|
package/lib/index.js
CHANGED
|
@@ -69,8 +69,8 @@ import { PBRBaseMaterial } from '@babylonjs/core/Materials/PBR/pbrBaseMaterial.j
|
|
|
69
69
|
import { PBRBaseSimpleMaterial } from '@babylonjs/core/Materials/PBR/pbrBaseSimpleMaterial.js';
|
|
70
70
|
import { PBRMaterial } from '@babylonjs/core/Materials/PBR/pbrMaterial.js';
|
|
71
71
|
import { SkyMaterial } from '@babylonjs/materials/sky/skyMaterial.js';
|
|
72
|
-
import { Engine } from '@babylonjs/core/Engines/engine.js';
|
|
73
72
|
import { Constants } from '@babylonjs/core/Engines/constants.js';
|
|
73
|
+
import { Engine } from '@babylonjs/core/Engines/engine.js';
|
|
74
74
|
import { ParticleSystem } from '@babylonjs/core/Particles/particleSystem.js';
|
|
75
75
|
import { ReadFile } from '@babylonjs/core/Misc/fileTools.js';
|
|
76
76
|
import { Mesh } from '@babylonjs/core/Meshes/mesh.js';
|
|
@@ -3228,19 +3228,19 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3228
3228
|
name: "Export Tools",
|
|
3229
3229
|
description: "Adds new features to enable exporting Babylon assets such as .gltf, .glb, .babylon, and more.",
|
|
3230
3230
|
keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
|
|
3231
|
-
getExtensionModuleAsync: async () => await import('./exportService-
|
|
3231
|
+
getExtensionModuleAsync: async () => await import('./exportService-DMqaQAx2.js'),
|
|
3232
3232
|
},
|
|
3233
3233
|
{
|
|
3234
3234
|
name: "Capture Tools",
|
|
3235
3235
|
description: "Adds new features to enable capturing screenshots, GIFs, videos, and more.",
|
|
3236
3236
|
keywords: ["capture", "screenshot", "gif", "video", "tools"],
|
|
3237
|
-
getExtensionModuleAsync: async () => await import('./captureService-
|
|
3237
|
+
getExtensionModuleAsync: async () => await import('./captureService-OpT4QhL3.js'),
|
|
3238
3238
|
},
|
|
3239
3239
|
{
|
|
3240
3240
|
name: "Import Tools",
|
|
3241
3241
|
description: "Adds new features related to importing Babylon assets.",
|
|
3242
3242
|
keywords: ["import", "tools"],
|
|
3243
|
-
getExtensionModuleAsync: async () => await import('./importService-
|
|
3243
|
+
getExtensionModuleAsync: async () => await import('./importService-1dkQq3dn.js'),
|
|
3244
3244
|
},
|
|
3245
3245
|
]);
|
|
3246
3246
|
|
|
@@ -5227,12 +5227,16 @@ const CommonGeneralProperties = (props) => {
|
|
|
5227
5227
|
return (jsxs(Fragment, { children: [commonEntity.id !== undefined && jsx(StringifiedPropertyLine, { label: "ID", description: "The id of the node.", value: commonEntity.id }, "EntityId"), name !== undefined &&
|
|
5228
5228
|
(isNameReadonly ? (jsx(TextPropertyLine, { label: "Name", description: "The name of the node.", value: name }, "EntityName")) : (jsx(TextInputPropertyLine, { label: "Name", description: "The name of the node.", value: name, onChange: (newName) => (commonEntity.name = newName) }, "EntityName"))), commonEntity.uniqueId !== undefined && (jsx(StringifiedPropertyLine, { label: "Unique ID", description: "The unique id of the node.", value: commonEntity.uniqueId }, "EntityUniqueId")), className !== undefined && jsx(TextPropertyLine, { label: "Class", description: "The class of the node.", value: className }, "EntityClassName")] }));
|
|
5229
5229
|
};
|
|
5230
|
+
const DisposableGeneralProperties = (props) => {
|
|
5231
|
+
const { disposableEntity } = props;
|
|
5232
|
+
return (jsx(Fragment, { children: jsx(ButtonLine, { label: "Dispose", onClick: () => disposableEntity.dispose() }) }));
|
|
5233
|
+
};
|
|
5230
5234
|
|
|
5231
5235
|
const CommonPropertiesServiceDefinition = {
|
|
5232
5236
|
friendlyName: "Common Properties",
|
|
5233
5237
|
consumes: [PropertiesServiceIdentity],
|
|
5234
5238
|
factory: (propertiesService) => {
|
|
5235
|
-
const
|
|
5239
|
+
const commonContentRegistration = propertiesService.addSectionContent({
|
|
5236
5240
|
key: "Common Properties",
|
|
5237
5241
|
predicate: (entity) => {
|
|
5238
5242
|
// Common properties are not useful for the scene.
|
|
@@ -5249,9 +5253,24 @@ const CommonPropertiesServiceDefinition = {
|
|
|
5249
5253
|
},
|
|
5250
5254
|
],
|
|
5251
5255
|
});
|
|
5256
|
+
const disposableContentRegistration = propertiesService.addSectionContent({
|
|
5257
|
+
key: "Disposable Properties",
|
|
5258
|
+
predicate: (entity) => {
|
|
5259
|
+
const disposable = entity;
|
|
5260
|
+
return typeof disposable.dispose === "function";
|
|
5261
|
+
},
|
|
5262
|
+
content: [
|
|
5263
|
+
{
|
|
5264
|
+
section: "General",
|
|
5265
|
+
order: 100000,
|
|
5266
|
+
component: ({ context }) => jsx(DisposableGeneralProperties, { disposableEntity: context }),
|
|
5267
|
+
},
|
|
5268
|
+
],
|
|
5269
|
+
});
|
|
5252
5270
|
return {
|
|
5253
5271
|
dispose: () => {
|
|
5254
|
-
|
|
5272
|
+
commonContentRegistration.dispose();
|
|
5273
|
+
disposableContentRegistration.dispose();
|
|
5255
5274
|
},
|
|
5256
5275
|
};
|
|
5257
5276
|
},
|
|
@@ -5561,7 +5580,7 @@ const MaterialGeneralProperties = (props) => {
|
|
|
5561
5580
|
const pointsCloud = useProperty(material, "pointsCloud");
|
|
5562
5581
|
const faceCulling = useProperty(material, "backFaceCulling");
|
|
5563
5582
|
const isWebGPU = material.getScene().getEngine().isWebGPU;
|
|
5564
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Face Culling", docLink: "https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#back-face-culling", target: material, propertyKey: "backFaceCulling" }), faceCulling
|
|
5583
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Face Culling", docLink: "https://doc.babylonjs.com/features/featuresDeepDive/materials/using/materials_introduction#back-face-culling", target: material, propertyKey: "backFaceCulling" }), jsx(Collapse, { visible: faceCulling, children: jsx(BoundProperty, { component: SwitchPropertyLine, label: "Cull Back Faces", description: "Culls back faces. If false, front faces are culled.", target: material, propertyKey: "cullBackFaces" }) }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Orientation", description: "The front face side. Overrides mesh's orientation.", options: OrientationOptions, target: material, propertyKey: "sideOrientation", nullable: true, defaultValue: material.getScene().useRightHandedSystem ? Material.CounterClockWiseSideOrientation : Material.ClockWiseSideOrientation }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Disable Color Write", target: material, propertyKey: "disableColorWrite" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Disable Depth Write", target: material, propertyKey: "disableDepthWrite" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Force Depth Write", target: material, propertyKey: "forceDepthWrite" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Depth Function", options: DepthFunctionOptions, target: material, propertyKey: "depthFunction" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Need Depth Pre-pass", docLink: "https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/transparent_rendering/#depth-pre-pass-meshes", target: material, propertyKey: "needDepthPrePass" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Z-offset Factor", target: material, propertyKey: "zOffset", min: -10, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Z-offset Units", target: material, propertyKey: "zOffsetUnits", min: -10, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Wireframe", target: material, propertyKey: "wireframe" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Point Cloud", target: material, propertyKey: "pointsCloud" }), pointsCloud && jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Point Size", target: material, propertyKey: "pointSize", min: 0, max: 100, step: 0.1 }), isWebGPU && jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Vertex Pulling", target: material, propertyKey: "useVertexPulling" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Support Fog", target: material, propertyKey: "fogEnabled", description: "Indicates whether the material supports fog (however, fog must be enabled at the scene level to be effective)." }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Logarithmic Depth", target: material, propertyKey: "useLogarithmicDepth", docLink: "https://doc.babylonjs.com/features/featuresDeepDive/materials/advanced/logarithmicDepthBuffer" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Set Vertex Output Invariant", target: material, propertyKey: "isVertexOutputInvariant", description: "Setting this property to true will force the shader compiler to disable some optimization to make sure the vertex output is always calculated the same way across different compilation units." })] }));
|
|
5565
5584
|
};
|
|
5566
5585
|
const MaterialTransparencyProperties = (props) => {
|
|
5567
5586
|
const { material } = props;
|
|
@@ -6033,7 +6052,7 @@ const AbstractMeshGeneralProperties = (props) => {
|
|
|
6033
6052
|
const isAnInstance = useProperty(mesh, "isAnInstance");
|
|
6034
6053
|
// TODO: Handle case where array is mutated
|
|
6035
6054
|
const subMeshes = useProperty(mesh, "subMeshes");
|
|
6036
|
-
return (jsxs(Fragment, { children: [jsx(StringifiedPropertyLine, { label: "Vertices", value: mesh.getTotalVertices() }), jsx(StringifiedPropertyLine, { label: "Faces", value: mesh.getTotalIndices() / 3 }), jsx(StringifiedPropertyLine, { label: "Sub-Meshes", value: subMeshes.length }), jsx(LinkToEntityPropertyLine, { label: "Skeleton", description: "The skeleton associated with the mesh.", entity: skeleton, selectionService: selectionService }), jsx(LinkToEntityPropertyLine, { label: "Material", description: "The material used by the mesh.", entity: material, selectionService: selectionService }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Is Pickable", target: mesh, propertyKey: "isPickable" }), isAnInstance && mesh instanceof InstancedMesh && (jsx(LinkToEntityPropertyLine, { label: "Source", description: "The source mesh from which this instance was created.", entity: mesh.sourceMesh, selectionService: selectionService }))
|
|
6055
|
+
return (jsxs(Fragment, { children: [jsx(StringifiedPropertyLine, { label: "Vertices", value: mesh.getTotalVertices() }), jsx(StringifiedPropertyLine, { label: "Faces", value: mesh.getTotalIndices() / 3 }), jsx(StringifiedPropertyLine, { label: "Sub-Meshes", value: subMeshes.length }), jsx(LinkToEntityPropertyLine, { label: "Skeleton", description: "The skeleton associated with the mesh.", entity: skeleton, selectionService: selectionService }), jsx(LinkToEntityPropertyLine, { label: "Material", description: "The material used by the mesh.", entity: material, selectionService: selectionService }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Is Pickable", target: mesh, propertyKey: "isPickable" }), isAnInstance && mesh instanceof InstancedMesh && (jsx(LinkToEntityPropertyLine, { label: "Source", description: "The source mesh from which this instance was created.", entity: mesh.sourceMesh, selectionService: selectionService }))] }));
|
|
6037
6056
|
};
|
|
6038
6057
|
const AbstractMeshDisplayProperties = (props) => {
|
|
6039
6058
|
const { mesh } = props;
|
|
@@ -6897,7 +6916,7 @@ const CheckboxPropertyLine = (props) => {
|
|
|
6897
6916
|
*/
|
|
6898
6917
|
const PostProcessProperties = (props) => {
|
|
6899
6918
|
const { postProcess } = props;
|
|
6900
|
-
return (jsxs(Fragment, { children: [jsx(StringifiedPropertyLine, { label: "Width:", description: "The width of the post process", value: postProcess.width, units: "px" }, "width"), jsx(StringifiedPropertyLine, { label: "Height:", description: "The height of the post process", value: postProcess.height, units: "px" }, "height"), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Auto Clear:", target: postProcess, propertyKey: "autoClear" }), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Pixel Perfect:", target: postProcess, propertyKey: "enablePixelPerfectMode" }), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Fullscreen Viewport:", target: postProcess, propertyKey: "forceFullscreenViewport" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Samples:", target: postProcess, propertyKey: "samples", min: 1, max: 8, step: 1 })
|
|
6919
|
+
return (jsxs(Fragment, { children: [jsx(StringifiedPropertyLine, { label: "Width:", description: "The width of the post process", value: postProcess.width, units: "px" }, "width"), jsx(StringifiedPropertyLine, { label: "Height:", description: "The height of the post process", value: postProcess.height, units: "px" }, "height"), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Auto Clear:", target: postProcess, propertyKey: "autoClear" }), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Pixel Perfect:", target: postProcess, propertyKey: "enablePixelPerfectMode" }), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Fullscreen Viewport:", target: postProcess, propertyKey: "forceFullscreenViewport" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Samples:", target: postProcess, propertyKey: "samples", min: 1, max: 8, step: 1 })] }));
|
|
6901
6920
|
};
|
|
6902
6921
|
|
|
6903
6922
|
const PostProcessPropertiesServiceDefinition = {
|
|
@@ -7199,7 +7218,7 @@ const SpinButtonPropertyLine = (props) => {
|
|
|
7199
7218
|
const SpriteManagerGeneralProperties = (props) => {
|
|
7200
7219
|
const { spriteManager, selectionService } = props;
|
|
7201
7220
|
const texture = useProperty(spriteManager, "texture");
|
|
7202
|
-
return (jsxs(Fragment, { children: [jsx(TextPropertyLine, { label: "Capacity", value: spriteManager.capacity.toString() }), jsx(LinkToEntityPropertyLine, { label: "Texture", entity: texture, selectionService: selectionService })
|
|
7221
|
+
return (jsxs(Fragment, { children: [jsx(TextPropertyLine, { label: "Capacity", value: spriteManager.capacity.toString() }), jsx(LinkToEntityPropertyLine, { label: "Texture", entity: texture, selectionService: selectionService })] }));
|
|
7203
7222
|
};
|
|
7204
7223
|
const SpriteManagerOtherProperties = (props) => {
|
|
7205
7224
|
const { spriteManager } = props;
|