@babylonjs/inspector 9.29.0 → 9.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/bin/inspector-bridge.mjs +4730 -4446
  2. package/bin/inspector-cli.mjs +4765 -3866
  3. package/lib/components/curveEditor/animatableAnimations.d.ts +27 -0
  4. package/lib/components/properties/nodes/gaussianSplattingProperties.d.ts +13 -2
  5. package/lib/{extensionsListService-DfE1ZOnF.js → extensionsListService-O8zrOnmL.js} +5 -2
  6. package/lib/{extensionsListService-DfE1ZOnF.js.map → extensionsListService-O8zrOnmL.js.map} +1 -1
  7. package/lib/gif-ut7hgn9U.js +45 -0
  8. package/lib/gif-ut7hgn9U.js.map +1 -0
  9. package/lib/{index-CZ1-Y-Rv.js → index-DbbhJJ1G.js} +321 -85
  10. package/lib/index-DbbhJJ1G.js.map +1 -0
  11. package/lib/index.js +4 -1
  12. package/lib/index.js.map +1 -1
  13. package/lib/lite/animationProperties-BKVw6_ls.js +95 -0
  14. package/lib/lite/animationProperties-BKVw6_ls.js.map +1 -0
  15. package/lib/lite/animationUtils.d.ts +47 -0
  16. package/lib/lite/components/properties/animationProperties.d.ts +48 -0
  17. package/lib/lite/directTextureBinding-C5MB2OV2.js +99 -0
  18. package/lib/lite/directTextureBinding-C5MB2OV2.js.map +1 -0
  19. package/lib/lite/dynamicMaterialField-L_nQAxAA.js +107 -0
  20. package/lib/lite/dynamicMaterialField-L_nQAxAA.js.map +1 -0
  21. package/lib/lite/engineExplorerService.d.ts +3 -1
  22. package/lib/lite/{extensionsListService-D1JivcAu.js → extensionsListService-Bl1rTNl1.js} +2 -2
  23. package/lib/lite/{extensionsListService-D1JivcAu.js.map → extensionsListService-Bl1rTNl1.js.map} +1 -1
  24. package/lib/lite/{index-D8vFySa7.js → index-Cy8gzpYG.js} +1453 -394
  25. package/lib/lite/index-Cy8gzpYG.js.map +1 -0
  26. package/lib/lite/index.js +1 -1
  27. package/lib/lite/nodeMaterialProperties-ELFMlzS1.js +182 -0
  28. package/lib/lite/nodeMaterialProperties-ELFMlzS1.js.map +1 -0
  29. package/lib/lite/pbrMaterialProperties-jfJddBxY.js +614 -0
  30. package/lib/lite/pbrMaterialProperties-jfJddBxY.js.map +1 -0
  31. package/lib/lite/services/panes/properties/animationPropertiesService.d.ts +5 -0
  32. package/lib/lite/services/panes/properties/materialPropertiesService.d.ts +3 -1
  33. package/lib/lite/services/panes/properties/materials/directTextureBinding.d.ts +29 -0
  34. package/lib/lite/services/panes/properties/materials/dynamicMaterialField.d.ts +35 -0
  35. package/lib/lite/services/panes/properties/materials/materialAdapterTypes.d.ts +11 -0
  36. package/lib/lite/services/panes/properties/materials/materialReachability.d.ts +9 -0
  37. package/lib/lite/services/panes/properties/materials/nodeMaterialProperties.d.ts +8 -0
  38. package/lib/lite/services/panes/properties/materials/pbrMaterialProperties.d.ts +8 -0
  39. package/lib/lite/services/panes/properties/materials/shaderMaterialProperties.d.ts +8 -0
  40. package/lib/lite/services/panes/properties/materials/standardMaterialProperties.d.ts +8 -0
  41. package/lib/lite/services/panes/properties/materials/useDirectMaterialOperations.d.ts +31 -0
  42. package/lib/lite/services/panes/properties/textureMetadataProperties.d.ts +14 -0
  43. package/lib/lite/services/panes/properties/texturePropertiesService.d.ts +3 -1
  44. package/lib/lite/services/panes/properties/useLatestAsyncOperation.d.ts +24 -0
  45. package/lib/lite/services/panes/scene/animationGroupExplorerService.d.ts +7 -0
  46. package/lib/lite/services/panes/scene/materialExplorerService.d.ts +2 -1
  47. package/lib/lite/services/panes/scene/materialTopologyBindings.d.ts +13 -0
  48. package/lib/lite/services/panes/scene/sceneResourceIndexService.d.ts +36 -0
  49. package/lib/lite/services/panes/scene/sceneResources.d.ts +55 -11
  50. package/lib/lite/services/panes/scene/textureExplorerService.d.ts +2 -1
  51. package/lib/lite/services/pickingService.d.ts +10 -0
  52. package/lib/lite/shaderMaterialProperties-CTH_KfBK.js +229 -0
  53. package/lib/lite/shaderMaterialProperties-CTH_KfBK.js.map +1 -0
  54. package/lib/lite/standardMaterialProperties-BbYdFX86.js +287 -0
  55. package/lib/lite/standardMaterialProperties-BbYdFX86.js.map +1 -0
  56. package/lib/lite/textureMetadataProperties-BdNmp0Pk.js +221 -0
  57. package/lib/lite/textureMetadataProperties-BdNmp0Pk.js.map +1 -0
  58. package/lib/lite/useDirectMaterialOperations-D6V7OtC1.js +83 -0
  59. package/lib/lite/useDirectMaterialOperations-D6V7OtC1.js.map +1 -0
  60. package/lib/lite/useLatestAsyncOperation-k59AgA3B.js +78 -0
  61. package/lib/lite/useLatestAsyncOperation-k59AgA3B.js.map +1 -0
  62. package/lib/{quickCreateToolsService-owfaw163.js → quickCreateToolsService-Cs46Amv7.js} +5 -2
  63. package/lib/{quickCreateToolsService-owfaw163.js.map → quickCreateToolsService-Cs46Amv7.js.map} +1 -1
  64. package/lib/{reflectorService-oIAxxpQt.js → reflectorService-C43FgOiC.js} +5 -2
  65. package/lib/{reflectorService-oIAxxpQt.js.map → reflectorService-C43FgOiC.js.map} +1 -1
  66. package/lib/services/panes/properties/gaussianSplattingDebugController.d.ts +46 -0
  67. package/package.json +8 -8
  68. package/lib/gif-5DieAkSF.js +0 -38
  69. package/lib/gif-5DieAkSF.js.map +0 -1
  70. package/lib/index-CZ1-Y-Rv.js.map +0 -1
  71. package/lib/lite/index-D8vFySa7.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textureMetadataProperties-BdNmp0Pk.js","sources":["../../../../../../../../../../dev/inspector-v2/src/lite/services/panes/properties/textureMetadataProperties.tsx"],"sourcesContent":["import {\n enableMaterialUvTransform,\n getMaterialSource,\n getTextureCoordinateIndex,\n getTextureMetadata,\n getTextureTransform,\n hasMaterialUvTransform,\n markMaterialUboDirty,\n rebuildMaterial,\n setTextureTransform,\n type Material,\n type SceneContext,\n type Texture2D,\n type TextureMetadata,\n type TextureTransform,\n} from \"@babylonjs/lite\";\nimport { Body1, makeStyles, tokens } from \"@fluentui/react-components\";\nimport { type FunctionComponent, useCallback } from \"react\";\n\nimport { NumberInputPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/inputPropertyLine\";\nimport { BooleanBadgePropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/booleanBadgePropertyLine\";\nimport { LinkPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/linkPropertyLine\";\nimport { StringifiedPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/stringifiedPropertyLine\";\nimport { TextPropertyLine } from \"shared-ui-components/fluent/hoc/propertyLines/textPropertyLine\";\nimport { useObservableState } from \"shared-ui-components/modularTool/hooks/observableHooks\";\n\nimport { type ISelectionService } from \"../../../../services/selectionService\";\nimport { DerivedProperty } from \"../../../../components/properties/boundProperty\";\nimport { usePropertyChangedNotifier } from \"../../../../contexts/propertyContext\";\nimport { type ISceneResourceIndexService } from \"../scene/sceneResourceIndexService\";\nimport { type IMaterialResourceRecord, type ITextureResourceRecord } from \"../scene/sceneResources\";\nimport { GetMaterialTopologyBindings } from \"../scene/materialTopologyBindings\";\nimport { GetMaterialOwningScenes } from \"./materials/materialReachability\";\nimport { useLatestAsyncOperation } from \"./useLatestAsyncOperation\";\n\nexport type TextureMetadataPropertiesProps = Readonly<{\n texture: object;\n resourceIndexService: ISceneResourceIndexService;\n selectionService: ISelectionService;\n}>;\n\ntype TextureMetadataRow = Readonly<{\n id: string;\n label: string;\n value?: string | number | boolean | null;\n units?: string;\n description?: string;\n}>;\n\nconst useStyles = makeStyles({\n section: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: tokens.spacingVerticalXS,\n },\n});\n\nfunction OptionalRow(id: string, label: string, value: unknown, units?: string): TextureMetadataRow {\n return value === undefined\n ? { id, label, value: null, description: \"Not retained by the Lite texture wrapper.\" }\n : { id, label, value: typeof value === \"string\" ? value : String(value), units };\n}\n\nfunction GetMaterialRecord(resourceIndexService: ISceneResourceIndexService, material: Material): IMaterialResourceRecord | undefined {\n return resourceIndexService.getMaterialRecord(getMaterialSource(material));\n}\n\nfunction GetConsumerScenes(record: ITextureResourceRecord | undefined, resourceIndexService: ISceneResourceIndexService): readonly SceneContext[] {\n const scenes = new Set<SceneContext>();\n for (const consumer of record?.consumers ?? []) {\n const record = GetMaterialRecord(resourceIndexService, consumer.material);\n for (const scene of record ? GetMaterialOwningScenes(record, consumer.material) : []) {\n scenes.add(scene);\n }\n }\n return [...scenes];\n}\n\nfunction SupportsTransform(record: ITextureResourceRecord | undefined, resourceIndexService: ISceneResourceIndexService): boolean {\n if (!record || record.metadata.kind !== \"2d\" || getTextureTransform(record.entity as Texture2D) === undefined) {\n return false;\n }\n return record.consumers.some((consumer) => {\n const materialRecord = GetMaterialRecord(resourceIndexService, consumer.material);\n return (\n (materialRecord?.family === \"standard\" || materialRecord?.family === \"pbr\") &&\n consumer.bindingId !== \"standard.reflection2d\" &&\n consumer.bindingId !== \"standard.reflectionCube\" &&\n (consumer.material === materialRecord.source ? materialRecord.bindings : GetMaterialTopologyBindings(consumer.material)).some(\n (binding) => binding.id === consumer.bindingId && binding.entity === record.entity\n )\n );\n });\n}\n\nfunction GetMetadataRows(metadata: TextureMetadata, ordinal: number | undefined, texture: object): readonly TextureMetadataRow[] {\n const rows: TextureMetadataRow[] = [\n { id: \"identity\", label: \"Identity\", value: ordinal === undefined ? \"Unindexed texture\" : `Texture ${ordinal}` },\n OptionalRow(\"name\", \"Name\", metadata.name),\n { id: \"kind\", label: \"Kind\", value: metadata.kind },\n OptionalRow(\"origin\", \"Origin\", metadata.origin),\n OptionalRow(\"width\", \"Width\", metadata.width, \"px\"),\n OptionalRow(\"height\", \"Height\", metadata.height, \"px\"),\n ];\n if (metadata.kind === \"2d-array\") {\n rows.push(OptionalRow(\"layers\", \"Layers\", metadata.layers));\n } else if (metadata.kind === \"3d\") {\n rows.push(OptionalRow(\"depth\", \"Depth\", metadata.depth));\n } else if (metadata.kind === \"cube\") {\n rows.push({ id: \"faces\", label: \"Faces\", value: \"6\" });\n }\n rows.push(\n OptionalRow(\"format\", \"Format\", metadata.format),\n OptionalRow(\"mip-levels\", \"Mip Levels\", metadata.mipLevelCount),\n OptionalRow(\"sample-type\", \"Sample Type\", metadata.sampleType),\n OptionalRow(\"color-space\", \"Color Space\", metadata.colorSpace),\n OptionalRow(\"invert-y\", \"Invert Y\", metadata.invertY),\n OptionalRow(\"address-u\", \"Address U\", metadata.sampler?.addressModeU),\n OptionalRow(\"address-v\", \"Address V\", metadata.sampler?.addressModeV),\n OptionalRow(\"address-w\", \"Address W\", metadata.sampler?.addressModeW),\n OptionalRow(\"min-filter\", \"Min Filter\", metadata.sampler?.minFilter),\n OptionalRow(\"mag-filter\", \"Mag Filter\", metadata.sampler?.magFilter),\n OptionalRow(\"mipmap-filter\", \"Mipmap Filter\", metadata.sampler?.mipmapFilter),\n OptionalRow(\"anisotropy\", \"Max Anisotropy\", metadata.sampler?.maxAnisotropy),\n OptionalRow(\"dynamic-update\", \"Dynamic Update\", metadata.capabilities.dynamicUpdate),\n OptionalRow(\"render-attachment\", \"Render Attachment\", metadata.capabilities.renderAttachment),\n OptionalRow(\"sampled-depth\", \"Sampled Depth\", metadata.capabilities.sampledDepth)\n );\n if (metadata.kind === \"2d\") {\n rows.push(OptionalRow(\"coordinates\", \"Coordinate Index\", getTextureCoordinateIndex(texture as Texture2D)));\n }\n if (metadata.width === 0 || metadata.height === 0) {\n rows.push({ id: \"availability\", label: \"Availability\", value: \"Transient or unavailable\" });\n }\n return rows;\n}\n\nconst TransformFields = [\n [\"uScale\", \"U Scale\"],\n [\"vScale\", \"V Scale\"],\n [\"uOffset\", \"U Offset\"],\n [\"vOffset\", \"V Offset\"],\n [\"uAng\", \"Angle\"],\n] as const;\n\ntype TextureTransformFieldProps = Readonly<{\n transform: TextureTransform;\n field: (typeof TransformFields)[number];\n pending?: boolean;\n error?: string;\n commit: (id: string, key: keyof TextureTransform, value: number) => void;\n}>;\n\nconst TextureTransformField: FunctionComponent<TextureTransformFieldProps> = (props) => {\n const { transform, field, pending, error, commit } = props;\n const [key, label] = field;\n const id = `transform-${key}`;\n return (\n <div aria-busy={pending}>\n <DerivedProperty\n component={NumberInputPropertyLine}\n target={transform}\n getValue={(value) => value[key]}\n setValue={(_, next) => commit(id, key, next)}\n label={label}\n uniqueId={id}\n disabled={pending}\n description={error ? `Error: ${error}` : undefined}\n />\n {pending ? <Body1 role=\"status\">{`Applying ${label}…`}</Body1> : undefined}\n {error ? <Body1 role=\"alert\">{error}</Body1> : undefined}\n </div>\n );\n};\n\n/**\n * Displays metadata properties for one exact Lite texture wrapper.\n * @param props - The exact texture, resource index, and selection service.\n * @returns The metadata-only texture properties UI.\n */\nexport const TextureMetadataProperties: FunctionComponent<TextureMetadataPropertiesProps> = (props) => {\n const { texture, resourceIndexService, selectionService } = props;\n const notifyPropertyChanged = usePropertyChangedNotifier();\n const classes = useStyles();\n const getSnapshot = useCallback(() => {\n const record = resourceIndexService.getTextureRecord(texture);\n try {\n const metadata = getTextureMetadata(texture);\n return metadata ? { metadata, record } : undefined;\n } catch {\n return undefined;\n }\n }, [resourceIndexService, texture]);\n const snapshot = useObservableState(getSnapshot, resourceIndexService.onChanged);\n const isResourceIndexDisposed = useCallback(() => resourceIndexService.isDisposed, [resourceIndexService]);\n const [operations, runLatestOperation] = useLatestAsyncOperation(texture, [resourceIndexService.onDisposed, selectionService.onSelectedEntityChanged], isResourceIndexDisposed);\n\n if (!snapshot) {\n return (\n <div className={classes.section} role=\"alert\">\n <TextPropertyLine label=\"Error\" value=\"This texture is unavailable or malformed.\" />\n </div>\n );\n }\n\n const { metadata, record } = snapshot;\n const canEditTransform = SupportsTransform(record, resourceIndexService);\n const transform = canEditTransform ? getTextureTransform(texture as Texture2D) : undefined;\n const consumersByMaterial = new Map<Material, string[]>();\n for (const consumer of record?.consumers ?? []) {\n const slots = consumersByMaterial.get(consumer.material);\n if (slots) {\n slots.push(consumer.bindingId);\n } else {\n consumersByMaterial.set(consumer.material, [consumer.bindingId]);\n }\n }\n const commitTransform = (id: string, key: keyof TextureTransform, value: number) => {\n runLatestOperation({\n id,\n operationAsync: async () => {\n const currentRecord = resourceIndexService.getTextureRecord(texture);\n if (!currentRecord) {\n throw new Error(\"This texture is no longer available in an inspected scene.\");\n }\n const consumerRecords = currentRecord.consumers.map((consumer) => GetMaterialRecord(resourceIndexService, consumer.material));\n if (currentRecord.consumers.some((consumer, index) => !consumerRecords[index] || !GetMaterialOwningScenes(consumerRecords[index]!, consumer.material).length)) {\n throw new Error(\"The texture has an incomplete owning scene scope.\");\n }\n const scenes = [...GetConsumerScenes(currentRecord, resourceIndexService)];\n const materialRecords = [\n ...new Set(consumerRecords.filter((item): item is IMaterialResourceRecord => item !== undefined && (item.family === \"standard\" || item.family === \"pbr\"))),\n ];\n if (scenes.length === 0 || materialRecords.length === 0) {\n throw new Error(\"The texture has no complete owning scene scope.\");\n }\n const currentTransform = getTextureTransform(texture as Texture2D);\n if (!currentTransform) {\n throw new Error(\"This texture no longer supports UV transforms.\");\n }\n if (currentTransform[key] === value) {\n return undefined;\n }\n const previousValue = currentTransform[key];\n const changed = setTextureTransform(texture as Texture2D, { ...currentTransform, [key]: value });\n if (!changed) {\n return undefined;\n }\n await Promise.all(\n materialRecords.flatMap((materialRecord) => {\n const wasEnabled = hasMaterialUvTransform(materialRecord.source);\n enableMaterialUvTransform(materialRecord.source);\n markMaterialUboDirty(materialRecord.source);\n return materialRecord.family === \"standard\" || !wasEnabled\n ? materialRecord.scenes.map(\n async (scene) =>\n // The repository-pinned Lite declarations predate direct rebuild completion.\n // eslint-disable-next-line @typescript-eslint/await-thenable, @typescript-eslint/return-await\n await rebuildMaterial(scene, materialRecord.source, {\n rebuildViews: true,\n rebuildFrameGraph: false,\n })\n )\n : [];\n })\n );\n return previousValue;\n },\n onSuccess: (previousValue) => {\n if (previousValue !== undefined) {\n notifyPropertyChanged(texture, key, previousValue, value);\n resourceIndexService.refresh();\n }\n },\n getErrorMessage: (error) => (error instanceof Error ? error.message : \"The texture transform change failed.\"),\n });\n };\n return (\n <div className={classes.section}>\n {GetMetadataRows(metadata, record?.ordinal, texture).map((row) => {\n return (\n <div key={row.id}>\n {typeof row.value === \"boolean\" ? (\n <BooleanBadgePropertyLine label={row.label} uniqueId={row.id} value={row.value} description={row.description} />\n ) : typeof row.value === \"number\" ? (\n <StringifiedPropertyLine label={row.label} uniqueId={row.id} value={row.value} units={row.units} description={row.description} />\n ) : (\n <TextPropertyLine label={row.label} uniqueId={row.id} value={row.value == null ? \"Unavailable\" : row.value} description={row.description} />\n )}\n </div>\n );\n })}\n {transform\n ? TransformFields.map((field) => {\n const id = `transform-${field[0]}`;\n return (\n <TextureTransformField\n key={id}\n transform={transform}\n field={field}\n pending={operations[id]?.pending}\n error={operations[id]?.error}\n commit={commitTransform}\n />\n );\n })\n : undefined}\n {[...consumersByMaterial].map(([material, slots], index) => {\n const materialRecord = GetMaterialRecord(resourceIndexService, material);\n const value = materialRecord\n ? material === materialRecord.source\n ? materialRecord.displayName\n : material.name || materialRecord.displayName\n : \"Unavailable material\";\n const slotNames = slots.join(\", \");\n return (\n <LinkPropertyLine\n key={`consumer-${index}`}\n label={slotNames}\n uniqueId={`consumer-${index}`}\n value={value}\n onLink={\n materialRecord\n ? () => {\n const currentRecord = resourceIndexService.getTextureRecord(texture);\n const stillConsumesTexture = currentRecord?.consumers.some((candidate) => candidate.material === material);\n const currentMaterialRecord = stillConsumesTexture && GetMaterialRecord(resourceIndexService, material);\n if (!resourceIndexService.isDisposed && currentMaterialRecord) {\n selectionService.selectedEntity = material;\n }\n }\n : undefined\n }\n aria-label={materialRecord ? `Open material ${value}, slots ${slotNames}` : undefined}\n />\n );\n })}\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;AAiDA,MAAM,SAAS,GAAG,UAAU,CAAC;AACzB,IAAA,OAAO,EAAE;AACL,QAAA,OAAO,EAAE,MAAM;AACf,QAAA,aAAa,EAAE,QAAQ;QACvB,GAAG,EAAE,MAAM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BAAA,MAAM,oBAAoB,GAAG,aAAa,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,QAAQ,KAAK,QAAQ,CAAC;4BAC1G,MAAM,qBAAqB,GAAG,oBAAoB,IAAI,iBAAiB,CAAC,oBAAoB,EAAE,QAAQ,CAAC;AACvG,4BAAA,IAAI,CAAC,oBAAoB,CAAC,UAAU,IAAI,qBAAqB,EAAE;AAC3D,gCAAA,gBAAgB,CAAC,cAAc,GAAG,QAAQ;4BAC9C;wBACJ;0BACA,SAAS,EAAA,YAAA,EAEP,cAAc,GAAG,CAAA,cAAA,EAAiB,KAAK,CAAA,QAAA,EAAW,SAAS,EAAE,GAAG,SAAS,EAAA,EAhBhF,YAAY,KAAK,CAAA,CAAE,CAiB1B;YAEV,CAAC,CAAC,CAAA,EAAA,CACA;AAEd;;"}
