@babylonjs/inspector 8.46.1-preview → 8.46.2-preview

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { createContext, useContext, useCallback, useMemo, useEffect, useState, useRef, forwardRef, isValidElement, cloneElement, Children, useLayoutEffect, useImperativeHandle, createElement, Suspense, useReducer, lazy } from 'react';
2
+ import { createContext, useContext, useCallback, useMemo, useEffect, useState, useRef, forwardRef, isValidElement, cloneElement, Children, useLayoutEffect, useImperativeHandle, createElement, Suspense, Fragment as Fragment$1, useReducer, lazy } from 'react';
3
3
  import { Color3, Color4 } from '@babylonjs/core/Maths/math.color.js';
4
4
  import { Vector3, Quaternion, Matrix, Vector2, Vector4, TmpVectors } from '@babylonjs/core/Maths/math.vector.js';
5
5
  import { Observable } from '@babylonjs/core/Misc/observable.js';
6
6
  import { GetClassName } from '@babylonjs/core/Misc/typeStore.js';
7
- import { makeStyles, Link as Link$1, Caption1, Body1, ToggleButton as ToggleButton$1, Button as Button$1, Spinner, tokens, InfoLabel as InfoLabel$1, Body1Strong, Tooltip, Checkbox as Checkbox$1, mergeClasses, Accordion as Accordion$1, AccordionItem, AccordionHeader, Subtitle2Stronger, AccordionPanel, Divider, createLightTheme, createDarkTheme, FluentProvider, TeachingPopover, TeachingPopoverSurface, TeachingPopoverHeader, TeachingPopoverBody, Portal, RendererProvider, createDOMRenderer, Menu, MenuTrigger, SplitButton, MenuPopover, MenuList, MenuItem, Toolbar as Toolbar$1, ToolbarRadioButton, MenuGroup, MenuGroupHeader, SearchBox as SearchBox$1, FlatTree, FlatTreeItem, TreeItemLayout, MenuDivider, treeItemLevelToken, MenuItemCheckbox, Switch as Switch$1, PresenceBadge, useId, SpinButton as SpinButton$1, Slider, Input, Dropdown as Dropdown$1, Option, Popover as Popover$1, PopoverTrigger, PopoverSurface, ColorPicker, ColorArea, ColorSlider, AlphaSlider, ColorSwatch, MenuItemRadio, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, DialogActions, List as List$1, ListItem, Badge, MessageBar as MessageBar$1, MessageBarBody, MessageBarTitle, useComboboxFilter, Combobox, Textarea as Textarea$1, ToolbarButton, Label, ToolbarDivider, Field } from '@fluentui/react-components';
8
- import { ChevronCircleRight16Regular, ChevronCircleRight20Regular, ChevronCircleDown16Regular, ChevronCircleDown20Regular, Copy16Regular, Copy20Regular, PanelLeftExpandRegular, PanelRightExpandRegular, PanelLeftContractRegular, PanelRightContractRegular, PictureInPictureEnterRegular, MoreHorizontalRegular, LayoutColumnTwoFocusLeftFilled, LayoutColumnTwoSplitLeftFocusTopLeftFilled, LayoutColumnTwoSplitLeftFocusBottomLeftFilled, LayoutColumnTwoFocusRightFilled, LayoutColumnTwoSplitRightFocusTopRightFilled, LayoutColumnTwoSplitRightFocusBottomRightFilled, DocumentTextRegular, createFluentIcon, FilterRegular, GlobeRegular, ArrowExpandAllRegular, ArrowCollapseAllRegular, CubeTreeRegular, BugRegular, SettingsRegular, ArrowUploadRegular, DataBarHorizontalRegular, WrenchRegular, WeatherSunnyRegular, WeatherMoonRegular, ErrorCircleRegular, ArrowRotateClockwiseRegular, ArrowExpandRegular, SelectObjectRegular, CubeRegular, DeleteRegular, PlayRegular, EditRegular, LinkDismissRegular, LinkEditRegular, SaveRegular, ArrowUndoRegular, BracesRegular, BracesDismiss16Regular, CopyRegular, EyeOffFilled, EyeFilled, ArrowMoveFilled, EyeRegular, StopRegular, ArrowDownloadRegular, CloudArrowUpRegular, CloudArrowDownRegular, StopFilled, PlayFilled, EyeOffRegular, LockOpenRegular, LockClosedRegular, ResizeRegular, ChevronUpRegular, ChevronDownRegular, ArrowResetRegular, CircleHalfFillRegular, EyedropperRegular, PaintBucketRegular, InkStrokeRegular, StackRegular, FilmstripRegular, PauseFilled, WeatherSunnyLowFilled, LayerRegular, FrameRegular, AppGenericRegular, RectangleLandscapeRegular, BorderOutsideRegular, BorderNoneRegular, MyLocationRegular, CameraRegular, LightbulbRegular, VideoFilled, VideoRegular, FlashlightRegular, FlashlightOffRegular, DropRegular, BlurRegular, PipelineRegular, PersonWalkingRegular, DataLineRegular, PersonSquareRegular, LayerDiagonalPersonRegular, ImageEditRegular, ImageRegular, TargetRegular, PersonFeedbackRegular, BranchRegular, DeleteFilled } from '@fluentui/react-icons';
7
+ import { makeStyles, Link as Link$1, Caption1, Body1, ToggleButton as ToggleButton$1, Button as Button$1, Spinner, tokens, InfoLabel as InfoLabel$1, Body1Strong, Tooltip, Checkbox as Checkbox$1, mergeClasses, Accordion as Accordion$1, AccordionItem, AccordionHeader, Subtitle2Stronger, AccordionPanel, Divider, createLightTheme, createDarkTheme, FluentProvider, TeachingPopover, TeachingPopoverSurface, TeachingPopoverHeader, TeachingPopoverBody, Portal, RendererProvider, createDOMRenderer, Menu, MenuTrigger, SplitButton, MenuPopover, MenuList, MenuItem, Toolbar as Toolbar$1, ToolbarRadioButton, MenuGroup, MenuGroupHeader, SearchBox as SearchBox$1, FlatTree, FlatTreeItem, TreeItemLayout, MenuDivider, treeItemLevelToken, MenuItemCheckbox, Switch as Switch$1, PresenceBadge, useId, SpinButton as SpinButton$1, Slider, Input, Dropdown as Dropdown$1, Option, Popover as Popover$1, PopoverTrigger, PopoverSurface, ColorPicker, ColorArea, ColorSlider, AlphaSlider, ColorSwatch, MenuItemRadio, Dialog, DialogSurface, DialogBody, DialogTitle, DialogContent, DialogActions, List as List$1, ListItem, Badge, MessageBar as MessageBar$1, MessageBarBody, MessageBarTitle, Subtitle2, useComboboxFilter, Combobox, Textarea as Textarea$1, ToolbarButton, Label, ToolbarDivider, Field } from '@fluentui/react-components';
8
+ import { ChevronCircleRight16Regular, ChevronCircleRight20Regular, ChevronCircleDown16Regular, ChevronCircleDown20Regular, Copy16Regular, Copy20Regular, PanelLeftExpandRegular, PanelRightExpandRegular, PanelLeftContractRegular, PanelRightContractRegular, PictureInPictureEnterRegular, MoreHorizontalRegular, LayoutColumnTwoFocusLeftFilled, LayoutColumnTwoSplitLeftFocusTopLeftFilled, LayoutColumnTwoSplitLeftFocusBottomLeftFilled, LayoutColumnTwoFocusRightFilled, LayoutColumnTwoSplitRightFocusTopRightFilled, LayoutColumnTwoSplitRightFocusBottomRightFilled, DocumentTextRegular, createFluentIcon, FilterRegular, GlobeRegular, ArrowExpandAllRegular, ArrowCollapseAllRegular, CubeTreeRegular, BugRegular, SettingsRegular, ArrowUploadRegular, DataBarHorizontalRegular, WrenchRegular, WeatherSunnyRegular, WeatherMoonRegular, ErrorCircleRegular, ArrowRotateClockwiseRegular, ArrowExpandRegular, SelectObjectRegular, CubeRegular, DeleteRegular, PlayRegular, EditRegular, AddRegular, CopyRegular, LinkDismissRegular, LinkEditRegular, SaveRegular, ArrowUndoRegular, BracesRegular, BracesDismiss16Regular, EyeOffFilled, EyeFilled, ArrowMoveFilled, EyeRegular, StopRegular, ArrowDownloadRegular, CloudArrowUpRegular, CloudArrowDownRegular, StopFilled, PlayFilled, EyeOffRegular, LockOpenRegular, LockClosedRegular, ResizeRegular, ChevronUpRegular, ChevronDownRegular, ArrowResetRegular, CircleHalfFillRegular, EyedropperRegular, PaintBucketRegular, InkStrokeRegular, StackRegular, FilmstripRegular, PauseFilled, WeatherSunnyLowFilled, LayerRegular, FrameRegular, AppGenericRegular, RectangleLandscapeRegular, BorderOutsideRegular, BorderNoneRegular, MyLocationRegular, CameraRegular, LightbulbRegular, VideoFilled, VideoRegular, FlashlightRegular, FlashlightOffRegular, DropRegular, BlurRegular, PipelineRegular, PersonWalkingRegular, DataLineRegular, PersonSquareRegular, LayerDiagonalPersonRegular, ImageEditRegular, ImageRegular, TargetRegular, PersonFeedbackRegular, BranchRegular, DeleteFilled } from '@fluentui/react-icons';
9
9
  import { Collapse as Collapse$1, Fade } from '@fluentui/react-motion-components-preview';
10
10
  import { useLocalStorage, useTernaryDarkMode } from 'usehooks-ts';
11
11
  import { AsyncLock } from '@babylonjs/core/Misc/asyncLock.js';
@@ -72,6 +72,9 @@ import { SkyMaterial } from '@babylonjs/materials/sky/skyMaterial.js';
72
72
  import { Constants } from '@babylonjs/core/Engines/constants.js';
73
73
  import { Engine } from '@babylonjs/core/Engines/engine.js';
74
74
  import { ParticleSystem } from '@babylonjs/core/Particles/particleSystem.js';
75
+ import { GradientBlockColorStep } from '@babylonjs/core/Materials/Node/Blocks/gradientBlock.js';
76
+ import { NodeMaterialBlockConnectionPointTypes } from '@babylonjs/core/Materials/Node/Enums/nodeMaterialBlockConnectionPointTypes.js';
77
+ import { FactorGradient, Color3Gradient, ColorGradient } from '@babylonjs/core/Misc/gradients.js';
75
78
  import { ReadFile } from '@babylonjs/core/Misc/fileTools.js';
76
79
  import { CubeTexture } from '@babylonjs/core/Materials/Textures/cubeTexture.js';
77
80
  import { GaussianSplattingMesh } from '@babylonjs/core/Meshes/GaussianSplatting/gaussianSplattingMesh.js';
@@ -93,14 +96,19 @@ import { SphereParticleEmitter } from '@babylonjs/core/Particles/EmitterTypes/sp
93
96
  import { ConvertToNodeParticleSystemSetAsync } from '@babylonjs/core/Particles/Node/nodeParticleSystemSet.helper.js';
94
97
  import { GPUParticleSystem } from '@babylonjs/core/Particles/gpuParticleSystem.js';
95
98
  import { ParticleHelper } from '@babylonjs/core/Particles/particleHelper.js';
96
- import { FactorGradient, Color3Gradient, ColorGradient } from '@babylonjs/core/Misc/gradients.js';
97
- import { GradientBlockColorStep } from '@babylonjs/core/Materials/Node/Blocks/gradientBlock.js';
98
99
  import { Attractor } from '@babylonjs/core/Particles/attractor.js';
99
100
  import { CreateSphere } from '@babylonjs/core/Meshes/Builders/sphereBuilder.js';
100
101
  import { TransformNode } from '@babylonjs/core/Meshes/transformNode.js';
101
102
  import { PhysicsPrestepType } from '@babylonjs/core/Physics/v2/IPhysicsEnginePlugin.js';
102
103
  import '@babylonjs/core/Physics/v2/physicsEngineComponent.js';
103
104
  import { PostProcess } from '@babylonjs/core/PostProcesses/postProcess.js';