@@ -0,0 +1,83 @@
1
+ import { getMaterialSource, markMaterialUboDirty, rebuildMaterial } from '@babylonjs/lite';
2
+ import { useCallback } from 'react';
3
+ import { o as useObservableState, p as usePropertyChangedNotifier, q as GetMaterialOwningScenes } from './index-Cy8gzpYG.js';
4
+ import { u as useLatestAsyncOperation } from './useLatestAsyncOperation-k59AgA3B.js';
5
+
6
+ function GetOwningScenes(record, material) {
7
+ if (record.scenes.length === 0) {
8
+ throw new Error("Material rebuild requires at least one owning scene.");
9
+ }
10
+ const scenes = GetMaterialOwningScenes(record, material);
11
+ if (!scenes.length) {
12
+ throw new Error("This material is no longer reachable from an inspected scene.");
13
+ }
14
+ return scenes;
15
+ }
16
+ function SameValue(a, b) {
17
+ if (Array.isArray(a) && Array.isArray(b)) {
18
+ return a.length === b.length && a.every((value, index) => Object.is(value, b[index]));
19
+ }
20
+ return Object.is(a, b);
21
+ }
22
+ function ValidateValue(id, value) {
23
+ if (typeof value === "number" && !Number.isFinite(value)) {
24
+ throw new TypeError(`Property "${id}" requires a finite number.`);
25
+ }
26
+ if (Array.isArray(value) && value.some((component) => typeof component !== "number" || !Number.isFinite(component))) {
27
+ throw new TypeError(`Property "${id}" requires finite tuple components.`);
28
+ }
29
+ }
30
+ /**
31
+ * Tracks guarded, per-field Lite edits without creating material inspection snapshots.
32
+ * @param material The selected source or MaterialView.
33
+ * @param resourceIndexService The instance-owned scene resource index.
34
+ * @param selectionService The owning Inspector selection service.
35
+ * @returns The source record, row states, and a guarded mutation callback.
36
+ */
37
+ function useDirectMaterialOperations(material, resourceIndexService, selectionService) {
38
+ const source = getMaterialSource(material);
39
+ const getRecord = useCallback(() => ({ record: resourceIndexService.getMaterialRecord(source) }), [resourceIndexService, source]);
40
+ const { record } = useObservableState(getRecord, resourceIndexService.onChanged);
41
+ const isDisposed = useCallback(() => resourceIndexService.isDisposed, [resourceIndexService]);
42
+ const [operations, runLatestOperation] = useLatestAsyncOperation(material, [resourceIndexService.onDisposed, selectionService.onSelectedEntityChanged], isDisposed);
43
+ const notifyPropertyChanged = usePropertyChangedNotifier();
44
+ const commit = (change) => {
45
+ const { id, propertyOwner = material, oldValue, newValue, apply, invalidate, rebuildFrameGraph } = change;
46
+ const candidateKey = id === "material.name" ? "name" : id.slice(id.lastIndexOf(".") + 1);
47
+ const propertyKey = change.propertyKey ?? (Reflect.has(propertyOwner, candidateKey) ? candidateKey : id);
48
+ runLatestOperation({
49
+ id,
50
+ operationAsync: async () => {
51
+ const currentRecord = resourceIndexService.getMaterialRecord(source);
52
+ if (!currentRecord || resourceIndexService.isDisposed) {
53
+ throw new Error("This material is no longer available in an inspected scene.");
54
+ }
55
+ const owningScenes = GetOwningScenes(currentRecord, material);
56
+ if (SameValue(oldValue, newValue)) {
57
+ return false;
58
+ }
59
+ ValidateValue(id, newValue);
60
+ const scenes = invalidate === "rebuild" ? owningScenes : [];
61
+ await apply();
62
+ if (invalidate === "ubo") {
63
+ markMaterialUboDirty(material);
64
+ }
65
+ else if (invalidate === "rebuild") {
66
+ await Promise.all(scenes.map(async (scene) => await rebuildMaterial(scene, material, { rebuildViews: true, rebuildFrameGraph: rebuildFrameGraph === true })));
67
+ }
68
+ return true;
69
+ },
70
+ onSuccess: (changed) => {
71
+ if (changed) {
72
+ notifyPropertyChanged(propertyOwner, propertyKey, oldValue, newValue);
73
+ resourceIndexService.refresh();
74
+ }
75
+ },
76
+ getErrorMessage: (error) => (error instanceof Error ? error.message : "The material change failed."),
77
+ });
78
+ };
79
+ return { source, record, operations, commit };
80
+ }
81
+
82
+ export { useDirectMaterialOperations as u };
83
+ //# sourceMappingURL=useDirectMaterialOperations-D6V7OtC1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDirectMaterialOperations-D6V7OtC1.js","sources":["../../../../../../../../../../dev/inspector-v2/src/lite/services/panes/properties/materials/useDirectMaterialOperations.ts"],"sourcesContent":["import { getMaterialSource, markMaterialUboDirty, rebuildMaterial, type Material, type SceneContext } from \"@babylonjs/lite\";\nimport { useCallback } from \"react\";\n\nimport { useObservableState } from \"shared-ui-components/modularTool/hooks/observableHooks\";\n\nimport { usePropertyChangedNotifier } from \"../../../../../contexts/propertyContext\";\nimport { type ISelectionService } from \"../../../../../services/selectionService\";\nimport { type ISceneResourceIndexService } from \"../../scene/sceneResourceIndexService\";\nimport { type IMaterialResourceRecord } from \"../../scene/sceneResources\";\nimport { useLatestAsyncOperation } from \"../useLatestAsyncOperation\";\nimport { GetMaterialOwningScenes } from \"./materialReachability\";\n\ntype MaterialChange = Readonly<{\n id: string;\n propertyKey?: PropertyKey;\n propertyOwner?: object;\n oldValue: unknown;\n newValue: unknown;\n apply: () => void | Promise<void>;\n invalidate: \"ubo\" | \"rebuild\" | \"owned\";\n rebuildFrameGraph?: boolean;\n}>;\n\nfunction GetOwningScenes(record: IMaterialResourceRecord, material: Material): readonly SceneContext[] {\n if (record.scenes.length === 0) {\n throw new Error(\"Material rebuild requires at least one owning scene.\");\n }\n const scenes = GetMaterialOwningScenes(record, material);\n if (!scenes.length) {\n throw new Error(\"This material is no longer reachable from an inspected scene.\");\n }\n return scenes;\n}\n\nfunction SameValue(a: unknown, b: unknown): boolean {\n if (Array.isArray(a) && Array.isArray(b)) {\n return a.length === b.length && a.every((value, index) => Object.is(value, b[index]));\n }\n return Object.is(a, b);\n}\n\nfunction ValidateValue(id: string, value: unknown): void {\n if (typeof value === \"number\" && !Number.isFinite(value)) {\n throw new TypeError(`Property \"${id}\" requires a finite number.`);\n }\n if (Array.isArray(value) && value.some((component) => typeof component !== \"number\" || !Number.isFinite(component))) {\n throw new TypeError(`Property \"${id}\" requires finite tuple components.`);\n }\n}\n\n/**\n * Tracks guarded, per-field Lite edits without creating material inspection snapshots.\n * @param material The selected source or MaterialView.\n * @param resourceIndexService The instance-owned scene resource index.\n * @param selectionService The owning Inspector selection service.\n * @returns The source record, row states, and a guarded mutation callback.\n */\nexport function useDirectMaterialOperations(material: Material, resourceIndexService: ISceneResourceIndexService, selectionService: ISelectionService) {\n const source = getMaterialSource(material);\n const getRecord = useCallback(() => ({ record: resourceIndexService.getMaterialRecord(source) }), [resourceIndexService, source]);\n const { record } = useObservableState(getRecord, resourceIndexService.onChanged);\n const isDisposed = useCallback(() => resourceIndexService.isDisposed, [resourceIndexService]);\n const [operations, runLatestOperation] = useLatestAsyncOperation(material, [resourceIndexService.onDisposed, selectionService.onSelectedEntityChanged], isDisposed);\n const notifyPropertyChanged = usePropertyChangedNotifier();\n\n const commit = (change: MaterialChange) => {\n const { id, propertyOwner = material, oldValue, newValue, apply, invalidate, rebuildFrameGraph } = change;\n const candidateKey = id === \"material.name\" ? \"name\" : id.slice(id.lastIndexOf(\".\") + 1);\n const propertyKey = change.propertyKey ?? (Reflect.has(propertyOwner, candidateKey) ? candidateKey : id);\n runLatestOperation({\n id,\n operationAsync: async () => {\n const currentRecord = resourceIndexService.getMaterialRecord(source);\n if (!currentRecord || resourceIndexService.isDisposed) {\n throw new Error(\"This material is no longer available in an inspected scene.\");\n }\n const owningScenes = GetOwningScenes(currentRecord, material);\n if (SameValue(oldValue, newValue)) {\n return false;\n }\n ValidateValue(id, newValue);\n const scenes = invalidate === \"rebuild\" ? owningScenes : [];\n await apply();\n if (invalidate === \"ubo\") {\n markMaterialUboDirty(material);\n } else if (invalidate === \"rebuild\") {\n await Promise.all(scenes.map(async (scene) => await rebuildMaterial(scene, material, { rebuildViews: true, rebuildFrameGraph: rebuildFrameGraph === true })));\n }\n return true;\n },\n onSuccess: (changed) => {\n if (changed) {\n notifyPropertyChanged(propertyOwner, propertyKey, oldValue, newValue);\n resourceIndexService.refresh();\n }\n },\n getErrorMessage: (error) => (error instanceof Error ? error.message : \"The material change failed.\"),\n });\n };\n\n return { source, record, operations, commit };\n}\n"],"names":[],"mappings":";;;;;AAuBA,SAAS,eAAe,CAAC,MAA+B,EAAE,QAAkB,EAAA;IACxE,IAAI,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE;AAC5B,QAAA,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC;IAC3E;IACA,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,EAAE,QAAQ,CAAC;AACxD,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAChB,QAAA,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC;IACpF;AACA,IAAA,OAAO,MAAM;AACjB;AAEA,SAAS,SAAS,CAAC,CAAU,EAAE,CAAU,EAAA;AACrC,IAAA,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;AACtC,QAAA,OAAO,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,KAAK,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;IACzF;IACA,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAC1B;AAEA,SAAS,aAAa,CAAC,EAAU,EAAE,KAAc,EAAA;AAC7C,IAAA,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KAAK,IAAI,EAAE,CAAC,CAAC,CAAC;gBACjK;AACA,gBAAA,OAAO,IAAI;YACf,CAAC;AACD,YAAA,SAAS,EAAE,CAAC,OAAO,KAAI;gBACnB,IAAI,OAAO,EAAE;oBACT,qBAAqB,CAAC,aAAa,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,CAAC;oBACrE,oBAAoB,CAAC,OAAO,EAAE;gBAClC;YACJ,CAAC;YACD,eAAe,EAAE,CAAC,KAAK,MAAM,KAAK,YAAY,KAAK,GAAG,KAAK,CAAC,OAAO,GAAG,6BAA6B,CAAC;AACvG,SAAA,CAAC;AACN,IAAA,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE;AACjD;;"}
@@ -0,0 +1,78 @@
1
+ import { useState, useRef, useEffect, useCallback } from 'react';
2
+
3
+ /**
4
+ * Runs row operations with instance-local generations and invalidates them when their owner changes.
5
+ * Rejections are always consumed, while only the latest mounted generation may publish state or success effects.
6
+ * @param identity The exact entity represented by the mounted adapter.
7
+ * @param invalidationSources Disposal and selection changes that invalidate operation ownership.
8
+ * @param isDisposed Returns whether the owning service has been disposed.
9
+ * @returns The latest operation state for each row and a guarded operation runner.
10
+ */
11
+ function useLatestAsyncOperation(identity, invalidationSources, isDisposed) {
12
+ const [publishedStates, setPublishedStates] = useState({ epoch: -1, rows: {} });
13
+ const epochRef = useRef(0);
14
+ const rowGenerationsRef = useRef(new Map());
15
+ const mountedRef = useRef(false);
16
+ const identityRef = useRef(identity);
17
+ if (identityRef.current !== identity) {
18
+ identityRef.current = identity;
19
+ epochRef.current++;
20
+ rowGenerationsRef.current.clear();
21
+ }
22
+ const [firstInvalidationSource, secondInvalidationSource] = invalidationSources;
23
+ useEffect(() => {
24
+ mountedRef.current = true;
25
+ const invalidate = () => {
26
+ epochRef.current++;
27
+ rowGenerationsRef.current.clear();
28
+ if (mountedRef.current) {
29
+ setPublishedStates({ epoch: epochRef.current, rows: {} });
30
+ }
31
+ };
32
+ const sources = [firstInvalidationSource, secondInvalidationSource];
33
+ const observers = sources.map((source) => source.add(invalidate));
34
+ invalidate();
35
+ return () => {
36
+ mountedRef.current = false;
37
+ epochRef.current++;
38
+ rowGenerationsRef.current.clear();
39
+ observers.forEach((observer) => observer.remove());
40
+ };
41
+ }, [identity, firstInvalidationSource, secondInvalidationSource]);
42
+ const run = useCallback((options) => {
43
+ const { id, operationAsync, onSuccess, getErrorMessage } = options;
44
+ const epoch = epochRef.current;
45
+ const generation = (rowGenerationsRef.current.get(id) ?? 0) + 1;
46
+ rowGenerationsRef.current.set(id, generation);
47
+ setPublishedStates((current) => ({
48
+ epoch,
49
+ rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: true } },
50
+ }));
51
+ void (async () => {
52
+ try {
53
+ const result = await operationAsync();
54
+ if (mountedRef.current && epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation && identityRef.current === identity && !isDisposed()) {
55
+ onSuccess?.(result);
56
+ if (epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation) {
57
+ setPublishedStates((current) => ({
58
+ epoch,
59
+ rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: false } },
60
+ }));
61
+ }
62
+ }
63
+ }
64
+ catch (error) {
65
+ if (mountedRef.current && epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation && identityRef.current === identity && !isDisposed()) {
66
+ setPublishedStates((current) => ({
67
+ epoch,
68
+ rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: false, error: getErrorMessage(error) } },
69
+ }));
70
+ }
71
+ }
72
+ })();
73
+ }, [identity, isDisposed]);
74
+ return [publishedStates.epoch === epochRef.current ? publishedStates.rows : {}, run];
75
+ }
76
+
77
+ export { useLatestAsyncOperation as u };
78
+ //# sourceMappingURL=useLatestAsyncOperation-k59AgA3B.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLatestAsyncOperation-k59AgA3B.js","sources":["../../../../../../../../../../dev/inspector-v2/src/lite/services/panes/properties/useLatestAsyncOperation.ts"],"sourcesContent":["import { type IReadonlyObservable } from \"core/index\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\n\n/** State published by the latest asynchronous row operation. */\nexport type LatestAsyncOperationState = Readonly<{\n pending: boolean;\n error?: string;\n}>;\n\n/** State published independently for each asynchronous row operation. */\nexport type LatestAsyncOperationStates = Readonly<Record<string, LatestAsyncOperationState | undefined>>;\n\ntype PublishedStates = Readonly<{\n epoch: number;\n rows: LatestAsyncOperationStates;\n}>;\n\ntype LatestAsyncOperationOptions<ResultT> = Readonly<{\n id: string;\n operationAsync: () => Promise<ResultT>;\n onSuccess?: (result: ResultT) => void;\n getErrorMessage: (error: unknown) => string;\n}>;\n\n/**\n * Runs row operations with instance-local generations and invalidates them when their owner changes.\n * Rejections are always consumed, while only the latest mounted generation may publish state or success effects.\n * @param identity The exact entity represented by the mounted adapter.\n * @param invalidationSources Disposal and selection changes that invalidate operation ownership.\n * @param isDisposed Returns whether the owning service has been disposed.\n * @returns The latest operation state for each row and a guarded operation runner.\n */\nexport function useLatestAsyncOperation(\n identity: object,\n invalidationSources: readonly [IReadonlyObservable<void>, IReadonlyObservable<void>],\n isDisposed: () => boolean\n): readonly [LatestAsyncOperationStates, <ResultT>(options: LatestAsyncOperationOptions<ResultT>) => void] {\n const [publishedStates, setPublishedStates] = useState<PublishedStates>({ epoch: -1, rows: {} });\n const epochRef = useRef(0);\n const rowGenerationsRef = useRef(new Map<string, number>());\n const mountedRef = useRef(false);\n const identityRef = useRef(identity);\n\n if (identityRef.current !== identity) {\n identityRef.current = identity;\n epochRef.current++;\n rowGenerationsRef.current.clear();\n }\n\n const [firstInvalidationSource, secondInvalidationSource] = invalidationSources;\n\n useEffect(() => {\n mountedRef.current = true;\n const invalidate = () => {\n epochRef.current++;\n rowGenerationsRef.current.clear();\n if (mountedRef.current) {\n setPublishedStates({ epoch: epochRef.current, rows: {} });\n }\n };\n const sources = [firstInvalidationSource, secondInvalidationSource] as const;\n const observers = sources.map((source) => source.add(invalidate));\n invalidate();\n\n return () => {\n mountedRef.current = false;\n epochRef.current++;\n rowGenerationsRef.current.clear();\n observers.forEach((observer) => observer.remove());\n };\n }, [identity, firstInvalidationSource, secondInvalidationSource]);\n\n const run = useCallback(\n <ResultT>(options: LatestAsyncOperationOptions<ResultT>) => {\n const { id, operationAsync, onSuccess, getErrorMessage } = options;\n const epoch = epochRef.current;\n const generation = (rowGenerationsRef.current.get(id) ?? 0) + 1;\n rowGenerationsRef.current.set(id, generation);\n setPublishedStates((current) => ({\n epoch,\n rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: true } },\n }));\n\n void (async () => {\n try {\n const result = await operationAsync();\n if (mountedRef.current && epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation && identityRef.current === identity && !isDisposed()) {\n onSuccess?.(result);\n if (epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation) {\n setPublishedStates((current) => ({\n epoch,\n rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: false } },\n }));\n }\n }\n } catch (error) {\n if (mountedRef.current && epochRef.current === epoch && rowGenerationsRef.current.get(id) === generation && identityRef.current === identity && !isDisposed()) {\n setPublishedStates((current) => ({\n epoch,\n rows: { ...(current.epoch === epoch ? current.rows : {}), [id]: { pending: false, error: getErrorMessage(error) } },\n }));\n }\n }\n })();\n },\n [identity, isDisposed]\n );\n\n return [publishedStates.epoch === epochRef.current ? publishedStates.rows : {}, run] as const;\n}\n"],"names":[],"mappings":";;AAwBA;;;;;;;AAOG;SACa,uBAAuB,CACnC,QAAgB,EAChB,mBAAoF,EACpF,UAAyB,EAAA;AAEzB,IAAA,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAkB,EAAE,KAAK,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAChG,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC;IAC1B,MAAM,iBAAiB,GAAG,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O,CAAC,KAAK,KAAK,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;AACvF,yBAAA,CAAC,CAAC;oBACP;gBACJ;YACJ;YAAE,OAAO,KAAK,EAAE;AACZ,gBAAA,IAAI,UAAU,CAAC,OAAO,IAAI,QAAQ,CAAC,OAAO,KAAK,KAAK,IAAI,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,UAAU,IAAI,WAAW,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,UAAU,EAAE,EAAE;AAC3J,oBAAA,kBAAkB,CAAC,CAAC,OAAO,MAAM;wBAC7B,KAAK;AACL,wBAAA,IAAI,EAAE,EAAE,IAAI,OAAO,CAAC,KAAK,KAAK,KAAK,GAAG,OAAO,CAAC,IAAI,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,EAAE,EAAE;AACtH,qBAAA,CAAC,CAAC;gBACP;YACJ;QACJ,CAAC,GAAG;AACR,IAAA,CAAC,EACD,CAAC,QAAQ,EAAE,UAAU,CAAC,CACzB;IAED,OAAO,CAAC,eAAe,CAAC,KAAK,KAAK,QAAQ,CAAC,OAAO,GAAG,eAAe,CAAC,IAAI,GAAG,EAAE,EAAE,GAAG,CAAU;AACjG;;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { P as Popover, a as useToast, b as useInterceptObservable, B as Button, c as LinkToEntity, T as TextInputPropertyLine, d as SpinButtonPropertyLine, C as CheckboxPropertyLine, V as Vector3PropertyLine, e as useProperty, M as MessageBar, S as ShellServiceIdentity, f as SceneContextIdentity, g as SelectionServiceIdentity, h as useObservableState, A as Accordion, i as AccordionSection } from './index-CZ1-Y-Rv.js';
2
+ import { P as Popover, a as useToast, b as useInterceptObservable, B as Button, c as LinkToEntity, T as TextInputPropertyLine, d as SpinButtonPropertyLine, C as CheckboxPropertyLine, V as Vector3PropertyLine, e as useProperty, M as MessageBar, S as ShellServiceIdentity, f as SceneContextIdentity, g as SelectionServiceIdentity, h as useObservableState, A as Accordion, i as AccordionSection } from './index-DbbhJJ1G.js';
3
3
  import { SettingsRegular, CollectionsAdd20Regular } from '@fluentui/react-icons';