105
+ import { PostProcessRenderPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/postProcessRenderPipeline.js';
106
+ import { DefaultRenderingPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/defaultRenderingPipeline.js';
107
+ import { LensRenderingPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/lensRenderingPipeline.js';
108
+ import { SSAORenderingPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/ssaoRenderingPipeline.js';
109
+ import { SSAO2RenderingPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/ssao2RenderingPipeline.js';
110
+ import { SSRRenderingPipeline } from '@babylonjs/core/PostProcesses/RenderPipeline/Pipelines/ssrRenderingPipeline.js';
111
+ import { IblShadowsRenderPipeline } from '@babylonjs/core/Rendering/IBLShadows/iblShadowsRenderPipeline.js';
104
112
  import { ImageProcessingConfiguration } from '@babylonjs/core/Materials/imageProcessingConfiguration.js';
105
113
  import { Skeleton } from '@babylonjs/core/Bones/skeleton.js';
106
114
  import { Sprite } from '@babylonjs/core/Sprites/sprite.js';
@@ -824,7 +832,7 @@ const Link = forwardRef((props, ref) => {
824
832
  });
825
833
  Link.displayName = "Link";
826
834
 
827
- const useStyles$t = makeStyles({
835
+ const useStyles$u = makeStyles({
828
836
  button: {
829
837
  display: "flex",
830
838
  alignItems: "center",
@@ -842,7 +850,7 @@ const ToggleButton = (props) => {
842
850
  ToggleButton.displayName = "ToggleButton";
843
851
  const { value, onChange, title, appearance = "subtle" } = props;
844
852
  const { size } = useContext(ToolContext);
845
- const classes = useStyles$t();
853
+ const classes = useStyles$u();
846
854
  const [checked, setChecked] = useState(value);
847
855
  const toggle = useCallback(() => {
848
856
  setChecked((prev) => {
@@ -1102,7 +1110,7 @@ const LinkToEntityPropertyLine = (props) => {
1102
1110
  !linkedEntity.reservedDataStore?.hidden && jsx(LinkPropertyLine, { ...rest, value: linkedEntity.name, onLink: () => (selectionService.selectedEntity = linkedEntity) }));
1103
1111
  };
1104
1112
 
1105
- const useStyles$s = makeStyles({
1113
+ const useStyles$t = makeStyles({
1106
1114
  accordion: {
1107
1115
  overflowX: "hidden",
1108
1116
  overflowY: "auto",
@@ -1146,13 +1154,13 @@ const useStyles$s = makeStyles({
1146
1154
  });
1147
1155
  const AccordionSection = (props) => {
1148
1156
  AccordionSection.displayName = "AccordionSection";
1149
- const classes = useStyles$s();
1157
+ const classes = useStyles$t();
1150
1158
  return jsx("div", { className: classes.panelDiv, children: props.children });
1151
1159
  };
1152
1160
  const StringAccordion = Accordion$1;
1153
1161
  const Accordion = forwardRef((props, ref) => {
1154
1162
  Accordion.displayName = "Accordion";
1155
- const classes = useStyles$s();
1163
+ const classes = useStyles$t();
1156
1164
  const { size } = useContext(ToolContext);
1157
1165
  const { children, highlightSections, ...rest } = props;
1158
1166
  const validChildren = useMemo(() => {
@@ -1283,7 +1291,7 @@ const CompactModeContextProvider = (props) => {
1283
1291
  function AsReadonlyArray(array) {
1284
1292
  return array;
1285
1293
  }
1286
- const useStyles$r = makeStyles({
1294
+ const useStyles$s = makeStyles({
1287
1295
  rootDiv: {
1288
1296
  flex: 1,
1289
1297
  overflow: "hidden",
@@ -1292,7 +1300,7 @@ const useStyles$r = makeStyles({
1292
1300
  },
1293
1301
  });
1294
1302
  function ExtensibleAccordion(props) {
1295
- const classes = useStyles$r();
1303
+ const classes = useStyles$s();
1296
1304
  const { children, sections, sectionContent, context, sectionsRef } = props;
1297
1305
  const defaultSections = useMemo(() => {
1298
1306
  const defaultSections = [];
@@ -1397,7 +1405,7 @@ function ExtensibleAccordion(props) {
1397
1405
  })] }) })) }));
1398
1406
  }
1399
1407
 
1400
- const useStyles$q = makeStyles({
1408
+ const useStyles$r = makeStyles({
1401
1409
  paneRootDiv: {
1402
1410
  display: "flex",
1403
1411
  flex: 1,
@@ -1410,7 +1418,7 @@ const useStyles$q = makeStyles({
1410
1418
  */
1411
1419
  const SidePaneContainer = forwardRef((props, ref) => {
1412
1420
  const { className, ...rest } = props;
1413
- const classes = useStyles$q();
1421
+ const classes = useStyles$r();
1414
1422
  return (jsx("div", { className: mergeClasses(classes.paneRootDiv, className), ref: ref, ...rest, children: props.children }));
1415
1423
  });
1416
1424
 
@@ -1476,7 +1484,7 @@ const Theme = (props) => {
1476
1484
  return (jsx(FluentProvider, { theme: isDarkMode !== invert ? DarkTheme : LightTheme, applyStylesToPortals: applyStylesToPortals, ...rest, children: props.children }));
1477
1485
  };
1478
1486
 
1479
- const useStyles$p = makeStyles({
1487
+ const useStyles$q = makeStyles({
1480
1488
  extensionTeachingPopover: {
1481
1489
  maxWidth: "320px",
1482
1490
  },
@@ -1487,7 +1495,7 @@ const useStyles$p = makeStyles({
1487
1495
  * @returns The teaching moment popover.
1488
1496
  */
1489
1497
  const TeachingMoment = ({ shouldDisplay, positioningRef, onOpenChange, title, description }) => {
1490
- const classes = useStyles$p();
1498
+ const classes = useStyles$q();
1491
1499
  return (jsx(TeachingPopover, { appearance: "brand", open: shouldDisplay, positioning: { positioningRef }, onOpenChange: onOpenChange, children: jsxs(TeachingPopoverSurface, { className: classes.extensionTeachingPopover, children: [jsx(TeachingPopoverHeader, { children: title }), jsx(TeachingPopoverBody, { children: description })] }) }));
1492
1500
  };
1493
1501
 
@@ -1742,13 +1750,13 @@ function ConstructorFactory(constructor) {
1742
1750
  return (...args) => new constructor(...args);
1743
1751
  }
1744
1752
 
1745
- const useStyles$o = makeStyles({
1753
+ const useStyles$p = makeStyles({
1746
1754
  placeholderDiv: {
1747
1755
  padding: `${tokens.spacingVerticalM} ${tokens.spacingHorizontalM}`,
1748
1756
  },
1749
1757
  });
1750
1758
  const PropertiesPane = (props) => {
1751
- const classes = useStyles$o();
1759
+ const classes = useStyles$p();
1752
1760
  const entity = props.context;
1753
1761
  return entity != null ? (jsx(ExtensibleAccordion, { ...props })) : (jsx("div", { className: classes.placeholderDiv, children: jsx(Body1Strong, { italic: true, children: "No entity selected." }) }));
1754
1762
  };
@@ -1773,7 +1781,7 @@ function ToFeaturesString(options) {
1773
1781
  features.push({ key: "location", value: "no" });
1774
1782
  return features.map((feature) => `${feature.key}=${feature.value}`).join(",");
1775
1783
  }
1776
- const useStyles$n = makeStyles({
1784
+ const useStyles$o = makeStyles({
1777
1785
  container: {
1778
1786
  display: "flex",
1779
1787
  flexGrow: 1,
@@ -1788,7 +1796,7 @@ const useStyles$n = makeStyles({
1788
1796
  */
1789
1797
  const ChildWindow = (props) => {
1790
1798
  const { id, children, onOpenChange, imperativeRef: imperativeRef } = props;
1791
- const classes = useStyles$n();
1799
+ const classes = useStyles$o();
1792
1800
  const [windowState, setWindowState] = useState();
1793
1801
  const [childWindow, setChildWindow] = useState();
1794
1802
  const storageKey = id ? `Babylon/Settings/ChildWindow/${id}/Bounds` : null;
@@ -2000,7 +2008,7 @@ function useResizeHandle(params) {
2000
2008
 
2001
2009
  const RootComponentServiceIdentity = Symbol("RootComponent");
2002
2010
  const ShellServiceIdentity = Symbol("ShellService");
2003
- const useStyles$m = makeStyles({
2011
+ const useStyles$n = makeStyles({
2004
2012
  mainView: {
2005
2013
  flex: 1,
2006
2014
  display: "flex",
@@ -2186,12 +2194,12 @@ const DockMenu = (props) => {
2186
2194
  };
2187
2195
  const PaneHeader = (props) => {
2188
2196
  const { id, title, dockOptions } = props;
2189
- const classes = useStyles$m();
2197
+ const classes = useStyles$n();
2190
2198
  return (jsx(Theme, { invert: true, children: jsxs("div", { className: classes.paneHeaderDiv, children: [jsx(Subtitle2Stronger, { className: classes.paneHeaderText, children: title }), jsx(DockMenu, { sidePaneId: id, dockOptions: dockOptions, children: jsx(Button$1, { className: classes.paneHeaderButton, appearance: "transparent", icon: jsx(MoreHorizontalRegular, {}) }) })] }) }));
2191
2199
  };
2192
2200
  // This is a wrapper for an item in a toolbar that simply adds a teaching moment, which is useful for dynamically added items, possibly from extensions.
2193
2201
  const ToolbarItem = ({ verticalLocation, horizontalLocation, id, component: Component, displayName: displayName, suppressTeachingMoment }) => {
2194
- const classes = useStyles$m();
2202
+ const classes = useStyles$n();
2195
2203
  const useTeachingMoment = useMemo(() => MakePopoverTeachingMoment(`Bar/${verticalLocation}/${horizontalLocation}/${displayName ?? id}`), [displayName, id]);
2196
2204
  const teachingMoment = useTeachingMoment(suppressTeachingMoment);
2197
2205
  return (jsxs(Fragment, { children: [jsx(TeachingMoment, { ...teachingMoment, shouldDisplay: teachingMoment.shouldDisplay && !suppressTeachingMoment, title: displayName ?? "Extension", description: `The "${displayName ?? id}" extension can be accessed here.` }), jsx("div", { className: classes.barItem, ref: teachingMoment.targetRef, children: jsx(Component, {}) })] }));
@@ -2199,7 +2207,7 @@ const ToolbarItem = ({ verticalLocation, horizontalLocation, id, component: Comp
2199
2207
  // TODO: Handle overflow, possibly via https://react.fluentui.dev/?path=/docs/components-overflow--docs with priority.
2200
2208
  // This component just renders a toolbar with left aligned toolbar items on the left and right aligned toolbar items on the right.
2201
2209
  const Toolbar = ({ location, components }) => {
2202
- const classes = useStyles$m();
2210
+ const classes = useStyles$n();
2203
2211
  const leftComponents = useMemo(() => components.filter((entry) => entry.horizontalLocation === "left"), [components]);
2204
2212
  const rightComponents = useMemo(() => components.filter((entry) => entry.horizontalLocation === "right"), [components]);
2205
2213
  return (jsx(Fragment, { children: components.length > 0 && (jsxs("div", { className: `${classes.bar} ${location === "top" ? classes.barTop : null}`, children: [jsx("div", { className: classes.barLeft, children: leftComponents.map((entry) => (jsx(ToolbarItem, { verticalLocation: location, horizontalLocation: entry.horizontalLocation, id: entry.key, component: entry.component, displayName: entry.displayName, suppressTeachingMoment: entry.suppressTeachingMoment }, entry.key))) }), jsx("div", { className: classes.barRight, children: rightComponents.map((entry) => (jsx(ToolbarItem, { verticalLocation: location, horizontalLocation: entry.horizontalLocation, id: entry.key, component: entry.component, displayName: entry.displayName, suppressTeachingMoment: entry.suppressTeachingMoment }, entry.key))) })] })) }));
@@ -2209,7 +2217,7 @@ const SidePaneTab = (props) => {
2209
2217
  const { location, id, isSelected, dockOptions,
2210
2218
  // eslint-disable-next-line @typescript-eslint/naming-convention
2211
2219
  icon: Icon, title, suppressTeachingMoment, } = props;
2212
- const classes = useStyles$m();
2220
+ const classes = useStyles$n();
2213
2221
  const useTeachingMoment = useMemo(() => MakePopoverTeachingMoment(`Pane/${location}/${title ?? id}`), [title, id]);
2214
2222
  const teachingMoment = useTeachingMoment(suppressTeachingMoment);
2215
2223
  const tabClass = mergeClasses(classes.tab, isSelected ? undefined : classes.unselectedTab);
@@ -2222,7 +2230,7 @@ const SidePaneTab = (props) => {
2222
2230
  // In "compact" mode, the tab list is integrated into the pane itself.
2223
2231
  // In "full" mode, the returned tab list is later injected into the toolbar.
2224
2232
  function usePane(location, defaultWidth, minWidth, sidePanes, onSelectSidePane, dockOperations, toolbarMode, topBarItems, bottomBarItems) {
2225
- const classes = useStyles$m();
2233
+ const classes = useStyles$n();
2226
2234
  const [topSelectedTab, setTopSelectedTab] = useState();
2227
2235
  const [bottomSelectedTab, setBottomSelectedTab] = useState();
2228
2236
  const [collapsed, setCollapsed] = useState(false);
@@ -2413,7 +2421,7 @@ function MakeShellServiceDefinition({ leftPaneDefaultWidth = 350, leftPaneMinWid
2413
2421
  undock: () => onDockChanged.notifyObservers({ location: "right", dock: false }),
2414
2422
  };
2415
2423
  const rootComponent = () => {
2416
- const classes = useStyles$m();
2424
+ const classes = useStyles$n();
2417
2425
  const [sidePaneDockOverrides, setSidePaneDockOverrides] = useSidePaneDockOverrides();
2418
2426
  // This function returns a promise that resolves after the dock change takes effect so that
2419
2427
  // we can then select the re-docked pane.
@@ -2848,7 +2856,7 @@ function useCommandContextMenuState(commands) {
2848
2856
  checkmark: command.icon ? null : undefined, icon: command.icon ? jsx(command.icon, {}) : undefined, name: "toggleCommands", value: command.displayName, children: command.displayName }, command.displayName)));
2849
2857
  return [checkedContextMenuItems, onContextMenuCheckedValueChange, contextMenuItems];
2850
2858
  }
2851
- const useStyles$l = makeStyles({
2859
+ const useStyles$m = makeStyles({
2852
2860
  rootDiv: {
2853
2861
  flex: 1,
2854
2862
  overflow: "hidden",
@@ -2916,14 +2924,14 @@ function MakeInlineCommandElement(command, isPlaceholder) {
2916
2924
  }
2917
2925
  const SceneTreeItem = (props) => {
2918
2926
  const { isSelected, select } = props;
2919
- const classes = useStyles$l();
2927
+ const classes = useStyles$m();
2920
2928
  const [compactMode] = useCompactMode();
2921
2929
  const treeItemLayoutClass = mergeClasses(classes.sceneTreeItemLayout, compactMode ? classes.treeItemLayoutCompact : undefined);
2922
2930
  return (jsx(FlatTreeItem, { value: "scene", itemType: "leaf", parentValue: undefined, "aria-level": 1, "aria-setsize": 1, "aria-posinset": 1, onClick: select, children: jsx(TreeItemLayout, { iconBefore: jsx(GlobeRegular, {}), className: treeItemLayoutClass, style: isSelected ? { backgroundColor: tokens.colorNeutralBackground1Selected } : undefined, children: jsx(Body1Strong, { wrap: false, truncate: true, children: "Scene" }) }) }, "scene"));
2923
2931
  };
2924
2932
  const SectionTreeItem = (props) => {
2925
2933
  const { section, isFiltering, commandProviders, expandAll, collapseAll } = props;
2926
- const classes = useStyles$l();
2934
+ const classes = useStyles$m();
2927
2935
  const [compactMode] = useCompactMode();
2928
2936
  // Get the commands that apply to this section.
2929
2937
  const commands = useResource(useCallback(() => {
@@ -2940,7 +2948,7 @@ const SectionTreeItem = (props) => {
2940
2948
  };
2941
2949
  const EntityTreeItem = (props) => {
2942
2950
  const { entityItem, isSelected, select, isFiltering, commandProviders, expandAll, collapseAll } = props;
2943
- const classes = useStyles$l();
2951
+ const classes = useStyles$m();
2944
2952
  const [compactMode] = useCompactMode();
2945
2953
  const hasChildren = !!entityItem.children?.length;
2946
2954
  const displayInfo = useResource(useCallback(() => {
@@ -3033,7 +3041,7 @@ const EntityTreeItem = (props) => {
3033
3041
  }, children: jsx(Body1, { wrap: false, truncate: true, children: name }) }) }, entityItem.entity.uniqueId) }), jsx(MenuPopover, { hidden: !hasChildren && contextMenuCommands.length === 0, children: jsxs(MenuList, { children: [hasChildren && (jsxs(Fragment, { children: [jsx(MenuItem, { icon: jsx(ArrowExpandAllRegular, {}), onClick: expandAll, children: jsx(Body1, { children: "Expand All" }) }), jsx(MenuItem, { icon: jsx(ArrowCollapseAllRegular, {}), onClick: collapseAll, children: jsx(Body1, { children: "Collapse All" }) })] })), hasChildren && contextMenuCommands.length > 0 && jsx(MenuDivider, {}), contextMenuItems] }) })] }));
3034
3042
  };
3035
3043
  const SceneExplorer = (props) => {
3036
- const classes = useStyles$l();
3044
+ const classes = useStyles$m();
3037
3045
  const { sections, entityCommandProviders, sectionCommandProviders, scene, selectedEntity } = props;
3038
3046
  const [openItems, setOpenItems] = useState(new Set());
3039
3047
  const [sceneVersion, setSceneVersion] = useState(0);
@@ -3842,14 +3850,14 @@ const TextPropertyLine = (props) => {
3842
3850
  return (jsx(PropertyLine, { ...props, children: jsx(Body1, { title: title, children: value }) }));
3843
3851
  };
3844
3852
 
3845
- const useStyles$k = makeStyles({
3853
+ const useStyles$l = makeStyles({
3846
3854
  pinnedStatsPane: {
3847
3855
  flex: "0 1 auto",
3848
3856
  paddingBottom: tokens.spacingHorizontalM,
3849
3857
  },
3850
3858
  });
3851
3859
  const StatsPane = (props) => {
3852
- const classes = useStyles$k();
3860
+ const classes = useStyles$l();
3853
3861
  const scene = props.context;
3854
3862
  const engine = scene.getEngine();
3855
3863
  const fps = useObservableState(() => Math.round(engine.getFps()), engine.onBeginFrameObservable);
@@ -4027,7 +4035,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
4027
4035
  keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
4028
4036
  ...BabylonWebResources,
4029
4037
  author: { name: "Alex Chuber", forumUserName: "alexchuber" },
4030
- getExtensionModuleAsync: async () => await import('./exportService-Bh80tA6P.js'),
4038
+ getExtensionModuleAsync: async () => await import('./exportService-BeoxdZ9I.js'),
4031
4039
  },
4032
4040
  {
4033
4041
  name: "Capture Tools",
@@ -4035,7 +4043,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
4035
4043
  keywords: ["capture", "screenshot", "gif", "video", "tools"],
4036
4044
  ...BabylonWebResources,
4037
4045
  author: { name: "Alex Chuber", forumUserName: "alexchuber" },
4038
- getExtensionModuleAsync: async () => await import('./captureService-CoxrGxaU.js'),
4046
+ getExtensionModuleAsync: async () => await import('./captureService-CW8jU858.js'),
4039
4047
  },
4040
4048
  {
4041
4049
  name: "Import Tools",
@@ -4043,7 +4051,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
4043
4051
  keywords: ["import", "tools"],
4044
4052
  ...BabylonWebResources,
4045
4053
  author: { name: "Alex Chuber", forumUserName: "alexchuber" },
4046
- getExtensionModuleAsync: async () => await import('./importService-TdRBtTlS.js'),
4054
+ getExtensionModuleAsync: async () => await import('./importService-QIUE0UCV.js'),
4047
4055
  },
4048
4056
  {
4049
4057
  name: "Quick Creation Tools (Preview)",
@@ -4051,7 +4059,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
4051
4059
  keywords: ["creation", "tools"],
4052
4060
  ...BabylonWebResources,
4053
4061
  author: { name: "Babylon.js", forumUserName: "" },
4054
- getExtensionModuleAsync: async () => await import('./quickCreateToolsService-hEV1m5Nc.js'),
4062
+ getExtensionModuleAsync: async () => await import('./quickCreateToolsService-CAupjSUl.js'),
4055
4063
  },
4056
4064
  ]);
4057
4065
 
@@ -4273,7 +4281,7 @@ const Dropdown = (props) => {
4273
4281
  const NumberDropdown = Dropdown;
4274
4282
  const StringDropdown = Dropdown;
4275
4283
 
4276
- const useStyles$j = makeStyles({
4284
+ const useStyles$k = makeStyles({
4277
4285
  surface: {
4278
4286
  maxWidth: "400px",
4279
4287
  },
@@ -4288,7 +4296,7 @@ const useStyles$j = makeStyles({
4288
4296
  const Popover = forwardRef((props, ref) => {
4289
4297
  const { children } = props;
4290
4298
  const [popoverOpen, setPopoverOpen] = useState(false);
4291
- const classes = useStyles$j();
4299
+ const classes = useStyles$k();
4292
4300
  return (jsxs(Popover$1, { open: popoverOpen, onOpenChange: (_, data) => setPopoverOpen(data.open), positioning: {
4293
4301
  align: "start",
4294
4302
  overflowBoundary: document.body,
@@ -4502,7 +4510,7 @@ const ColorSliders = ({ color, onSliderChange }) => (jsxs(Fragment, { children:
4502
4510
  const Color3PropertyLine = ColorPropertyLine;
4503
4511
  const Color4PropertyLine = ColorPropertyLine;
4504
4512
 
4505
- const useStyles$i = makeStyles({
4513
+ const useStyles$j = makeStyles({
4506
4514
  dropdown: {
4507
4515
  ...UniformWidthStyling,
4508
4516
  },
@@ -4514,7 +4522,7 @@ const useStyles$i = makeStyles({
4514
4522
  */
4515
4523
  const DropdownPropertyLine = forwardRef((props, ref) => {
4516
4524
  DropdownPropertyLine.displayName = "DropdownPropertyLine";
4517
- const classes = useStyles$i();
4525
+ const classes = useStyles$j();
4518
4526
  return (jsx(PropertyLine, { ...props, ref: ref, children: jsx(Dropdown, { ...props, className: classes.dropdown }) }));
4519
4527
  });
4520
4528
  /**
@@ -5089,7 +5097,7 @@ class ServiceContainer {
5089
5097
  }
5090
5098
  }
5091
5099
 
5092
- const useStyles$h = makeStyles({
5100
+ const useStyles$i = makeStyles({
5093
5101
  themeButton: {
5094
5102
  margin: 0,
5095
5103
  },
@@ -5108,7 +5116,7 @@ const ThemeSelectorServiceDefinition = {
5108
5116
  suppressTeachingMoment: true,
5109
5117
  order: -300,
5110
5118
  component: () => {
5111
- const classes = useStyles$h();
5119
+ const classes = useStyles$i();
5112
5120
  const { isDarkMode, themeMode, setThemeMode } = useThemeMode();
5113
5121
  const onSelectedThemeChange = useCallback((e, data) => {
5114
5122
  setThemeMode(data.checkedItems.includes("System") ? "system" : data.checkedItems[0].toLocaleLowerCase());
@@ -5125,7 +5133,7 @@ const ThemeSelectorServiceDefinition = {
5125
5133
  },
5126
5134
  };
5127
5135
 
5128
- const useStyles$g = makeStyles({
5136
+ const useStyles$h = makeStyles({
5129
5137
  app: {
5130
5138
  colorScheme: "light dark",
5131
5139
  flexGrow: 1,
@@ -5162,7 +5170,7 @@ function MakeModularTool(options) {
5162
5170
  SetThemeMode(themeMode);
5163
5171
  }
5164
5172
  const modularToolRootComponent = () => {
5165
- const classes = useStyles$g();
5173
+ const classes = useStyles$h();
5166
5174
  const [extensionManagerContext, setExtensionManagerContext] = useState();
5167
5175
  const [requiredExtensions, setRequiredExtensions] = useState();
5168
5176
  const [requiredExtensionsDeferred, setRequiredExtensionsDeferred] = useState();
@@ -5188,7 +5196,7 @@ function MakeModularTool(options) {
5188
5196
  });
5189
5197
  // Register the extension list service (for browsing/installing extensions) if extension feeds are provided.
5190
5198
  if (extensionFeeds.length > 0) {
5191
- const { ExtensionListServiceDefinition } = await import('./extensionsListService-13sAWV0u.js');
5199
+ const { ExtensionListServiceDefinition } = await import('./extensionsListService-hxk2QaYg.js');
5192
5200
  await serviceContainer.addServiceAsync(ExtensionListServiceDefinition);
5193
5201
  }
5194
5202
  // Register the theme selector service (for selecting the theme) if theming is configured.
@@ -5370,7 +5378,7 @@ const MeshIcon = createFluentIcon("Mesh", "16", '<path d="M14.03,3.54l-5.11-2.07
5370
5378
  const TranslateIcon = createFluentIcon("Translate", "24", '<path d="M20.16,12.98l-2.75-2.75c-.29-.29-.77-.29-1.06,0-.29.29-.29.77,0,1.06l1.47,1.47h-6.69v-6.69l1.47,1.47c.29.29.77.29,1.06,0,.29-.29.29-.77,0-1.06l-2.75-2.75c-.14-.14-.33-.22-.53-.22s-.39.08-.53.22l-2.75,2.75c-.29.29-.29.77,0,1.06.29.29.77.29,1.06,0l1.47-1.47v7.13l-3.52,3.52v-2.08c0-.41-.34-.75-.75-.75s-.75.34-.75.75v3.89c0,.2.08.39.22.53.14.14.33.22.53.22h3.89c.41,0,.75-.34.75-.75s-.34-.75-.75-.75h-2.08s3.52-3.52,3.52-3.52h7.13l-1.47,1.47c-.29.29-.29.77,0,1.06s.77.29,1.06,0l2.75-2.75c.14-.14.22-.33.22-.53s-.08-.39-.22-.53Z" />');
5371
5379
  const MaterialIcon = createFluentIcon("Material", "16", '<path d="M14.74,6.3c-.09-.36-.38-.64-.75-.72-.04-.09-.08-.18-.12-.27.1-.15.16-.32.16-.51,0-.18-.05-.34-.13-.48-1.23-1.97-3.41-3.28-5.9-3.28C4.16,1.04,1.04,4.16,1.04,7.99c0,.39.23.72.57.88.02.12.03.25.06.37-.18.18-.3.42-.3.7,0,.11.02.21.06.31.94,2.74,3.53,4.71,6.58,4.71,3.84,0,6.96-3.12,6.96-6.96,0-.59-.08-1.16-.22-1.7ZM2.07,8.58c-.02-.19-.03-.39-.03-.58,0-3.29,2.67-5.96,5.96-5.96,2.23,0,4.17,1.23,5.2,3.05.05.18-.07.45-.3.75-.57-.73-1.45-1.21-2.45-1.21-1.72,0-3.12,1.4-3.12,3.11,0,.33.07.65.16.95-3.05.82-5.17.52-5.42-.11ZM12.56,7.75c0,1.17-.95,2.11-2.11,2.11s-2.12-.95-2.12-2.11.95-2.11,2.12-2.11,2.11.95,2.11,2.11ZM8,13.96c-2.6,0-4.81-1.68-5.62-4.01.5.16,1.11.24,1.79.24,1.15,0,2.49-.22,3.79-.59.57.76,1.47,1.26,2.49,1.26,1.72,0,3.11-1.4,3.11-3.11,0-.34-.07-.65-.17-.96.13-.13.24-.26.34-.39.14.51.22,1.04.22,1.6,0,3.29-2.67,5.96-5.96,5.96Z"/>');
5372
5380
 
5373
- const useStyles$f = makeStyles({
5381
+ const useStyles$g = makeStyles({
5374
5382
  coordinatesModeButton: {
5375
5383
  margin: `0 0 0 ${tokens.spacingHorizontalXS}`,
5376
5384
  },
@@ -5380,7 +5388,7 @@ const useStyles$f = makeStyles({
5380
5388
  });
5381
5389
  const GizmoToolbar = (props) => {
5382
5390
  const { scene, entity, gizmoService } = props;
5383
- const classes = useStyles$f();
5391
+ const classes = useStyles$g();
5384
5392
  const gizmoManager = useResource(useCallback(() => {
5385
5393
  const utilityLayerRef = gizmoService.getUtilityLayer(scene);
5386
5394
  const keepDepthUtilityLayerRef = gizmoService.getUtilityLayer(scene, "keepDepth");
@@ -5495,7 +5503,7 @@ const GizmoToolbarServiceDefinition = {
5495
5503
  },
5496
5504
  };
5497
5505
 
5498
- const useStyles$e = makeStyles({
5506
+ const useStyles$f = makeStyles({
5499
5507
  badge: {
5500
5508
  margin: tokens.spacingHorizontalXXS,
5501
5509
  fontFamily: "monospace",
@@ -5511,7 +5519,7 @@ const MiniStatsServiceDefinition = {
5511
5519
  horizontalLocation: "right",
5512
5520
  suppressTeachingMoment: true,
5513
5521
  component: () => {
5514
- const classes = useStyles$e();
5522
+ const classes = useStyles$f();
5515
5523
  const scene = useObservableState(useCallback(() => sceneContext.currentScene, [sceneContext.currentScene]), sceneContext.currentSceneObservable);
5516
5524
  const engine = scene?.getEngine();
5517
5525
  const fps = useObservableState(useCallback(() => (engine ? Math.round(engine.getFps()) : null), [engine]), engine?.onBeginFrameObservable);
@@ -6527,104 +6535,384 @@ const MultiMaterialChildrenProperties = (props) => {
6527
6535
  .map((material, index) => (jsx(LinkToEntityPropertyLine, { label: `Material #${index + 1}`, entity: material, selectionService: selectionService }, material.uniqueId))) }));
6528
6536
  };
6529
6537
 
6530
- const NodeMaterialGeneralProperties = (props) => {
6531
- const { material } = props;
6532
- return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Ignore Alpha", target: material, propertyKey: "ignoreAlpha" }), jsx(ButtonLine, { label: "Edit", icon: EditRegular, onClick: async () => {
6533
- // TODO: Figure out how to get all the various build steps to work with this.
6534
- // See the initial attempt here: https://github.com/BabylonJS/Babylon.js/pull/17646
6535
- // const { NodeEditor } = await import("node-editor/nodeEditor");
6536
- // NodeEditor.Show({ nodeMaterial: material });
6537
- await material.edit();
6538
- } })] }));
6539
- };
6540
-
6541
- function IsMaterialWithPublicNormalMaps(mat) {
6542
- return mat.invertNormalMapX !== undefined;
6538
+ const useListStyles = makeStyles({
6539
+ item: {
6540
+ width: "100%",
6541
+ display: "flex",
6542
+ flexDirection: "row", // Arrange items horizontally
6543
+ alignItems: "center", // Center items vertically
6544
+ gap: tokens.spacingHorizontalS, // Add space between elements
6545
+ borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
6546
+ },
6547
+ itemId: {
6548
+ width: tokens.spacingHorizontalM,
6549
+ },
6550
+ itemContent: {
6551
+ flex: 1, // Take up remaining space
6552
+ minWidth: 0, // Prevent flex item from overflowing
6553
+ },
6554
+ iconContainer: {
6555
+ display: "flex",
6556
+ gap: tokens.spacingHorizontalXS, // Small gap between icons
6557
+ alignItems: "center",
6558
+ flexShrink: 0, // Prevent shrinking
6559
+ },
6560
+ list: {
6561
+ padding: tokens.spacingVerticalS,
6562
+ },
6563
+ });
6564
+ /**
6565
+ * For cases where you may want to add / remove items from a list via a trash can button / copy button, this HOC can be used
6566
+ * @returns A React component that renders a list of items with add/delete functionality
6567
+ * @param props - The properties for the List component
6568
+ */
6569
+ function List(props) {
6570
+ const { items, renderItem, onDelete, onAdd, addButtonLabel = "Add new item" } = props;
6571
+ const classes = useListStyles();
6572
+ const sortedItems = useMemo(() => [...items].sort((a, b) => a.sortBy - b.sortBy), [items]);
6573
+ return (jsxs("div", { children: [jsx(ButtonLine, { label: addButtonLabel, icon: AddRegular, onClick: () => props.onAdd() }), jsx("div", { className: classes.list, children: sortedItems.map((item, index) => (jsxs("div", { className: classes.item, children: [jsxs(Body1Strong, { className: classes.itemId, children: ["#", index] }), jsx("div", { className: classes.itemContent, children: renderItem(item, items.indexOf(sortedItems[index])) }), jsxs("div", { className: classes.iconContainer, children: [jsx(CopyRegular, { onClick: () => onAdd(item) }), jsx(DeleteRegular, { onClick: () => onDelete(item, items.indexOf(sortedItems[index])) })] })] }, item.id))) })] }));
6543
6574
  }
6575
+
6576
+ const useGradientStyles = makeStyles({
6577
+ container: {
6578
+ display: "flex",
6579
+ alignItems: "center",
6580
+ gap: tokens.spacingHorizontalS,
6581
+ width: "100%",
6582
+ },
6583
+ // Wrapper for factor spin buttons - fixed size
6584
+ valueWrapper: {
6585
+ flex: "0 0 auto", // Don't grow, natural size
6586
+ },
6587
+ // Wrapper for color pickers - fixed size since they're just swatches
6588
+ colorWrapper: {
6589
+ flex: "0 0 auto",
6590
+ alignContent: "center",
6591
+ },
6592
+ // Wrapper for the step slider - grows to fill remaining space
6593
+ stepSliderWrapper: {
6594
+ flex: "1 1 0", // Grow to fill available space
6595
+ minWidth: 0,
6596
+ },
6597
+ });
6544
6598
  /**
6545
- * Displays the normal map properties of a standard material.
6546
- * @param props - The required properties
6547
- * @returns A JSX element representing the normal map properties.
6599
+ * Gradient component that displays 1 or 2 color or number inputs next to a slider
6600
+ * @param props - Component props containing gradient value and change handlers
6601
+ * @returns A React component
6548
6602
  */
6549
- const NormalMapProperties = (props) => {
6550
- const { material } = props;
6551
- return (jsx(Fragment, { children: IsMaterialWithPublicNormalMaps(material) ? (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert X Axis", target: material, propertyKey: "invertNormalMapX" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert Y Axis", target: material, propertyKey: "invertNormalMapY" })] })) : (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert X Axis", target: material, propertyKey: "_invertNormalMapX" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert Y Axis", target: material, propertyKey: "_invertNormalMapY" })] })) }));
6603
+ const Gradient = (props) => {
6604
+ Gradient.displayName = "Gradient";
6605
+ const [gradient, setGradient] = useState(props.value);
6606
+ const classes = useGradientStyles();
6607
+ useEffect(() => {
6608
+ setGradient(props.value); // Re-render if props.value changes
6609
+ }, [props.value]);
6610
+ const gradientChange = (newGradient) => {
6611
+ setGradient(newGradient);
6612
+ props.onChange(newGradient);
6613
+ };
6614
+ // Only use compact mode when there are numeric values (spinbuttons) taking up space
6615
+ const hasNumericValues = !(gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4) ||
6616
+ (gradient.value2 !== undefined && !(gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4));
6617
+ return (jsxs("div", { id: "gradientContainer", className: classes.container, children: [jsx("div", { className: gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4 ? classes.colorWrapper : classes.valueWrapper, children: gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4 ? (jsx(ColorPickerPopup, { value: gradient.value1, onChange: (color) => gradientChange({ ...gradient, value1: color }) })) : (jsx(SyncedSliderInput, { step: 0.01, value: gradient.value1, onChange: (val) => gradientChange({ ...gradient, value1: val }), compact: true })) }), gradient.value2 !== undefined && (jsx("div", { className: gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4 ? classes.colorWrapper : classes.valueWrapper, children: gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4 ? (jsx(ColorPickerPopup, { value: gradient.value2, onChange: (color) => gradientChange({ ...gradient, value2: color }) })) : (jsx(SyncedSliderInput, { step: 0.01, value: gradient.value2, onChange: (val) => gradientChange({ ...gradient, value2: val }), compact: true })) })), jsx("div", { className: classes.stepSliderWrapper, children: jsx(SyncedSliderInput, { notifyOnlyOnRelease: true, min: 0, max: 1, step: 0.01, value: gradient.step, onChange: (val) => gradientChange({ ...gradient, step: val }), compact: hasNumericValues }) })] }));
6552
6618
  };
6553
-
6554
- // TODO: ryamtrem / gehalper This function is temporal until there is a line control to handle texture links (similar to the old TextureLinkLineComponent)
6555
- const UpdateTexture = (file, material, textureSetter) => {
6556
- ReadFile(file, (data) => {
6557
- const blob = new Blob([data], { type: "octet/stream" });
6558
- const url = URL.createObjectURL(blob);
6559
- textureSetter(new Texture(url, material.getScene(), false, false));
6560
- }, undefined, true);
6619
+ const FactorGradientCast = Gradient;
6620
+ const Color3GradientCast = Gradient;
6621
+ const Color4GradientCast = Gradient;
6622
+ /**
6623
+ * Component wrapper for FactorGradient that provides slider inputs for factor1, factor2, and gradient step
6624
+ * @param props - Component props containing FactorGradient value and change handler
6625
+ * @returns A React component
6626
+ */
6627
+ const FactorGradientComponent = (props) => {
6628
+ return (jsx(FactorGradientCast, { ...props, value: { value1: props.value.factor1, value2: props.value.factor2, step: props.value.gradient }, onChange: (gradient) => props.onChange(new FactorGradient(gradient.step, gradient.value1, gradient.value2)) }));
6561
6629
  };
6562
6630
  /**
6563
- * Displays the base layer properties of an OpenPBR material.
6564
- * @param props - The required properties
6565
- * @returns A JSX element representing the base layer properties.
6631
+ * Component wrapper for Color3Gradient that provides color picker and gradient step slider
6632
+ * @param props - Component props containing Color3Gradient value and change handler
6633
+ * @returns A React component
6566
6634
  */
6567
- const OpenPBRMaterialBaseProperties = (props) => {
6568
- const { material } = props;
6569
- return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Weight", target: material, propertyKey: "baseWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6570
- if (files.length > 0) {
6571
- UpdateTexture(files[0], material, (texture) => (material.baseWeightTexture = texture));
6572
- }
6573
- } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Base Color", target: material, propertyKey: "baseColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Base Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6574
- if (files.length > 0) {
6575
- UpdateTexture(files[0], material, (texture) => (material.baseColorTexture = texture));
6576
- }
6577
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Metalness", target: material, propertyKey: "baseMetalness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Metalness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6578
- if (files.length > 0) {
6579
- UpdateTexture(files[0], material, (texture) => (material.baseMetalnessTexture = texture));
6580
- }
6581
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "baseDiffuseRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Diffuse Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6582
- if (files.length > 0) {
6583
- UpdateTexture(files[0], material, (texture) => (material.baseDiffuseRoughnessTexture = texture));
6584
- }
6585
- } })] }));
6635
+ const Color3GradientComponent = (props) => {
6636
+ return (jsx(Color3GradientCast, { ...props, value: { value1: props.value.color, step: props.value.gradient }, onChange: (gradient) => props.onChange(new Color3Gradient(gradient.step, gradient.value1)) }));
6586
6637
  };
6587
6638
  /**
6588
- * Displays the specular layer properties of an OpenPBR material.
6589
- * @param props - The required properties
6590
- * @returns A JSX element representing the specular layer properties.
6639
+ * Component wrapper for Color4Gradient that provides color pickers for color1, color2, and gradient step slider
6640
+ * @param props - Component props containing Color4Gradient value and change handler
6641
+ * @returns A React component
6591
6642
  */
6592
- const OpenPBRMaterialSpecularProperties = (props) => {
6593
- const { material } = props;
6594
- return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Weight", target: material, propertyKey: "specularWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6595
- if (files.length > 0) {
6596
- UpdateTexture(files[0], material, (texture) => (material.specularWeightTexture = texture));
6597
- }
6598
- } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Specular Color", target: material, propertyKey: "specularColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Specular Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6599
- if (files.length > 0) {
6600
- UpdateTexture(files[0], material, (texture) => (material.specularColorTexture = texture));
6601
- }
6602
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Roughness", target: material, propertyKey: "specularRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6603
- if (files.length > 0) {
6604
- UpdateTexture(files[0], material, (texture) => (material.specularRoughnessTexture = texture));
6605
- }
6606
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Roughness Anisotropy", target: material, propertyKey: "specularRoughnessAnisotropy", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Roughness Anisotropy", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6607
- if (files.length > 0) {
6608
- UpdateTexture(files[0], material, (texture) => (material.specularRoughnessAnisotropyTexture = texture));
6609
- }
6610
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular IOR", target: material, propertyKey: "specularIor", min: 1, max: 3, step: 0.01 })] }));
6643
+ const Color4GradientComponent = (props) => {
6644
+ return (jsx(Color4GradientCast, { ...props, value: { value1: props.value.color1, value2: props.value.color2, step: props.value.gradient }, onChange: (gradient) => props.onChange(new ColorGradient(gradient.step, gradient.value1, gradient.value2)) }));
6611
6645
  };
6612
6646
  /**
6613
- * Displays the coat layer properties of an OpenPBR material.
6614
- * @param props - The required properties
6615
- * @returns A JSX element representing the coat layer properties.
6647
+ * Component wrapper for GradientBlockColorStep that provides color picker and step slider
6648
+ * @param props - Component props containing GradientBlockColorStep value and change handler
6649
+ * @returns A React component
6616
6650
  */
6617
- const OpenPBRMaterialCoatProperties = (props) => {
6618
- const { material } = props;
6619
- return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Coat Weight", target: material, propertyKey: "coatWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Coat Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6620
- if (files.length > 0) {
6621
- UpdateTexture(files[0], material, (texture) => (material.coatWeightTexture = texture));
6622
- }
6623
- } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Coat Color", target: material, propertyKey: "coatColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Coat Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6624
- if (files.length > 0) {
6625
- UpdateTexture(files[0], material, (texture) => (material.coatColorTexture = texture));
6626
- }
6627
- } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Coat Roughness", target: material, propertyKey: "coatRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Coat Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6651
+ const ColorStepGradientComponent = (props) => {
6652
+ return (jsx(Color3GradientCast, { ...props, value: { value1: props.value.color, step: props.value.step }, onChange: (gradient) => props.onChange(new GradientBlockColorStep(gradient.step, gradient.value1)) }));
6653
+ };
6654
+
6655
+ // Convert gradients to LineList items and sort by gradient value
6656
+ function GradientsToListItems(gradients) {
6657
+ return (gradients?.map((gradient, index) => ({
6658
+ id: index,
6659
+ data: gradient,
6660
+ sortBy: gradient.gradient,
6661
+ })) ?? []);
6662
+ }
6663
+ const FactorGradientList = (props) => {
6664
+ FactorGradientList.displayName = "FactorGradientList";
6665
+ const { gradients } = props;
6666
+ const items = useMemo(() => GradientsToListItems(gradients), [gradients]);
6667
+ return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item, index) => props.removeGradient(item.data, index), onAdd: () => {
6668
+ if (items.length === 0) {
6669
+ props.addGradient(); // Default
6670
+ }
6671
+ else {
6672
+ props.addGradient(new FactorGradient(1, 1, 1));
6673
+ }
6674
+ }, renderItem: (item, index) => {
6675
+ return (jsx(FactorGradientComponent, { value: item.data, onChange: (newGradient) => {
6676
+ item.data.gradient = newGradient.gradient;
6677
+ item.data.factor1 = newGradient.factor1;
6678
+ item.data.factor2 = newGradient.factor2;
6679
+ props.onChange(newGradient, index);
6680
+ } }));
6681
+ } }, "Factor"));
6682
+ };
6683
+ const Color3GradientList = (props) => {
6684
+ Color3GradientList.displayName = "Color3GradientList";
6685
+ const { gradients } = props;
6686
+ const items = useMemo(() => GradientsToListItems(gradients), [gradients]);
6687
+ return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item, index) => props.removeGradient(item.data, index), onAdd: () => {
6688
+ if (items.length === 0) {
6689
+ props.addGradient(); // Default
6690
+ }
6691
+ else {
6692
+ props.addGradient(new Color3Gradient(1, Color3.White()));
6693
+ }
6694
+ }, renderItem: (item, index) => {
6695
+ return (jsx(Color3GradientComponent, { value: item.data, onChange: (newGradient) => {
6696
+ item.data.gradient = newGradient.gradient;
6697
+ item.data.color = newGradient.color;
6698
+ props.onChange(newGradient, index);
6699
+ } }));
6700
+ } }, "Color3"));
6701
+ };
6702
+ const Color4GradientList = (props) => {
6703
+ Color4GradientList.displayName = "Color4GradientList";
6704
+ const { gradients } = props;
6705
+ const items = useMemo(() => GradientsToListItems(gradients), [gradients]);
6706
+ return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item, index) => props.removeGradient(item.data, index), onAdd: () => {
6707
+ if (items.length === 0) {
6708
+ props.addGradient(); // Default
6709
+ }
6710
+ else {
6711
+ props.addGradient(new ColorGradient(1, new Color4(1, 1, 1, 1), new Color4(1, 1, 1, 1)));
6712
+ }
6713
+ }, renderItem: (item, index) => {
6714
+ return (jsx(Color4GradientComponent, { value: item.data, onChange: (newGradient) => {
6715
+ item.data.gradient = newGradient.gradient;
6716
+ item.data.color1 = newGradient.color1;
6717
+ item.data.color2 = newGradient.color2;
6718
+ props.onChange(newGradient, index);
6719
+ } }));
6720
+ } }, "Color4"));
6721
+ };
6722
+
6723
+ function GroupBy(items, getKey) {
6724
+ const map = items.reduce((map, item) => {
6725
+ const key = getKey(item);
6726
+ let group = map.get(key);
6727
+ if (!group) {
6728
+ map.set(key, (group = []));
6729
+ }
6730
+ group.push(item);
6731
+ return map;
6732
+ }, new Map());
6733
+ return Array.from(map, ([key, items]) => ({ key, items }));
6734
+ }
6735
+
6736
+ const useStyles$e = makeStyles({
6737
+ subsection: {
6738
+ marginTop: tokens.spacingVerticalM,
6739
+ },
6740
+ });
6741
+ const NodeMaterialGeneralProperties = (props) => {
6742
+ const { material } = props;
6743
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Ignore Alpha", target: material, propertyKey: "ignoreAlpha" }), jsx(ButtonLine, { label: "Edit", icon: EditRegular, onClick: async () => {
6744
+ // TODO: Figure out how to get all the various build steps to work with this.
6745
+ // See the initial attempt here: https://github.com/BabylonJS/Babylon.js/pull/17646
6746
+ // const { NodeEditor } = await import("node-editor/nodeEditor");
6747
+ // NodeEditor.Show({ nodeMaterial: material });
6748
+ await material.edit();
6749
+ } })] }));
6750
+ };
6751
+ const InputBlockPropertyLine = (props) => {
6752
+ const { block } = props;
6753
+ // We need to re-evaluate this outer component when type/isBoolean/min/max change since that determines what type of property line we render.
6754
+ const type = useProperty(block, "type");
6755
+ const isBoolean = useProperty(block, "isBoolean");
6756
+ const min = useProperty(block, "min");
6757
+ const max = useProperty(block, "max");
6758
+ const commonProps = {
6759
+ label: block.name,
6760
+ target: block,
6761
+ propertyKey: "value",
6762
+ };
6763
+ if (type === NodeMaterialBlockConnectionPointTypes.Float) {
6764
+ if (isBoolean) {
6765
+ return jsx(BoundProperty, { component: SwitchPropertyLine, ...commonProps }, `${block.uniqueId} (Switch)`);
6766
+ }
6767
+ else {
6768
+ const hasMinMax = !isNaN(min) && !isNaN(max) && min !== max;
6769
+ if (hasMinMax) {
6770
+ return jsx(BoundProperty, { component: SyncedSliderPropertyLine, ...commonProps, min: min, max: max, step: (max - min) / 100.0 }, `${block.uniqueId} (Slider)`);
6771
+ }
6772
+ else {
6773
+ return jsx(BoundProperty, { component: NumberInputPropertyLine, ...commonProps }, `${block.uniqueId} (Number)`);
6774
+ }
6775
+ }
6776
+ }
6777
+ else if (type === NodeMaterialBlockConnectionPointTypes.Color3) {
6778
+ return jsx(BoundProperty, { component: Color3PropertyLine, ...commonProps }, `${block.uniqueId} (Color3)`);
6779
+ }
6780
+ else if (type === NodeMaterialBlockConnectionPointTypes.Color4) {
6781
+ return jsx(BoundProperty, { component: Color4PropertyLine, ...commonProps }, `${block.uniqueId} (Color4)`);
6782
+ }
6783
+ else if (type === NodeMaterialBlockConnectionPointTypes.Vector2) {
6784
+ return jsx(BoundProperty, { component: Vector2PropertyLine, ...commonProps }, `${block.uniqueId} (Vector2)`);
6785
+ }
6786
+ else if (type === NodeMaterialBlockConnectionPointTypes.Vector3) {
6787
+ return jsx(BoundProperty, { component: Vector3PropertyLine, ...commonProps }, `${block.uniqueId} (Vector3)`);
6788
+ }
6789
+ else if (type === NodeMaterialBlockConnectionPointTypes.Vector4) {
6790
+ return jsx(BoundProperty, { component: Vector4PropertyLine, ...commonProps }, `${block.uniqueId} (Vector4)`);
6791
+ }
6792
+ else {
6793
+ return null;
6794
+ }
6795
+ };
6796
+ const GradientBlockPropertyLine = (props) => {
6797
+ const { material, block } = props;
6798
+ const gradients = useObservableState(useCallback(() => block.colorSteps.map((step) => new Color3Gradient(step.step, step.color)), [block.colorSteps]), block.onValueChangedObservable);
6799
+ return (jsx(Color3GradientList, { label: "step", gradients: gradients, addGradient: (gradient) => {
6800
+ block.colorSteps.push(gradient ? new GradientBlockColorStep(gradient.gradient, gradient.color) : new GradientBlockColorStep(1.0, Color3.White()));
6801
+ block.colorStepsUpdated();
6802
+ material.build();
6803
+ }, removeGradient: (_, index) => {
6804
+ block.colorSteps.splice(index, 1);
6805
+ block.colorStepsUpdated();
6806
+ material.build();
6807
+ }, onChange: (gradient, index) => {
6808
+ block.colorSteps[index].step = gradient.gradient;
6809
+ block.colorSteps[index].color = gradient.color;
6810
+ block.colorStepsUpdated();
6811
+ material.build();
6812
+ } }));
6813
+ };
6814
+ const NodeMaterialInputProperties = (props) => {
6815
+ const { material } = props;
6816
+ const classes = useStyles$e();
6817
+ const inputBlocks = useObservableState(useCallback(() => {
6818
+ const inspectorVisibleInputBlocks = material
6819
+ .getInputBlocks()
6820
+ .filter((block) => block.visibleInInspector)
6821
+ .map((block) => block);
6822
+ const groupedInputBlocks = GroupBy(inspectorVisibleInputBlocks, (block) => block.groupInInspector);
6823
+ return groupedInputBlocks.sort((a, b) => a.key.localeCompare(b.key));
6824
+ }, [material]), material.onBuildObservable, material.onBuildErrorObservable);
6825
+ const gradientBlocks = useObservableState(useCallback(() => material.attachedBlocks.filter((block) => block.visibleInInspector && block.getClassName() === "GradientBlock").map((block) => block), [material]), material.onBuildObservable, material.onBuildErrorObservable);
6826
+ return (jsx(Fragment, { children: inputBlocks.length === 0 && gradientBlocks.length === 0 ? (jsx(MessageBar, { intent: "info", title: "No Visible Input Blocks", message: "To see input blocks, mark them as visibleInInspector.", docLink: "https://doc.babylonjs.com/features/featuresDeepDive/materials/node_material/nodeMaterial/#adding-blocks" }, "no-visible-input-blocks")) : (jsxs(Fragment, { children: [inputBlocks.map((group) => (jsxs(Fragment$1, { children: [group.key && jsx(Subtitle2, { className: classes.subsection, children: group.key }), group.items.map((block) => (jsx(InputBlockPropertyLine, { block: block }, block.uniqueId)))] }, `${group.key || "default"} (Group)`))), gradientBlocks.map((block) => (jsxs(Fragment$1, { children: [jsx(Subtitle2, { className: classes.subsection, children: block.name }), jsx(GradientBlockPropertyLine, { material: material, block: block })] }, `${block.uniqueId} (Gradient)`)))] })) }));
6827
+ };
6828
+
6829
+ function IsMaterialWithPublicNormalMaps(mat) {
6830
+ return mat.invertNormalMapX !== undefined;
6831
+ }
6832
+ /**
6833
+ * Displays the normal map properties of a standard material.
6834
+ * @param props - The required properties
6835
+ * @returns A JSX element representing the normal map properties.
6836
+ */
6837
+ const NormalMapProperties = (props) => {
6838
+ const { material } = props;
6839
+ return (jsx(Fragment, { children: IsMaterialWithPublicNormalMaps(material) ? (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert X Axis", target: material, propertyKey: "invertNormalMapX" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert Y Axis", target: material, propertyKey: "invertNormalMapY" })] })) : (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert X Axis", target: material, propertyKey: "_invertNormalMapX" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Invert Y Axis", target: material, propertyKey: "_invertNormalMapY" })] })) }));
6840
+ };
6841
+
6842
+ // TODO: ryamtrem / gehalper This function is temporal until there is a line control to handle texture links (similar to the old TextureLinkLineComponent)
6843
+ const UpdateTexture = (file, material, textureSetter) => {
6844
+ ReadFile(file, (data) => {
6845
+ const blob = new Blob([data], { type: "octet/stream" });
6846
+ const url = URL.createObjectURL(blob);
6847
+ textureSetter(new Texture(url, material.getScene(), false, false));
6848
+ }, undefined, true);
6849
+ };
6850
+ /**
6851
+ * Displays the base layer properties of an OpenPBR material.
6852
+ * @param props - The required properties
6853
+ * @returns A JSX element representing the base layer properties.
6854
+ */
6855
+ const OpenPBRMaterialBaseProperties = (props) => {
6856
+ const { material } = props;
6857
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Weight", target: material, propertyKey: "baseWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6858
+ if (files.length > 0) {
6859
+ UpdateTexture(files[0], material, (texture) => (material.baseWeightTexture = texture));
6860
+ }
6861
+ } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Base Color", target: material, propertyKey: "baseColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Base Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6862
+ if (files.length > 0) {
6863
+ UpdateTexture(files[0], material, (texture) => (material.baseColorTexture = texture));
6864
+ }
6865
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Metalness", target: material, propertyKey: "baseMetalness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Metalness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6866
+ if (files.length > 0) {
6867
+ UpdateTexture(files[0], material, (texture) => (material.baseMetalnessTexture = texture));
6868
+ }
6869
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "baseDiffuseRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Base Diffuse Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6870
+ if (files.length > 0) {
6871
+ UpdateTexture(files[0], material, (texture) => (material.baseDiffuseRoughnessTexture = texture));
6872
+ }
6873
+ } })] }));
6874
+ };
6875
+ /**
6876
+ * Displays the specular layer properties of an OpenPBR material.
6877
+ * @param props - The required properties
6878
+ * @returns A JSX element representing the specular layer properties.
6879
+ */
6880
+ const OpenPBRMaterialSpecularProperties = (props) => {
6881
+ const { material } = props;
6882
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Weight", target: material, propertyKey: "specularWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6883
+ if (files.length > 0) {
6884
+ UpdateTexture(files[0], material, (texture) => (material.specularWeightTexture = texture));
6885
+ }
6886
+ } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Specular Color", target: material, propertyKey: "specularColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Specular Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6887
+ if (files.length > 0) {
6888
+ UpdateTexture(files[0], material, (texture) => (material.specularColorTexture = texture));
6889
+ }
6890
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Roughness", target: material, propertyKey: "specularRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6891
+ if (files.length > 0) {
6892
+ UpdateTexture(files[0], material, (texture) => (material.specularRoughnessTexture = texture));
6893
+ }
6894
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Roughness Anisotropy", target: material, propertyKey: "specularRoughnessAnisotropy", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Specular Roughness Anisotropy", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6895
+ if (files.length > 0) {
6896
+ UpdateTexture(files[0], material, (texture) => (material.specularRoughnessAnisotropyTexture = texture));
6897
+ }
6898
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular IOR", target: material, propertyKey: "specularIor", min: 1, max: 3, step: 0.01 })] }));
6899
+ };
6900
+ /**
6901
+ * Displays the coat layer properties of an OpenPBR material.
6902
+ * @param props - The required properties
6903
+ * @returns A JSX element representing the coat layer properties.
6904
+ */
6905
+ const OpenPBRMaterialCoatProperties = (props) => {
6906
+ const { material } = props;
6907
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Coat Weight", target: material, propertyKey: "coatWeight", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Coat Weight", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6908
+ if (files.length > 0) {
6909
+ UpdateTexture(files[0], material, (texture) => (material.coatWeightTexture = texture));
6910
+ }
6911
+ } }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Coat Color", target: material, propertyKey: "coatColor", isLinearMode: true }), jsx(FileUploadLine, { label: "Coat Color", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6912
+ if (files.length > 0) {
6913
+ UpdateTexture(files[0], material, (texture) => (material.coatColorTexture = texture));
6914
+ }
6915
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Coat Roughness", target: material, propertyKey: "coatRoughness", min: 0, max: 1, step: 0.01 }), jsx(FileUploadLine, { label: "Coat Roughness", accept: ".jpg, .png, .tga, .dds, .env, .exr", onClick: (files) => {
6628
6916
  if (files.length > 0) {
6629
6917
  UpdateTexture(files[0], material, (texture) => (material.coatRoughnessTexture = texture));
6630
6918
  }
@@ -7362,6 +7650,10 @@ const MaterialPropertiesServiceDefinition = {
7362
7650
  section: "General",
7363
7651
  component: ({ context }) => jsx(NodeMaterialGeneralProperties, { material: context }),
7364
7652
  },
7653
+ {
7654
+ section: "Inputs",
7655
+ component: ({ context }) => jsx(NodeMaterialInputProperties, { material: context }),
7656
+ },
7365
7657
  ],
7366
7658
  });
7367
7659
  return {
@@ -7966,192 +8258,6 @@ const NodePropertiesServiceDefinition = {
7966
8258
  },
7967
8259
  };
7968
8260
 
7969
- const useListStyles = makeStyles({
7970
- item: {
7971
- width: "100%",
7972
- display: "flex",
7973
- flexDirection: "row", // Arrange items horizontally
7974
- alignItems: "center", // Center items vertically
7975
- gap: tokens.spacingHorizontalS, // Add space between elements
7976
- borderBottom: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,
7977
- },
7978
- itemId: {
7979
- width: tokens.spacingHorizontalM,
7980
- },
7981
- itemContent: {
7982
- flex: 1, // Take up remaining space
7983
- minWidth: 0, // Prevent flex item from overflowing
7984
- },
7985
- iconContainer: {
7986
- display: "flex",
7987
- gap: tokens.spacingHorizontalXS, // Small gap between icons
7988
- alignItems: "center",
7989
- flexShrink: 0, // Prevent shrinking
7990
- },
7991
- list: {
7992
- padding: tokens.spacingVerticalS,
7993
- },
7994
- });
7995
- /**
7996
- * For cases where you may want to add / remove items from a list via a trash can button / copy button, this HOC can be used
7997
- * @returns A React component that renders a list of items with add/delete functionality
7998
- * @param props - The properties for the List component
7999
- */
8000
- function List(props) {
8001
- const { items, renderItem, onDelete, onAdd, addButtonLabel = "Add new item" } = props;
8002
- const classes = useListStyles();
8003
- return (jsxs("div", { children: [jsx(ButtonLine, { label: addButtonLabel, onClick: () => props.onAdd() }), jsx("div", { className: classes.list, children: items
8004
- .sort((a, b) => a.sortBy - b.sortBy)
8005
- .map((item, index) => (jsxs("div", { className: classes.item, children: [jsxs(Body1Strong, { className: classes.itemId, children: ["#", index] }), jsx("div", { className: classes.itemContent, children: renderItem(item, index) }), jsxs("div", { className: classes.iconContainer, children: [jsx(CopyRegular, { onClick: () => onAdd(item) }), jsx(DeleteRegular, { onClick: () => onDelete(item, index) })] })] }, item.id))) })] }));
8006
- }
8007
-
8008
- const useGradientStyles = makeStyles({
8009
- container: {
8010
- display: "flex",
8011
- alignItems: "center",
8012
- gap: tokens.spacingHorizontalS,
8013
- width: "100%",
8014
- },
8015
- // Wrapper for factor spin buttons - fixed size
8016
- valueWrapper: {
8017
- flex: "0 0 auto", // Don't grow, natural size
8018
- },
8019
- // Wrapper for color pickers - fixed size since they're just swatches
8020
- colorWrapper: {
8021
- flex: "0 0 auto",
8022
- alignContent: "center",
8023
- },
8024
- // Wrapper for the step slider - grows to fill remaining space
8025
- stepSliderWrapper: {
8026
- flex: "1 1 0", // Grow to fill available space
8027
- minWidth: 0,
8028
- },
8029
- });
8030
- /**
8031
- * Gradient component that displays 1 or 2 color or number inputs next to a slider
8032
- * @param props - Component props containing gradient value and change handlers
8033
- * @returns A React component
8034
- */
8035
- const Gradient = (props) => {
8036
- Gradient.displayName = "Gradient";
8037
- const [gradient, setGradient] = useState(props.value);
8038
- const classes = useGradientStyles();
8039
- useEffect(() => {
8040
- setGradient(props.value); // Re-render if props.value changes
8041
- }, [props.value]);
8042
- const gradientChange = (newGradient) => {
8043
- setGradient(newGradient);
8044
- props.onChange(newGradient);
8045
- };
8046
- // Only use compact mode when there are numeric values (spinbuttons) taking up space
8047
- const hasNumericValues = !(gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4) ||
8048
- (gradient.value2 !== undefined && !(gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4));
8049
- return (jsxs("div", { id: "gradientContainer", className: classes.container, children: [jsx("div", { className: gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4 ? classes.colorWrapper : classes.valueWrapper, children: gradient.value1 instanceof Color3 || gradient.value1 instanceof Color4 ? (jsx(ColorPickerPopup, { value: gradient.value1, onChange: (color) => gradientChange({ ...gradient, value1: color }) })) : (jsx(SyncedSliderInput, { step: 0.01, value: gradient.value1, onChange: (val) => gradientChange({ ...gradient, value1: val }), compact: true })) }), gradient.value2 !== undefined && (jsx("div", { className: gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4 ? classes.colorWrapper : classes.valueWrapper, children: gradient.value2 instanceof Color3 || gradient.value2 instanceof Color4 ? (jsx(ColorPickerPopup, { value: gradient.value2, onChange: (color) => gradientChange({ ...gradient, value2: color }) })) : (jsx(SyncedSliderInput, { step: 0.01, value: gradient.value2, onChange: (val) => gradientChange({ ...gradient, value2: val }), compact: true })) })), jsx("div", { className: classes.stepSliderWrapper, children: jsx(SyncedSliderInput, { notifyOnlyOnRelease: true, min: 0, max: 1, step: 0.01, value: gradient.step, onChange: (val) => gradientChange({ ...gradient, step: val }), compact: hasNumericValues }) })] }));
8050
- };
8051
- const FactorGradientCast = Gradient;
8052
- const Color3GradientCast = Gradient;
8053
- const Color4GradientCast = Gradient;
8054
- /**
8055
- * Component wrapper for FactorGradient that provides slider inputs for factor1, factor2, and gradient step
8056
- * @param props - Component props containing FactorGradient value and change handler
8057
- * @returns A React component
8058
- */
8059
- const FactorGradientComponent = (props) => {
8060
- return (jsx(FactorGradientCast, { ...props, value: { value1: props.value.factor1, value2: props.value.factor2, step: props.value.gradient }, onChange: (gradient) => props.onChange(new FactorGradient(gradient.step, gradient.value1, gradient.value2)) }));
8061
- };
8062
- /**
8063
- * Component wrapper for Color3Gradient that provides color picker and gradient step slider
8064
- * @param props - Component props containing Color3Gradient value and change handler
8065
- * @returns A React component
8066
- */
8067
- const Color3GradientComponent = (props) => {
8068
- return (jsx(Color3GradientCast, { ...props, value: { value1: props.value.color, step: props.value.gradient }, onChange: (gradient) => props.onChange(new Color3Gradient(gradient.step, gradient.value1)) }));
8069
- };
8070
- /**
8071
- * Component wrapper for Color4Gradient that provides color pickers for color1, color2, and gradient step slider
8072
- * @param props - Component props containing Color4Gradient value and change handler
8073
- * @returns A React component
8074
- */
8075
- const Color4GradientComponent = (props) => {
8076
- return (jsx(Color4GradientCast, { ...props, value: { value1: props.value.color1, value2: props.value.color2, step: props.value.gradient }, onChange: (gradient) => props.onChange(new ColorGradient(gradient.step, gradient.value1, gradient.value2)) }));
8077
- };
8078
- /**
8079
- * Component wrapper for GradientBlockColorStep that provides color picker and step slider
8080
- * @param props - Component props containing GradientBlockColorStep value and change handler
8081
- * @returns A React component
8082
- */
8083
- const ColorStepGradientComponent = (props) => {
8084
- return (jsx(Color3GradientCast, { ...props, value: { value1: props.value.color, step: props.value.step }, onChange: (gradient) => props.onChange(new GradientBlockColorStep(gradient.step, gradient.value1)) }));
8085
- };
8086
-
8087
- // Convert gradients to LineList items and sort by gradient value
8088
- function GradientsToListItems(gradients) {
8089
- return (gradients?.map((gradient, index) => ({
8090
- id: index,
8091
- data: gradient,
8092
- sortBy: gradient.gradient,
8093
- })) ?? []);
8094
- }
8095
- const FactorGradientList = (props) => {
8096
- FactorGradientList.displayName = "FactorGradientList";
8097
- const { gradients } = props;
8098
- const items = GradientsToListItems(gradients);
8099
- return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item) => props.removeGradient(item.data), onAdd: () => {
8100
- if (items.length === 0) {
8101
- props.addGradient(); // Default
8102
- }
8103
- else {
8104
- props.addGradient(new FactorGradient(1, 1, 1));
8105
- }
8106
- }, renderItem: (item) => {
8107
- return (jsx(FactorGradientComponent, { value: item.data, onChange: (newGradient) => {
8108
- item.data.gradient = newGradient.gradient;
8109
- item.data.factor1 = newGradient.factor1;
8110
- item.data.factor2 = newGradient.factor2;
8111
- props.onChange(newGradient);
8112
- } }));
8113
- } }, "Factor"));
8114
- };
8115
- const Color3GradientList = (props) => {
8116
- Color3GradientList.displayName = "Color3GradientList";
8117
- const { gradients } = props;
8118
- const items = GradientsToListItems(gradients);
8119
- return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item) => props.removeGradient(item.data), onAdd: () => {
8120
- if (items.length === 0) {
8121
- props.addGradient(); // Default
8122
- }
8123
- else {
8124
- props.addGradient(new Color3Gradient(1, Color3.White()));
8125
- }
8126
- }, renderItem: (item) => {
8127
- return (jsx(Color3GradientComponent, { value: item.data, onChange: (newGradient) => {
8128
- item.data.gradient = newGradient.gradient;
8129
- item.data.color = newGradient.color;
8130
- props.onChange(newGradient);
8131
- } }));
8132
- } }, "Color3"));
8133
- };
8134
- const Color4GradientList = (props) => {
8135
- Color4GradientList.displayName = "Color4GradientList";
8136
- const { gradients } = props;
8137
- const items = GradientsToListItems(gradients);
8138
- return (jsx(List, { addButtonLabel: items.length > 0 ? `Add new ${props.label}` : `Use ${props.label}s`, items: items, onDelete: (item) => props.removeGradient(item.data), onAdd: () => {
8139
- if (items.length === 0) {
8140
- props.addGradient(); // Default
8141
- }
8142
- else {
8143
- props.addGradient(new ColorGradient(1, new Color4(1, 1, 1, 1), new Color4(1, 1, 1, 1)));
8144
- }
8145
- }, renderItem: (item) => {
8146
- return (jsx(Color4GradientComponent, { value: item.data, onChange: (newGradient) => {
8147
- item.data.gradient = newGradient.gradient;
8148
- item.data.color1 = newGradient.color1;
8149
- item.data.color2 = newGradient.color2;
8150
- props.onChange(newGradient);
8151
- } }));
8152
- } }, "Color4"));
8153
- };
8154
-
8155
8261
  /**
8156
8262
  * Shared utilities for snippet server operations (save/load).
8157
8263
  */
@@ -9254,7 +9360,7 @@ const CheckboxPropertyLine = (props) => {
9254
9360
  */
9255
9361
  const PostProcessProperties = (props) => {
9256
9362
  const { postProcess } = props;
9257
- 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 })] }));
9363
+ return (jsxs(Fragment, { children: [jsx(StringifiedPropertyLine, { label: "Width", description: "The width of the post process", value: postProcess.width, units: "px" }), jsx(StringifiedPropertyLine, { label: "Height", description: "The height of the post process", value: postProcess.height, units: "px" }), jsx(BoundProperty, { component: CheckboxPropertyLine, label: "Auto Clear", target: postProcess, propertyKey: "autoClear" }), postProcess.clearColor && jsx(BoundProperty, { component: Color4PropertyLine, label: "Clear Color", target: postProcess, propertyKey: "clearColor" }), 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 })] }));
9258
9364
  };
9259
9365
 
9260
9366
  const PostProcessPropertiesServiceDefinition = {
@@ -9279,14 +9385,281 @@ const PostProcessPropertiesServiceDefinition = {
9279
9385
  },
9280
9386
  };
9281
9387
 
9388
+ const PostProcessRenderPipelineSamplesProperties = (props) => {
9389
+ const { pipeline } = props;
9390
+ const hasSamples = "samples" in pipeline;
9391
+ if (!hasSamples) {
9392
+ return null;
9393
+ }
9394
+ return (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Samples", description: "MSAA sample count", target: pipeline, propertyKey: "samples", min: 1, step: 1 }));
9395
+ };
9396
+
9397
+ const DepthOfFieldBlurLevelOptions = [
9398
+ { label: "Low", value: 0 /* DepthOfFieldEffectBlurLevel.Low */ },
9399
+ { label: "Medium", value: 1 /* DepthOfFieldEffectBlurLevel.Medium */ },
9400
+ { label: "High", value: 2 /* DepthOfFieldEffectBlurLevel.High */ },
9401
+ ];
9402
+ const ToneMappingTypeOptions = [
9403
+ { label: "Standard", value: ImageProcessingConfiguration.TONEMAPPING_STANDARD },
9404
+ { label: "ACES", value: ImageProcessingConfiguration.TONEMAPPING_ACES },
9405
+ { label: "Khronos PBR Neutral", value: ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL },
9406
+ ];
9407
+ const VignetteBlendModeOptions = [
9408
+ { label: "Multiply", value: ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY },
9409
+ { label: "Opaque", value: ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE },
9410
+ ];
9411
+ const DefaultRenderingPipelineBloomProperties = (props) => {
9412
+ const { pipeline } = props;
9413
+ const bloomEnabled = useProperty(pipeline, "bloomEnabled");
9414
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Bloom Enabled", target: pipeline, propertyKey: "bloomEnabled" }), jsxs(Collapse, { visible: !!bloomEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Threshold", target: pipeline, propertyKey: "bloomThreshold", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Weight", target: pipeline, propertyKey: "bloomWeight", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Kernel", target: pipeline, propertyKey: "bloomKernel", min: 0, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Scale", target: pipeline, propertyKey: "bloomScale", min: 0, step: 0.25 })] })] }));
9415
+ };
9416
+ const DefaultRenderingPipelineChromaticAberrationProperties = (props) => {
9417
+ const { pipeline } = props;
9418
+ const chromaticAberrationEnabled = useProperty(pipeline, "chromaticAberrationEnabled");
9419
+ const chromaticAberration = pipeline.chromaticAberration;
9420
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Chromatic Aberration Enabled", target: pipeline, propertyKey: "chromaticAberrationEnabled" }), jsxs(Collapse, { visible: !!chromaticAberrationEnabled && !!chromaticAberration, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Aberration Amount", target: chromaticAberration, propertyKey: "aberrationAmount", propertyPath: "chromaticAberration.aberrationAmount", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Radial Intensity", target: chromaticAberration, propertyKey: "radialIntensity", propertyPath: "chromaticAberration.radialIntensity", min: 0, step: 0.01 }), jsx(BoundProperty, { component: Vector2PropertyLine, label: "Center Position", target: chromaticAberration, propertyKey: "centerPosition", propertyPath: "chromaticAberration.centerPosition" }), jsx(BoundProperty, { component: Vector2PropertyLine, label: "Direction", target: chromaticAberration, propertyKey: "direction", propertyPath: "chromaticAberration.direction" })] })] }));
9421
+ };
9422
+ const DefaultRenderingPipelineDepthOfFieldProperties = (props) => {
9423
+ const { pipeline } = props;
9424
+ const depthOfFieldEnabled = useProperty(pipeline, "depthOfFieldEnabled");
9425
+ const depthOfField = pipeline.depthOfField;
9426
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Depth of Field Enabled", target: pipeline, propertyKey: "depthOfFieldEnabled" }), jsxs(Collapse, { visible: !!depthOfFieldEnabled && !!depthOfField, children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Blur Level", target: pipeline, propertyKey: "depthOfFieldBlurLevel", options: DepthOfFieldBlurLevelOptions }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Focal Length", target: depthOfField, propertyKey: "focalLength", propertyPath: "depthOfField.focalLength", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "F-Stop", target: depthOfField, propertyKey: "fStop", propertyPath: "depthOfField.fStop", min: 0, step: 0.1 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Focus Distance", target: depthOfField, propertyKey: "focusDistance", propertyPath: "depthOfField.focusDistance", min: 0, step: 0.1 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Lens Size", target: depthOfField, propertyKey: "lensSize", propertyPath: "depthOfField.lensSize", min: 0, step: 1 })] })] }));
9427
+ };
9428
+ const DefaultRenderingPipelineFxaaGlowProperties = (props) => {
9429
+ const { pipeline } = props;
9430
+ const glowLayerEnabled = useProperty(pipeline, "glowLayerEnabled");
9431
+ const glowLayer = pipeline.glowLayer;
9432
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "FXAA Enabled", target: pipeline, propertyKey: "fxaaEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Glow Layer Enabled", target: pipeline, propertyKey: "glowLayerEnabled" }), jsxs(Collapse, { visible: !!glowLayerEnabled && !!glowLayer, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Kernel Size", target: glowLayer, propertyKey: "blurKernelSize", propertyPath: "glowLayer.blurKernelSize", min: 1, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: glowLayer, propertyKey: "intensity", propertyPath: "glowLayer.intensity", min: 0, step: 0.1 })] })] }));
9433
+ };
9434
+ const DefaultRenderingPipelineGrainProperties = (props) => {
9435
+ const { pipeline } = props;
9436
+ const grainEnabled = useProperty(pipeline, "grainEnabled");
9437
+ const grain = pipeline.grain;
9438
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Grain Enabled", target: pipeline, propertyKey: "grainEnabled" }), jsxs(Collapse, { visible: !!grainEnabled && !!grain, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Animated", target: grain, propertyKey: "animated", propertyPath: "grain.animated" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: grain, propertyKey: "intensity", propertyPath: "grain.intensity", min: 0, step: 0.1 })] })] }));
9439
+ };
9440
+ const DefaultRenderingPipelineImageProcessingProperties = (props) => {
9441
+ const { pipeline } = props;
9442
+ const imageProcessingEnabled = useProperty(pipeline, "imageProcessingEnabled");
9443
+ const imageProcessing = pipeline.imageProcessing;
9444
+ const vignetteEnabled = useProperty(imageProcessing, "vignetteEnabled");
9445
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Image Processing Enabled", target: pipeline, propertyKey: "imageProcessingEnabled" }), jsxs(Collapse, { visible: !!imageProcessingEnabled && !!imageProcessing, children: [jsx(ButtonLine, { label: "Convert Clear Color to Linear", onClick: () => {
9446
+ pipeline.scene.clearColor = pipeline.scene.clearColor.toLinearSpace(pipeline.scene.getEngine().useExactSrgbConversions);
9447
+ } }), jsx(ButtonLine, { label: "Convert Clear Color to Gamma", onClick: () => {
9448
+ pipeline.scene.clearColor = pipeline.scene.clearColor.toGammaSpace(pipeline.scene.getEngine().useExactSrgbConversions);
9449
+ } }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Contrast", target: imageProcessing, propertyKey: "contrast", propertyPath: "imageProcessing.contrast", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Exposure", target: imageProcessing, propertyKey: "exposure", propertyPath: "imageProcessing.exposure", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Tone Mapping Enabled", target: imageProcessing, propertyKey: "toneMappingEnabled", propertyPath: "imageProcessing.toneMappingEnabled" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Tone Mapping Type", target: imageProcessing, propertyKey: "toneMappingType", propertyPath: "imageProcessing.toneMappingType", options: ToneMappingTypeOptions }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Vignette Enabled", target: imageProcessing, propertyKey: "vignetteEnabled", propertyPath: "imageProcessing.vignetteEnabled" }), jsxs(Collapse, { visible: !!vignetteEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Weight", target: imageProcessing, propertyKey: "vignetteWeight", propertyPath: "imageProcessing.vignetteWeight", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Stretch", target: imageProcessing, propertyKey: "vignetteStretch", propertyPath: "imageProcessing.vignetteStretch", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Camera FOV", target: imageProcessing, propertyKey: "vignetteCameraFov", propertyPath: "imageProcessing.vignetteCameraFov", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center X", target: imageProcessing, propertyKey: "vignetteCenterX", propertyPath: "imageProcessing.vignetteCenterX", step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center Y", target: imageProcessing, propertyKey: "vignetteCenterY", propertyPath: "imageProcessing.vignetteCenterY", step: 0.1 }), jsx(BoundProperty, { component: Color4PropertyLine, label: "Vignette Color", target: imageProcessing, propertyKey: "vignetteColor", propertyPath: "imageProcessing.vignetteColor" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Vignette Blend Mode", target: imageProcessing, propertyKey: "vignetteBlendMode", propertyPath: "imageProcessing.vignetteBlendMode", options: VignetteBlendModeOptions })] }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Dithering Enabled", target: imageProcessing, propertyKey: "ditheringEnabled", propertyPath: "imageProcessing.ditheringEnabled" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Dithering Intensity", target: imageProcessing, propertyKey: "ditheringIntensity", propertyPath: "imageProcessing.ditheringIntensity", min: 0, step: 0.5 / 255 })] })] }));
9450
+ };
9451
+ const DefaultRenderingPipelineSharpenProperties = (props) => {
9452
+ const { pipeline } = props;
9453
+ const sharpenEnabled = useProperty(pipeline, "sharpenEnabled");
9454
+ const sharpen = pipeline.sharpen;
9455
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Sharpen Enabled", target: pipeline, propertyKey: "sharpenEnabled" }), jsxs(Collapse, { visible: !!sharpenEnabled && !!sharpen, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Color Amount", target: sharpen, propertyKey: "colorAmount", propertyPath: "sharpen.colorAmount", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Edge Amount", target: sharpen, propertyKey: "edgeAmount", propertyPath: "sharpen.edgeAmount", min: 0, step: 0.05 })] })] }));
9456
+ };
9457
+
9458
+ const LensRenderingPipelineOptionsProperties = (props) => {
9459
+ const { pipeline } = props;
9460
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Edge Blur", target: pipeline, propertyKey: "edgeBlur", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Edge Distortion", target: pipeline, propertyKey: "edgeDistortion", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Grain Amount", target: pipeline, propertyKey: "grainAmount", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Chromatic Aberration", target: pipeline, propertyKey: "chromaticAberration", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Darken Out of Focus", target: pipeline, propertyKey: "darkenOutOfFocus", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Blur Noise", target: pipeline, propertyKey: "blurNoise" })] }));
9461
+ };
9462
+ const LensRenderingPipelineDepthOfFieldProperties = (props) => {
9463
+ const { pipeline } = props;
9464
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "DOF Aperture", target: pipeline, propertyKey: "dofAperture", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "DOF Distortion", target: pipeline, propertyKey: "dofDistortion", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Pentagon Bokeh", target: pipeline, propertyKey: "pentagonBokeh" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Highlights Gain", target: pipeline, propertyKey: "highlightsGain", min: 0, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Highlights Threshold", target: pipeline, propertyKey: "highlightsThreshold", min: 0, step: 0.1 })] }));
9465
+ };
9466
+
9467
+ const SSAORenderingPipelineProperties = (props) => {
9468
+ const { pipeline } = props;
9469
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Total Strength", target: pipeline, propertyKey: "totalStrength", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base", target: pipeline, propertyKey: "base", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Radius", target: pipeline, propertyKey: "radius", min: 0.0001, step: 0.0001 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Area", target: pipeline, propertyKey: "area", min: 0.0001, step: 0.0001 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Fall Off", target: pipeline, propertyKey: "fallOff", min: 0, step: 0.000001 })] }));
9470
+ };
9471
+
9472
+ const SSAO2RenderingPipelineSSAOProperties = (props) => {
9473
+ const { pipeline } = props;
9474
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Total Strength", target: pipeline, propertyKey: "totalStrength", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base", target: pipeline, propertyKey: "base", min: 0, step: 0.05 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Max Z", target: pipeline, propertyKey: "maxZ", min: 0, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Min Z Aspect", target: pipeline, propertyKey: "minZAspect", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Radius", target: pipeline, propertyKey: "radius", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Epsilon", target: pipeline, propertyKey: "epsilon", min: 0, step: 0.001 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Samples", target: pipeline, propertyKey: "samples", min: 1, step: 1 })] }));
9475
+ };
9476
+ const SSAO2RenderingPipelineDenoiserProperties = (props) => {
9477
+ const { pipeline } = props;
9478
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Bypass Blur", target: pipeline, propertyKey: "bypassBlur" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Expensive Blur", target: pipeline, propertyKey: "expensiveBlur" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bilateral Samples", target: pipeline, propertyKey: "bilateralSamples", min: 2, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bilateral Soften", target: pipeline, propertyKey: "bilateralSoften", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bilateral Tolerance", target: pipeline, propertyKey: "bilateralTolerance", min: 0, step: 0.01 })] }));
9479
+ };
9480
+
9481
+ const SSRRenderingPipelineSSRProperties = (props) => {
9482
+ const { pipeline } = props;
9483
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: pipeline, propertyKey: "isEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Debug", target: pipeline, propertyKey: "debug" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Strength", target: pipeline, propertyKey: "strength", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflection Specular Falloff", target: pipeline, propertyKey: "reflectionSpecularFalloffExponent", min: 0, step: 0.05 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflectivity Threshold", target: pipeline, propertyKey: "reflectivityThreshold", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Thickness", target: pipeline, propertyKey: "thickness", min: 0, step: 0.01 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Step", target: pipeline, propertyKey: "step", min: 1, step: 1, forceInt: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enable Smooth Reflections", target: pipeline, propertyKey: "enableSmoothReflections" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Max Steps", target: pipeline, propertyKey: "maxSteps", min: 1, step: 10, forceInt: true }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Max Distance", target: pipeline, propertyKey: "maxDistance", min: 1, step: 10 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Roughness Factor", target: pipeline, propertyKey: "roughnessFactor", min: 0, step: 0.01 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Self Collision Skip", target: pipeline, propertyKey: "selfCollisionNumSkip", min: 1, step: 1 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "SSR Downsample", target: pipeline, propertyKey: "ssrDownsample", min: 0, step: 1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Clip to Frustum", target: pipeline, propertyKey: "clipToFrustum" })] }));
9484
+ };
9485
+ const SSRRenderingPipelineThicknessProperties = (props) => {
9486
+ const { pipeline } = props;
9487
+ const enableAutomaticThicknessComputation = useProperty(pipeline, "enableAutomaticThicknessComputation");
9488
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enable Automatic Thickness Computation", target: pipeline, propertyKey: "enableAutomaticThicknessComputation" }), jsxs(Collapse, { visible: !!enableAutomaticThicknessComputation, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Backface Force Depth Write Transparent Meshes", target: pipeline, propertyKey: "backfaceForceDepthWriteTransparentMeshes" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Backface Depth Texture Downsample", target: pipeline, propertyKey: "backfaceDepthTextureDownsample", min: 0, step: 1 })] })] }));
9489
+ };
9490
+ const SSRRenderingPipelineBlurProperties = (props) => {
9491
+ const { pipeline } = props;
9492
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Dispersion Strength", target: pipeline, propertyKey: "blurDispersionStrength", min: 0, step: 0.001 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Blur Downsample", target: pipeline, propertyKey: "blurDownsample", min: 0, step: 1 })] }));
9493
+ };
9494
+ const SSRRenderingPipelineAttenuationProperties = (props) => {
9495
+ const { pipeline } = props;
9496
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Attenuate Screen Borders", target: pipeline, propertyKey: "attenuateScreenBorders" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Attenuate Intersection Distance", target: pipeline, propertyKey: "attenuateIntersectionDistance" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Attenuate Intersection Iterations", target: pipeline, propertyKey: "attenuateIntersectionIterations" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Attenuate Facing Camera", target: pipeline, propertyKey: "attenuateFacingCamera" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Attenuate Backface Reflection", target: pipeline, propertyKey: "attenuateBackfaceReflection" })] }));
9497
+ };
9498
+ const SSRRenderingPipelineColorSpaceProperties = (props) => {
9499
+ const { pipeline } = props;
9500
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Input Texture Color Is In Gamma Space", target: pipeline, propertyKey: "inputTextureColorIsInGammaSpace" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Generate Output In Gamma Space", target: pipeline, propertyKey: "generateOutputInGammaSpace" })] }));
9501
+ };
9502
+
9503
+ const IblShadowsRenderPipelineVoxelProperties = (props) => {
9504
+ const { pipeline } = props;
9505
+ return (jsxs(Fragment, { children: [jsx(ButtonLine, { label: "Update Scene Bounds", onClick: () => pipeline.updateSceneBounds() }), jsx(ButtonLine, { label: "Revoxelize", onClick: () => pipeline.updateVoxelization() }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Shadow Opacity", target: pipeline, propertyKey: "shadowOpacity", min: 0, step: 0.05 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Sample Directions", target: pipeline, propertyKey: "sampleDirections", min: 0, step: 1 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Resolution Exp", target: pipeline, propertyKey: "resolutionExp", min: 4, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Shadow Remanence", target: pipeline, propertyKey: "shadowRemanence", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Voxel Shadow Opacity", target: pipeline, propertyKey: "voxelShadowOpacity", min: 0, step: 0.05 })] }));
9506
+ };
9507
+ const IblShadowsRenderPipelineScreenspaceProperties = (props) => {
9508
+ const { pipeline } = props;
9509
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "SS Shadow Opacity", target: pipeline, propertyKey: "ssShadowOpacity", min: 0, step: 0.01 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "SS Shadow Sample Count", target: pipeline, propertyKey: "ssShadowSampleCount", min: 0, step: 1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "SS Shadow Stride", target: pipeline, propertyKey: "ssShadowStride", min: 0, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "SS Shadow Distance Scale", target: pipeline, propertyKey: "ssShadowDistanceScale", min: 0.01, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "SS Shadow Thickness Scale", target: pipeline, propertyKey: "ssShadowThicknessScale", min: 0.005, step: 0.001 })] }));
9510
+ };
9511
+ const IblShadowsRenderPipelineDebugProperties = (props) => {
9512
+ const { pipeline } = props;
9513
+ const allowDebugPasses = useProperty(pipeline, "allowDebugPasses");
9514
+ return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Allow Debug Passes", target: pipeline, propertyKey: "allowDebugPasses" }), allowDebugPasses && (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Voxel Debug Enabled", target: pipeline, propertyKey: "voxelDebugEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "CDF Debug Enabled", target: pipeline, propertyKey: "cdfDebugEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Voxel Tracing Debug Enabled", target: pipeline, propertyKey: "voxelTracingDebugEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Spatial Blur Debug Enabled", target: pipeline, propertyKey: "spatialBlurPassDebugEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Accumulation Pass Debug Enabled", target: pipeline, propertyKey: "accumulationPassDebugEnabled" })] }))] }));
9515
+ };
9516
+
9282
9517
  const RenderingPipelinePropertiesServiceDefinition = {
9283
9518
  friendlyName: "Rendering Pipeline Properties",
9284
9519
  consumes: [PropertiesServiceIdentity],
9285
9520
  factory: (propertiesService) => {
9286
- // TODO: Add content registrations for each section and for each type in the RenderingPipeline class hierarchy.
9521
+ // Base PostProcessRenderPipeline properties (Samples slider)
9522
+ const baseRegistration = propertiesService.addSectionContent({
9523
+ key: "PostProcessRenderPipeline Properties",
9524
+ predicate: (entity) => entity instanceof PostProcessRenderPipeline,
9525
+ content: [
9526
+ {
9527
+ section: "General",
9528
+ component: ({ context }) => jsx(PostProcessRenderPipelineSamplesProperties, { pipeline: context }),
9529
+ },
9530
+ ],
9531
+ });
9532
+ // DefaultRenderingPipeline properties
9533
+ const defaultRegistration = propertiesService.addSectionContent({
9534
+ key: "DefaultRenderingPipeline Properties",
9535
+ predicate: (entity) => entity instanceof DefaultRenderingPipeline,
9536
+ content: [
9537
+ {
9538
+ section: "Bloom",
9539
+ component: ({ context }) => jsx(DefaultRenderingPipelineBloomProperties, { pipeline: context }),
9540
+ },
9541
+ {
9542
+ section: "Chromatic Aberration",
9543
+ component: ({ context }) => jsx(DefaultRenderingPipelineChromaticAberrationProperties, { pipeline: context }),
9544
+ },
9545
+ {
9546
+ section: "Depth of Field",
9547
+ component: ({ context }) => jsx(DefaultRenderingPipelineDepthOfFieldProperties, { pipeline: context }),
9548
+ },
9549
+ {
9550
+ section: "FXAA & Glow",
9551
+ component: ({ context }) => jsx(DefaultRenderingPipelineFxaaGlowProperties, { pipeline: context }),
9552
+ },
9553
+ {
9554
+ section: "Grain",
9555
+ component: ({ context }) => jsx(DefaultRenderingPipelineGrainProperties, { pipeline: context }),
9556
+ },
9557
+ {
9558
+ section: "Image Processing",
9559
+ component: ({ context }) => jsx(DefaultRenderingPipelineImageProcessingProperties, { pipeline: context }),
9560
+ },
9561
+ {
9562
+ section: "Sharpen",
9563
+ component: ({ context }) => jsx(DefaultRenderingPipelineSharpenProperties, { pipeline: context }),
9564
+ },
9565
+ ],
9566
+ });
9567
+ // LensRenderingPipeline properties
9568
+ const lensRegistration = propertiesService.addSectionContent({
9569
+ key: "LensRenderingPipeline Properties",
9570
+ predicate: (entity) => entity instanceof LensRenderingPipeline,
9571
+ content: [
9572
+ {
9573
+ section: "Options",
9574
+ component: ({ context }) => jsx(LensRenderingPipelineOptionsProperties, { pipeline: context }),
9575
+ },
9576
+ {
9577
+ section: "Depth of Field",
9578
+ component: ({ context }) => jsx(LensRenderingPipelineDepthOfFieldProperties, { pipeline: context }),
9579
+ },
9580
+ ],
9581
+ });
9582
+ // SSAORenderingPipeline properties
9583
+ const ssaoRegistration = propertiesService.addSectionContent({
9584
+ key: "SSAORenderingPipeline Properties",
9585
+ predicate: (entity) => entity instanceof SSAORenderingPipeline,
9586
+ content: [
9587
+ {
9588
+ section: "SSAO",
9589
+ component: ({ context }) => jsx(SSAORenderingPipelineProperties, { pipeline: context }),
9590
+ },
9591
+ ],
9592
+ });
9593
+ // SSAO2RenderingPipeline properties
9594
+ const ssao2Registration = propertiesService.addSectionContent({
9595
+ key: "SSAO2RenderingPipeline Properties",
9596
+ predicate: (entity) => entity instanceof SSAO2RenderingPipeline,
9597
+ content: [
9598
+ {
9599
+ section: "SSAO",
9600
+ component: ({ context }) => jsx(SSAO2RenderingPipelineSSAOProperties, { pipeline: context }),
9601
+ },
9602
+ {
9603
+ section: "Denoiser",
9604
+ component: ({ context }) => jsx(SSAO2RenderingPipelineDenoiserProperties, { pipeline: context }),
9605
+ },
9606
+ ],
9607
+ });
9608
+ // SSRRenderingPipeline properties
9609
+ const ssrRegistration = propertiesService.addSectionContent({
9610
+ key: "SSRRenderingPipeline Properties",
9611
+ predicate: (entity) => entity instanceof SSRRenderingPipeline,
9612
+ content: [
9613
+ {
9614
+ section: "SSR",
9615
+ component: ({ context }) => jsx(SSRRenderingPipelineSSRProperties, { pipeline: context }),
9616
+ },
9617
+ {
9618
+ section: "Automatic Thickness",
9619
+ component: ({ context }) => jsx(SSRRenderingPipelineThicknessProperties, { pipeline: context }),
9620
+ },
9621
+ {
9622
+ section: "Blur",
9623
+ component: ({ context }) => jsx(SSRRenderingPipelineBlurProperties, { pipeline: context }),
9624
+ },
9625
+ {
9626
+ section: "Attenuations",
9627
+ component: ({ context }) => jsx(SSRRenderingPipelineAttenuationProperties, { pipeline: context }),
9628
+ },
9629
+ {
9630
+ section: "Color Space",
9631
+ component: ({ context }) => jsx(SSRRenderingPipelineColorSpaceProperties, { pipeline: context }),
9632
+ },
9633
+ ],
9634
+ });
9635
+ // IblShadowsRenderPipeline properties
9636
+ const iblShadowsRegistration = propertiesService.addSectionContent({
9637
+ key: "IblShadowsRenderPipeline Properties",
9638
+ predicate: (entity) => entity instanceof IblShadowsRenderPipeline,
9639
+ content: [
9640
+ {
9641
+ section: "Voxel Shadows",
9642
+ component: ({ context }) => jsx(IblShadowsRenderPipelineVoxelProperties, { pipeline: context }),
9643
+ },
9644
+ {
9645
+ section: "Screenspace Shadows",
9646
+ component: ({ context }) => jsx(IblShadowsRenderPipelineScreenspaceProperties, { pipeline: context }),
9647
+ },
9648
+ {
9649
+ section: "Debug",
9650
+ component: ({ context }) => jsx(IblShadowsRenderPipelineDebugProperties, { pipeline: context }),
9651
+ },
9652
+ ],
9653
+ });
9287
9654
  return {
9288
9655
  dispose: () => {
9289
- // TODO: Dispose content registrations.
9656
+ baseRegistration.dispose();
9657
+ defaultRegistration.dispose();
9658
+ lensRegistration.dispose();
9659
+ ssaoRegistration.dispose();
9660
+ ssao2Registration.dispose();
9661
+ ssrRegistration.dispose();
9662
+ iblShadowsRegistration.dispose();
9290
9663
  },
9291
9664
  };
9292
9665
  },
@@ -13989,4 +14362,4 @@ const TextAreaPropertyLine = (props) => {
13989
14362
  AttachDebugLayer();
13990
14363
 
13991
14364
  export { useAsyncResource as $, Accordion as A, ButtonLine as B, Collapse as C, DebugServiceIdentity as D, ExtensibleAccordion as E, FileUploadLine as F, Theme as G, BuiltInsExtensionFeed as H, Inspector as I, useVector3Property as J, useColor3Property as K, Link as L, MakeLazyComponent as M, NumberDropdownPropertyLine as N, useColor4Property as O, Popover as P, useQuaternionProperty as Q, MakePropertyHook as R, SwitchPropertyLine as S, ToolsServiceIdentity as T, useInterceptObservable as U, Vector3PropertyLine as V, useEventfulState as W, useObservableCollection as X, useOrderedObservableCollection as Y, usePollingObservable as Z, useResource as _, SyncedSliderPropertyLine as a, useCompactMode as a0, useSidePaneDockOverrides as a1, useAngleConverters as a2, MakeTeachingMoment as a3, MakeDialogTeachingMoment as a4, InterceptFunction as a5, GetPropertyDescriptor as a6, IsPropertyReadonly as a7, InterceptProperty as a8, ObservableCollection as a9, Textarea as aA, TextInput as aB, ToggleButton as aC, ChildWindow as aD, FactorGradientList as aE, Color3GradientList as aF, Color4GradientList as aG, Pane as aH, BooleanBadgePropertyLine as aI, Color3PropertyLine as aJ, Color4PropertyLine as aK, HexPropertyLine as aL, NumberInputPropertyLine as aM, LinkPropertyLine as aN, PropertyLine as aO, LineContainer as aP, PlaceholderPropertyLine as aQ, StringifiedPropertyLine as aR, TextAreaPropertyLine as aS, TextPropertyLine as aT, RotationVectorPropertyLine as aU, QuaternionPropertyLine as aV, Vector2PropertyLine as aW, Vector4PropertyLine as aX, ConstructorFactory as aa, SelectionServiceIdentity as ab, SelectionServiceDefinition as ac, SettingsContextIdentity as ad, ShowInspector as ae, Checkbox as af, ColorPickerPopup as ag, InputHexField as ah, InputHsvField as ai, ComboBox as aj, DraggableLine as ak, Dropdown as al, NumberDropdown as am, StringDropdown as an, FactorGradientComponent as ao, Color3GradientComponent as ap, Color4GradientComponent as aq, ColorStepGradientComponent as ar, InfoLabel as as, List as at, PositionedPopover as au, SearchBar as av, SearchBox as aw, SpinButton as ax, Switch as ay, SyncedSliderInput as az, Button as b, TextInputPropertyLine as c, SpinButtonPropertyLine as d, CheckboxPropertyLine as e, MessageBar as f, ShellServiceIdentity as g, SceneContextIdentity as h, useObservableState as i, AccordionSection as j, useExtensionManager as k, MakePopoverTeachingMoment as l, TeachingMoment as m, SidePaneContainer as n, PropertiesServiceIdentity as o, SceneExplorerServiceIdentity as p, SettingsServiceIdentity as q, StatsServiceIdentity as r, ConvertOptions as s, AttachDebugLayer as t, useProperty as u, DetachDebugLayer as v, StringDropdownPropertyLine as w, BoundProperty as x, Property as y, LinkToEntityPropertyLine as z };
13992
- //# sourceMappingURL=index-9hCGH1vt.js.map
14365
+ //# sourceMappingURL=index-CxcZXjGK.js.map