4
4
  import '@babylonjs/core/Particles/webgl2ParticleSystem.js';
5
5
  import '@babylonjs/core/Rendering/prePassRendererSceneComponent.js';
@@ -125,6 +125,9 @@ import '@babylonjs/core/Meshes/meshBlendingTag.js';
125
125
  import '@babylonjs/core/Rendering/renderingManager.js';
126
126
  import '@babylonjs/core/Rendering/edgesRenderer.js';
127
127
  import '@babylonjs/core/Rendering/outlineRenderer.js';
128
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingMaterial.js';
129
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingSizeMaterialPlugin.js';
130
+ import '@babylonjs/core/Materials/GaussianSplatting/gaussianSplattingOverdrawMaterialPlugin.js';
128
131
  import '@babylonjs/core/Particles/Node/nodeParticleSystemSet.helper.js';
129
132
  import '@babylonjs/core/Particles/particleHelper.js';
130
133
  import '@babylonjs/core/Particles/EmitterTypes/boxParticleEmitter.js';
@@ -791,4 +794,4 @@ var quickCreateToolsService = {
791
794
  };
792
795
 
793
796
  export { CreateToolsServiceDefinition, quickCreateToolsService as default };
794
- //# sourceMappingURL=quickCreateToolsService-owfaw163.js.map
797
+ //# sourceMappingURL=quickCreateToolsService-Cs46Amv7.js.map