@babylonjs/inspector 8.45.5-preview → 8.46.0-preview
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{captureService-c_Nc-JkH.js → captureService-CoxrGxaU.js} +4 -3
- package/lib/{captureService-c_Nc-JkH.js.map → captureService-CoxrGxaU.js.map} +1 -1
- package/lib/{exportService-BvQmBhyv.js → exportService-Bh80tA6P.js} +4 -3
- package/lib/{exportService-BvQmBhyv.js.map → exportService-Bh80tA6P.js.map} +1 -1
- package/lib/{extensionsListService-DxjhVAwt.js → extensionsListService-13sAWV0u.js} +3 -2
- package/lib/{extensionsListService-DxjhVAwt.js.map → extensionsListService-13sAWV0u.js.map} +1 -1
- package/lib/{importService-DxFxT2li.js → importService-TdRBtTlS.js} +4 -3
- package/lib/{importService-DxFxT2li.js.map → importService-TdRBtTlS.js.map} +1 -1
- package/lib/{index-C7ey_J-r.js → index-9hCGH1vt.js} +247 -85
- package/lib/index-9hCGH1vt.js.map +1 -0
- package/lib/index.d.ts +22 -2
- package/lib/index.js +3 -2
- package/lib/index.js.map +1 -1
- package/lib/{quickCreateToolsService-Cu0BSIWb.js → quickCreateToolsService-hEV1m5Nc.js} +178 -56
- package/lib/quickCreateToolsService-hEV1m5Nc.js.map +1 -0
- package/package.json +1 -1
- package/lib/index-C7ey_J-r.js.map +0 -1
- package/lib/quickCreateToolsService-Cu0BSIWb.js.map +0 -1
|
@@ -3,10 +3,10 @@ import { createContext, useContext, useCallback, useMemo, useEffect, useState, u
|
|
|
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
|
+
import { GetClassName } from '@babylonjs/core/Misc/typeStore.js';
|
|
6
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';
|
|
7
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';
|
|
8
9
|
import { Collapse as Collapse$1, Fade } from '@fluentui/react-motion-components-preview';
|
|
9
|
-
import '@babylonjs/core/Misc/typeStore.js';
|
|
10
10
|
import { useLocalStorage, useTernaryDarkMode } from 'usehooks-ts';
|
|
11
11
|
import { AsyncLock } from '@babylonjs/core/Misc/asyncLock.js';
|
|
12
12
|
import { Deferred } from '@babylonjs/core/Misc/deferred.js';
|
|
@@ -49,6 +49,7 @@ import { Atmosphere } from '@babylonjs/addons/atmosphere/atmosphere.js';
|
|
|
49
49
|
import { ArcRotateCamera } from '@babylonjs/core/Cameras/arcRotateCamera.js';
|
|
50
50
|
import { FollowCamera } from '@babylonjs/core/Cameras/followCamera.js';
|
|
51
51
|
import { FreeCamera } from '@babylonjs/core/Cameras/freeCamera.js';
|
|
52
|
+
import { GeospatialCamera } from '@babylonjs/core/Cameras/geospatialCamera.js';
|
|
52
53
|
import { TargetCamera } from '@babylonjs/core/Cameras/targetCamera.js';
|
|
53
54
|
import { Scene } from '@babylonjs/core/scene.js';
|
|
54
55
|
import { FrameGraph } from '@babylonjs/core/FrameGraph/frameGraph.js';
|
|
@@ -559,6 +560,133 @@ function MakePropertyHook(value) {
|
|
|
559
560
|
}
|
|
560
561
|
}
|
|
561
562
|
|
|
563
|
+
// Check if BABYLON namespace exists
|
|
564
|
+
let BabylonNamespace = "";
|
|
565
|
+
const GlobalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined;
|
|
566
|
+
if (typeof GlobalObject !== "undefined") {
|
|
567
|
+
if (typeof GlobalObject.BABYLON !== "undefined") {
|
|
568
|
+
BabylonNamespace = "BABYLON.";
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
// Inspired by previous copyToClipboard() function which was copying Color3
|
|
572
|
+
// Copies strCommand to clipboard
|
|
573
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
574
|
+
function copyCommandToClipboard(strCommand) {
|
|
575
|
+
const element = document.createElement("div");
|
|
576
|
+
element.textContent = strCommand;
|
|
577
|
+
document.body.appendChild(element);
|
|
578
|
+
if (window.getSelection) {
|
|
579
|
+
const range = document.createRange();
|
|
580
|
+
range.selectNode(element);
|
|
581
|
+
window.getSelection().removeAllRanges();
|
|
582
|
+
window.getSelection().addRange(range);
|
|
583
|
+
}
|
|
584
|
+
document.execCommand("copy");
|
|
585
|
+
element.remove();
|
|
586
|
+
}
|
|
587
|
+
// Return the class name of the considered target
|
|
588
|
+
// babylonNamespace is either "" (ES6) or "BABYLON."
|
|
589
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
590
|
+
function getClassNameWithNamespace(obj) {
|
|
591
|
+
let className = GetClassName(obj);
|
|
592
|
+
if (className.includes("BABYLON.")) {
|
|
593
|
+
className = className.split("BABYLON.")[1];
|
|
594
|
+
}
|
|
595
|
+
return { className, babylonNamespace: BabylonNamespace };
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Generates a string representation of a value for clipboard copy.
|
|
600
|
+
* Handles primitives, vectors, colors, quaternions, and other Babylon.js types.
|
|
601
|
+
* @param value - The value to convert to a string
|
|
602
|
+
* @returns A string that can be used to recreate the value
|
|
603
|
+
*/
|
|
604
|
+
function GenerateCopyString(value) {
|
|
605
|
+
if (value === null) {
|
|
606
|
+
return "null";
|
|
607
|
+
}
|
|
608
|
+
if (value === undefined) {
|
|
609
|
+
return "undefined";
|
|
610
|
+
}
|
|
611
|
+
// Primitives
|
|
612
|
+
if (typeof value === "string") {
|
|
613
|
+
return `"${value}"`;
|
|
614
|
+
}
|
|
615
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
616
|
+
return String(value);
|
|
617
|
+
}
|
|
618
|
+
// Objects with getClassName (Babylon types like Vector3, Color3, Quaternion, etc.)
|
|
619
|
+
if (typeof value === "object" && value !== null) {
|
|
620
|
+
const obj = value;
|
|
621
|
+
// Check for Babylon.js types with getClassName
|
|
622
|
+
if (typeof obj.getClassName === "function") {
|
|
623
|
+
const className = obj.getClassName();
|
|
624
|
+
const { babylonNamespace } = getClassNameWithNamespace(value);
|
|
625
|
+
// Vector2, Vector3, Vector4
|
|
626
|
+
if (className === "Vector2") {
|
|
627
|
+
return `new ${babylonNamespace}Vector2(${obj.x}, ${obj.y})`;
|
|
628
|
+
}
|
|
629
|
+
if (className === "Vector3") {
|
|
630
|
+
return `new ${babylonNamespace}Vector3(${obj.x}, ${obj.y}, ${obj.z})`;
|
|
631
|
+
}
|
|
632
|
+
if (className === "Vector4") {
|
|
633
|
+
return `new ${babylonNamespace}Vector4(${obj.x}, ${obj.y}, ${obj.z}, ${obj.w})`;
|
|
634
|
+
}
|
|
635
|
+
// Quaternion
|
|
636
|
+
if (className === "Quaternion") {
|
|
637
|
+
return `new ${babylonNamespace}Quaternion(${obj.x}, ${obj.y}, ${obj.z}, ${obj.w})`;
|
|
638
|
+
}
|
|
639
|
+
// Color3, Color4
|
|
640
|
+
if (className === "Color3") {
|
|
641
|
+
const hexString = ColorToHex(obj.r, obj.g, obj.b, 1);
|
|
642
|
+
return `new ${babylonNamespace}Color3(${obj.r}, ${obj.g}, ${obj.b}) // (HEX: ${hexString})`;
|
|
643
|
+
}
|
|
644
|
+
if (className === "Color4") {
|
|
645
|
+
const hexString = ColorToHex(obj.r, obj.g, obj.b, obj.a);
|
|
646
|
+
return `new ${babylonNamespace}Color4(${obj.r}, ${obj.g}, ${obj.b}, ${obj.a}) // (HEX: ${hexString})`;
|
|
647
|
+
}
|
|
648
|
+
// Matrix - output as array
|
|
649
|
+
if (className === "Matrix" && typeof obj.toArray === "function") {
|
|
650
|
+
const arr = obj.toArray();
|
|
651
|
+
return `${babylonNamespace}Matrix.FromArray([${arr.join(", ")}])`;
|
|
652
|
+
}
|
|
653
|
+
// For other Babylon types with a name property (like nodes, materials, etc.)
|
|
654
|
+
if (typeof obj.name === "string") {
|
|
655
|
+
return `"${obj.name}"`;
|
|
656
|
+
}
|
|
657
|
+
// Fallback: use className
|
|
658
|
+
return `[${className}]`;
|
|
659
|
+
}
|
|
660
|
+
// Plain objects or arrays
|
|
661
|
+
if (Array.isArray(value)) {
|
|
662
|
+
return `[${value.map(GenerateCopyString).join(", ")}]`;
|
|
663
|
+
}
|
|
664
|
+
// Fallback for other objects
|
|
665
|
+
return JSON.stringify(value);
|
|
666
|
+
}
|
|
667
|
+
return String(value);
|
|
668
|
+
}
|
|
669
|
+
/**
|
|
670
|
+
* Converts linear color values (0-1) to a hex string with alpha.
|
|
671
|
+
* @param r - Red component (0-1, linear)
|
|
672
|
+
* @param g - Green component (0-1, linear)
|
|
673
|
+
* @param b - Blue component (0-1, linear)
|
|
674
|
+
* @param a - Alpha component (0-1)
|
|
675
|
+
* @returns Hex string in format #RRGGBBAA
|
|
676
|
+
*/
|
|
677
|
+
function ColorToHex(r, g, b, a) {
|
|
678
|
+
// Convert linear to sRGB and then to 0-255 range
|
|
679
|
+
const toSRGB = (c) => Math.round(Math.min(255, Math.max(0, Math.pow(c, 1 / 2.2) * 255)));
|
|
680
|
+
const rHex = toSRGB(r).toString(16).padStart(2, "0").toUpperCase();
|
|
681
|
+
const gHex = toSRGB(g).toString(16).padStart(2, "0").toUpperCase();
|
|
682
|
+
const bHex = toSRGB(b).toString(16).padStart(2, "0").toUpperCase();
|
|
683
|
+
const aHex = Math.round(Math.min(255, Math.max(0, a * 255)))
|
|
684
|
+
.toString(16)
|
|
685
|
+
.padStart(2, "0")
|
|
686
|
+
.toUpperCase();
|
|
687
|
+
return `#${rHex}${gHex}${bHex}${aHex}`;
|
|
688
|
+
}
|
|
689
|
+
|
|
562
690
|
function BoundPropertyCoreImpl(props, ref) {
|
|
563
691
|
const { target, propertyKey } = props;
|
|
564
692
|
// Get the value of the property. If it changes, it will cause a re-render, which is needed to
|
|
@@ -572,7 +700,7 @@ function BoundPropertyCoreImpl(props, ref) {
|
|
|
572
700
|
const SpecificComponent = useMemo(() => {
|
|
573
701
|
return (props) => {
|
|
574
702
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
575
|
-
const { target, propertyKey, convertTo, convertFrom, component: Component, ...rest } = props;
|
|
703
|
+
const { target, propertyKey, propertyPath, convertTo, convertFrom, component: Component, ...rest } = props;
|
|
576
704
|
// Hook the property, using the specific hook that also catches changes to nested properties as well (like x/y/z on a Vector3 for example).
|
|
577
705
|
const value = useSpecificProperty(target, propertyKey);
|
|
578
706
|
const convertedValue = convertTo ? convertTo(value) : value;
|
|
@@ -589,6 +717,14 @@ function BoundPropertyCoreImpl(props, ref) {
|
|
|
589
717
|
return undefined;
|
|
590
718
|
}, [target, propertyKey, convertFrom, notifyPropertyChanged]);
|
|
591
719
|
const propsToSend = {
|
|
720
|
+
// will be overriden if custom onCopy is passed in
|
|
721
|
+
onCopy: () => {
|
|
722
|
+
if (propertyPath) {
|
|
723
|
+
return GetOnCopyString(value, propertyPath);
|
|
724
|
+
}
|
|
725
|
+
const { className, babylonNamespace } = getClassNameWithNamespace(target);
|
|
726
|
+
return `${GetOnCopyString(value, String(propertyKey))} // (debugNode as ${babylonNamespace}${className})`;
|
|
727
|
+
},
|
|
592
728
|
...rest,
|
|
593
729
|
ref,
|
|
594
730
|
value: convertedValue,
|
|
@@ -628,6 +764,30 @@ function CreateGenericForwardRef(render) {
|
|
|
628
764
|
* @returns JSX element
|
|
629
765
|
*/
|
|
630
766
|
const BoundProperty = CreateGenericForwardRef(BoundPropertyImpl);
|
|
767
|
+
function GetOnCopyString(value, propertyPath) {
|
|
768
|
+
const valueStr = GenerateCopyString(value);
|
|
769
|
+
return `globalThis.debugNode.${propertyPath} = ${valueStr};`;
|
|
770
|
+
}
|
|
771
|
+
function PropertyImpl(props, ref) {
|
|
772
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
773
|
+
const { component: Component, propertyPath, value, ...rest } = props;
|
|
774
|
+
const propsToSend = {
|
|
775
|
+
onCopy: () => GetOnCopyString(value, propertyPath),
|
|
776
|
+
...rest,
|
|
777
|
+
ref,
|
|
778
|
+
value,
|
|
779
|
+
};
|
|
780
|
+
return jsx(Component, { ...propsToSend });
|
|
781
|
+
}
|
|
782
|
+
/**
|
|
783
|
+
* A simpler version of BoundProperty that only provides the onCopy functionality.
|
|
784
|
+
* Does not bind the value/onChange - those must be provided by the caller.
|
|
785
|
+
* Use this when you need copy support but have custom value/onChange handling.
|
|
786
|
+
*
|
|
787
|
+
* @param props PropertyProps with propertyName for copy support
|
|
788
|
+
* @returns JSX element
|
|
789
|
+
*/
|
|
790
|
+
const Property = CreateGenericForwardRef(PropertyImpl);
|
|
631
791
|
|
|
632
792
|
const useCollapseStyles = makeStyles({
|
|
633
793
|
collapseContent: {
|
|
@@ -653,27 +813,6 @@ const Collapse = (props) => {
|
|
|
653
813
|
return (jsx(Collapse$1, { visible: props.visible, orientation: props.orientation, children: jsx("div", { className: `${classes.collapseContent} ${props.orientation === "horizontal" ? classes.horizontal : classes.vertical}`, children: props.children }) }));
|
|
654
814
|
};
|
|
655
815
|
|
|
656
|
-
const GlobalObject = typeof global !== "undefined" ? global : typeof window !== "undefined" ? window : undefined;
|
|
657
|
-
if (typeof GlobalObject !== "undefined") {
|
|
658
|
-
if (typeof GlobalObject.BABYLON !== "undefined") ;
|
|
659
|
-
}
|
|
660
|
-
// Inspired by previous copyToClipboard() function which was copying Color3
|
|
661
|
-
// Copies strCommand to clipboard
|
|
662
|
-
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
663
|
-
function copyCommandToClipboard(strCommand) {
|
|
664
|
-
const element = document.createElement("div");
|
|
665
|
-
element.textContent = strCommand;
|
|
666
|
-
document.body.appendChild(element);
|
|
667
|
-
if (window.getSelection) {
|
|
668
|
-
const range = document.createRange();
|
|
669
|
-
range.selectNode(element);
|
|
670
|
-
window.getSelection().removeAllRanges();
|
|
671
|
-
window.getSelection().addRange(range);
|
|
672
|
-
}
|
|
673
|
-
document.execCommand("copy");
|
|
674
|
-
element.remove();
|
|
675
|
-
}
|
|
676
|
-
|
|
677
816
|
const ToolContext = createContext({ useFluent: false, disableCopy: false, toolName: "", size: undefined });
|
|
678
817
|
|
|
679
818
|
const Link = forwardRef((props, ref) => {
|
|
@@ -724,7 +863,7 @@ const Button = forwardRef((props, ref) => {
|
|
|
724
863
|
const { icon: Icon, label, onClick, disabled, ...buttonProps } = props;
|
|
725
864
|
const [isOnClickBusy, setIsOnClickBusy] = useState(false);
|
|
726
865
|
const handleOnClick = useCallback(async (e) => {
|
|
727
|
-
const result = onClick?.();
|
|
866
|
+
const result = onClick?.(e);
|
|
728
867
|
if (result instanceof Promise) {
|
|
729
868
|
setIsOnClickBusy(true);
|
|
730
869
|
try {
|
|
@@ -3888,7 +4027,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3888
4027
|
keywords: ["export", "gltf", "glb", "babylon", "exporter", "tools"],
|
|
3889
4028
|
...BabylonWebResources,
|
|
3890
4029
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3891
|
-
getExtensionModuleAsync: async () => await import('./exportService-
|
|
4030
|
+
getExtensionModuleAsync: async () => await import('./exportService-Bh80tA6P.js'),
|
|
3892
4031
|
},
|
|
3893
4032
|
{
|
|
3894
4033
|
name: "Capture Tools",
|
|
@@ -3896,7 +4035,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3896
4035
|
keywords: ["capture", "screenshot", "gif", "video", "tools"],
|
|
3897
4036
|
...BabylonWebResources,
|
|
3898
4037
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3899
|
-
getExtensionModuleAsync: async () => await import('./captureService-
|
|
4038
|
+
getExtensionModuleAsync: async () => await import('./captureService-CoxrGxaU.js'),
|
|
3900
4039
|
},
|
|
3901
4040
|
{
|
|
3902
4041
|
name: "Import Tools",
|
|
@@ -3904,7 +4043,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3904
4043
|
keywords: ["import", "tools"],
|
|
3905
4044
|
...BabylonWebResources,
|
|
3906
4045
|
author: { name: "Alex Chuber", forumUserName: "alexchuber" },
|
|
3907
|
-
getExtensionModuleAsync: async () => await import('./importService-
|
|
4046
|
+
getExtensionModuleAsync: async () => await import('./importService-TdRBtTlS.js'),
|
|
3908
4047
|
},
|
|
3909
4048
|
{
|
|
3910
4049
|
name: "Quick Creation Tools (Preview)",
|
|
@@ -3912,7 +4051,7 @@ const DefaultInspectorExtensionFeed = new BuiltInsExtensionFeed("Inspector", [
|
|
|
3912
4051
|
keywords: ["creation", "tools"],
|
|
3913
4052
|
...BabylonWebResources,
|
|
3914
4053
|
author: { name: "Babylon.js", forumUserName: "" },
|
|
3915
|
-
getExtensionModuleAsync: async () => await import('./quickCreateToolsService-
|
|
4054
|
+
getExtensionModuleAsync: async () => await import('./quickCreateToolsService-hEV1m5Nc.js'),
|
|
3916
4055
|
},
|
|
3917
4056
|
]);
|
|
3918
4057
|
|
|
@@ -4431,7 +4570,7 @@ const TensorPropertyLine = (props) => {
|
|
|
4431
4570
|
useEffect(() => {
|
|
4432
4571
|
setVector(props.value);
|
|
4433
4572
|
}, [props.value, props.expandedContent]);
|
|
4434
|
-
return (jsx(PropertyLine, { ...props,
|
|
4573
|
+
return (jsx(PropertyLine, { ...props, expandedContent: vector ? jsx(VectorSliders, { vector: vector, min: min, max: max, unit: props.unit, step: props.step, converted: converted, onChange: onChange }) : undefined, children: jsx(Body1, { children: `[${formatted(props.value.x)}, ${formatted(props.value.y)}${HasZ(props.value) ? `, ${formatted(props.value.z)}` : ""}${HasW(props.value) ? `, ${formatted(props.value.w)}` : ""}]` }) }));
|
|
4435
4574
|
};
|
|
4436
4575
|
const VectorSliders = ({ vector, min, max, unit, step, converted, onChange }) => (jsxs(Fragment, { children: [jsx(SyncedSliderPropertyLine, { label: "X", value: converted(vector.x), min: min, max: max, onChange: (val) => onChange(val, "x"), unit: unit, step: step }), jsx(SyncedSliderPropertyLine, { label: "Y", value: converted(vector.y), min: min, max: max, onChange: (val) => onChange(val, "y"), unit: unit, step: step }), HasZ(vector) && jsx(SyncedSliderPropertyLine, { label: "Z", value: converted(vector.z), min: min, max: max, onChange: (val) => onChange(val, "z"), unit: unit, step: step }), HasW(vector) && jsx(SyncedSliderPropertyLine, { label: "W", value: converted(vector.w), min: min, max: max, onChange: (val) => onChange(val, "w"), unit: unit, step: step })] }));
|
|
4437
4576
|
const ToDegreesConverter = { from: Tools.ToDegrees, to: Tools.ToRadians };
|
|
@@ -5049,7 +5188,7 @@ function MakeModularTool(options) {
|
|
|
5049
5188
|
});
|
|
5050
5189
|
// Register the extension list service (for browsing/installing extensions) if extension feeds are provided.
|
|
5051
5190
|
if (extensionFeeds.length > 0) {
|
|
5052
|
-
const { ExtensionListServiceDefinition } = await import('./extensionsListService-
|
|
5191
|
+
const { ExtensionListServiceDefinition } = await import('./extensionsListService-13sAWV0u.js');
|
|
5053
5192
|
await serviceContainer.addServiceAsync(ExtensionListServiceDefinition);
|
|
5054
5193
|
}
|
|
5055
5194
|
// Register the theme selector service (for selecting the theme) if theming is configured.
|
|
@@ -5563,11 +5702,11 @@ const AnimationPropertiesServiceDefinition = {
|
|
|
5563
5702
|
|
|
5564
5703
|
const GeneralAtmosphereProperties = (props) => {
|
|
5565
5704
|
const { entity: atmosphere } = props;
|
|
5566
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Planet Radius (km)", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "planetRadius", min: 1000.0, max: 10000.0, step: 1 }), jsx(BoundProperty, { label: "Atmosphere Thickness (km)", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "atmosphereThickness", min: 1.0, max: 200.0, step: 1 })] }));
|
|
5705
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Planet Radius (km)", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "planetRadius", propertyPath: "physicalProperties.planetRadius", min: 1000.0, max: 10000.0, step: 1 }), jsx(BoundProperty, { label: "Atmosphere Thickness (km)", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "atmosphereThickness", propertyPath: "physicalProperties.atmosphereThickness", min: 1.0, max: 200.0, step: 1 })] }));
|
|
5567
5706
|
};
|
|
5568
5707
|
const ScatteringAndAbsorptionProperties = (props) => {
|
|
5569
5708
|
const { entity: atmosphere } = props;
|
|
5570
|
-
return (jsxs(Fragment, { children: [jsx(PropertyLine, { label: "Rayleigh Scattering", expandByDefault: true, description: "Rayleigh scattering is the scattering of light off of the molecules of the atmosphere. It is the main reason why the sky is blue. Increasing the Rayleigh scattering coefficient will result in a bluer sky.", expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "rayleighScatteringScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakRayleighScattering", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Mie Scattering", description: "Mie scattering is the scattering of light off of the larger particles in the atmosphere, such as dust and water droplets. It is responsible for the white appearance of clouds and the haziness of the sky. Increasing the Mie scattering coefficient will result in a whiter sky.", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "mieScatteringScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakMieScattering", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Mie Absorption", description: "Mie absorption is the absorption of light by the larger particles in the atmosphere, such as dust and water droplets. It is responsible for the dimming of the sun during haze and fog. Increasing mie absorption coefficient will result in visually darker skies.", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "mieAbsorptionScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakMieAbsorption", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Ozone Absorption", expandByDefault: true, description: "Ozone absorption is the absorption of light by ozone molecules in the atmosphere. Increasing ozone absorption coefficient will result in visually darker skies.", expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "ozoneAbsorptionScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakOzoneAbsorption", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01 })] }) })] }));
|
|
5709
|
+
return (jsxs(Fragment, { children: [jsx(PropertyLine, { label: "Rayleigh Scattering", expandByDefault: true, description: "Rayleigh scattering is the scattering of light off of the molecules of the atmosphere. It is the main reason why the sky is blue. Increasing the Rayleigh scattering coefficient will result in a bluer sky.", expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "rayleighScatteringScale", propertyPath: "physicalProperties.rayleighScatteringScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakRayleighScattering", propertyPath: "physicalProperties.peakRayleighScattering", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Mie Scattering", description: "Mie scattering is the scattering of light off of the larger particles in the atmosphere, such as dust and water droplets. It is responsible for the white appearance of clouds and the haziness of the sky. Increasing the Mie scattering coefficient will result in a whiter sky.", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "mieScatteringScale", propertyPath: "physicalProperties.mieScatteringScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakMieScattering", propertyPath: "physicalProperties.peakMieScattering", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Mie Absorption", description: "Mie absorption is the absorption of light by the larger particles in the atmosphere, such as dust and water droplets. It is responsible for the dimming of the sun during haze and fog. Increasing mie absorption coefficient will result in visually darker skies.", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "mieAbsorptionScale", propertyPath: "physicalProperties.mieAbsorptionScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakMieAbsorption", propertyPath: "physicalProperties.peakMieAbsorption", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01, unit: "Mm" })] }) }), jsx(PropertyLine, { label: "Ozone Absorption", expandByDefault: true, description: "Ozone absorption is the absorption of light by ozone molecules in the atmosphere. Increasing ozone absorption coefficient will result in visually darker skies.", expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { label: "Scale", component: SyncedSliderPropertyLine, target: atmosphere.physicalProperties, propertyKey: "ozoneAbsorptionScale", propertyPath: "physicalProperties.ozoneAbsorptionScale", min: 0.0, max: 5.0, step: 0.01 }), jsx(BoundProperty, { label: "Coefficient", component: Vector3PropertyLine, target: atmosphere.physicalProperties, propertyKey: "peakOzoneAbsorption", propertyPath: "physicalProperties.peakOzoneAbsorption", convertTo: (value) => value.scale(1000), convertFrom: (value) => value.scale(0.001), min: 0, step: 0.01 })] }) })] }));
|
|
5571
5710
|
};
|
|
5572
5711
|
const MultipleScatteringProperties = (props) => {
|
|
5573
5712
|
const { entity: atmosphere } = props;
|
|
@@ -5649,8 +5788,7 @@ const ArcRotateCameraControlProperties = (props) => {
|
|
|
5649
5788
|
};
|
|
5650
5789
|
const ArcRotateCameraCollisionProperties = (props) => {
|
|
5651
5790
|
const { camera } = props;
|
|
5652
|
-
|
|
5653
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Check Collisions", target: camera, propertyKey: "checkCollisions" }), jsx(Vector3PropertyLine, { label: "Collision Radius", value: collisionRadius, onChange: (val) => (camera.collisionRadius = val) })] }));
|
|
5791
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Check Collisions", target: camera, propertyKey: "checkCollisions" }), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Collision Radius", target: camera, propertyKey: "collisionRadius" })] }));
|
|
5654
5792
|
};
|
|
5655
5793
|
const ArcRotateCameraLimitsProperties = (props) => {
|
|
5656
5794
|
const { camera } = props;
|
|
@@ -5662,6 +5800,31 @@ const ArcRotateCameraBehaviorsProperties = (props) => {
|
|
|
5662
5800
|
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Auto Rotation", target: camera, propertyKey: "useAutoRotationBehavior" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Bouncing", target: camera, propertyKey: "useBouncingBehavior" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Framing", target: camera, propertyKey: "useFramingBehavior" })] }));
|
|
5663
5801
|
};
|
|
5664
5802
|
|
|
5803
|
+
const GeospatialCameraTransformProperties = (props) => {
|
|
5804
|
+
const { camera, settings } = props;
|
|
5805
|
+
const [toDisplayAngle, fromDisplayAngle, useDegrees] = useAngleConverters(settings);
|
|
5806
|
+
const limits = useProperty(camera, "limits");
|
|
5807
|
+
const yawMin = limits?.yawMin ?? -Math.PI;
|
|
5808
|
+
const yawMax = limits?.yawMax ?? Math.PI;
|
|
5809
|
+
const pitchMin = limits?.pitchMin ?? 0;
|
|
5810
|
+
const pitchMax = limits?.pitchMax ?? Math.PI / 2;
|
|
5811
|
+
const radiusMin = limits?.radiusMin ?? 0;
|
|
5812
|
+
const radiusMax = limits?.radiusMax ?? Infinity;
|
|
5813
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Yaw", description: `Horizontal rotation in ${useDegrees ? "degrees" : "radians"} (0 = north)`, target: camera, propertyKey: "yaw", min: toDisplayAngle(yawMin), max: toDisplayAngle(yawMax), step: toDisplayAngle(0.01), convertTo: (value) => toDisplayAngle(value, true), convertFrom: fromDisplayAngle }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Pitch", description: `Vertical angle in ${useDegrees ? "degrees" : "radians"} (0 = looking down, π/2 = horizon)`, target: camera, propertyKey: "pitch", min: toDisplayAngle(pitchMin), max: toDisplayAngle(pitchMax), step: toDisplayAngle(0.01), convertTo: (value) => toDisplayAngle(value, true), convertFrom: fromDisplayAngle }), radiusMax !== Infinity ? (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Radius", description: "Distance from the center point.", target: camera, propertyKey: "radius", min: radiusMin, max: radiusMax, step: 0.01 })) : (jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Radius", description: "Distance from the center point.", target: camera, propertyKey: "radius", min: 0, step: 0.01 })), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Center", description: "The point on the globe the camera orbits around.", target: camera, propertyKey: "center" }), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Position", description: "The camera's position.", target: camera, propertyKey: "position" })] }));
|
|
5814
|
+
};
|
|
5815
|
+
const GeospatialCameraCollisionProperties = (props) => {
|
|
5816
|
+
const { camera } = props;
|
|
5817
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Check Collisions", target: camera, propertyKey: "checkCollisions" }), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Collision Offset", target: camera, propertyKey: "perFrameCollisionOffset" })] }));
|
|
5818
|
+
};
|
|
5819
|
+
const GeospatialCameraLimitsProperties = (props) => {
|
|
5820
|
+
const { camera } = props;
|
|
5821
|
+
const limits = useProperty(camera, "limits");
|
|
5822
|
+
if (!limits) {
|
|
5823
|
+
return null;
|
|
5824
|
+
}
|
|
5825
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Pitch Min", description: "Minimum pitch angle (0 = looking straight down)", target: limits, propertyKey: "pitchMin", propertyPath: "limits.pitchMin" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Pitch Max", description: "Maximum pitch angle (\u03C0/2 = horizon)", target: limits, propertyKey: "pitchMax", propertyPath: "limits.pitchMax" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Yaw Min", description: "Minimum yaw angle", target: limits, propertyKey: "yawMin", propertyPath: "limits.yawMin" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Yaw Max", description: "Maximum yaw angle", target: limits, propertyKey: "yawMax", propertyPath: "limits.yawMax" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Radius Min", description: "Minimum distance from center", target: limits, propertyKey: "radiusMin", propertyPath: "limits.radiusMin" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Radius Max", description: "Maximum distance from center", target: limits, propertyKey: "radiusMax", propertyPath: "limits.radiusMax" }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Pinch to Pan Max", description: "Distance threshold for pinch vs pan mode", target: limits, propertyKey: "pinchToPanMax", propertyPath: "limits.pinchToPanMax" })] }));
|
|
5826
|
+
};
|
|
5827
|
+
|
|
5665
5828
|
const MaskValidatorFn = (valueString) => {
|
|
5666
5829
|
if (valueString.substring(0, 2) != "0x") {
|
|
5667
5830
|
if (valueString.substring(0, 1) != "0") {
|
|
@@ -5733,24 +5896,15 @@ const FollowCameraTransformProperties = (props) => {
|
|
|
5733
5896
|
};
|
|
5734
5897
|
const FollowCameraLimitsProperties = (props) => {
|
|
5735
5898
|
const { camera } = props;
|
|
5736
|
-
|
|
5737
|
-
const upperRadiusLimit = useProperty(camera, "upperRadiusLimit") ?? 0;
|
|
5738
|
-
const lowerRotationOffsetLimit = useProperty(camera, "lowerRotationOffsetLimit") ?? 0;
|
|
5739
|
-
const upperRotationOffsetLimit = useProperty(camera, "upperRotationOffsetLimit") ?? 0;
|
|
5740
|
-
const lowerHeightOffsetLimit = useProperty(camera, "lowerHeightOffsetLimit") ?? 0;
|
|
5741
|
-
const upperHeightOffsetLimit = useProperty(camera, "upperHeightOffsetLimit") ?? 0;
|
|
5742
|
-
const maxCameraSpeed = useProperty(camera, "maxCameraSpeed") ?? 0;
|
|
5743
|
-
return (jsxs(Fragment, { children: [jsx(NumberInputPropertyLine, { label: "Lower Radius Limit", value: lowerRadiusLimit, onChange: (val) => (camera.lowerRadiusLimit = val) }), jsx(NumberInputPropertyLine, { label: "Upper Radius Limit", value: upperRadiusLimit, onChange: (val) => (camera.upperRadiusLimit = val) }), jsx(NumberInputPropertyLine, { label: "Lower Rotation Offset Limit", value: lowerRotationOffsetLimit, onChange: (val) => (camera.lowerRotationOffsetLimit = val) }), jsx(NumberInputPropertyLine, { label: "Upper Rotation Offset Limit", value: upperRotationOffsetLimit, onChange: (val) => (camera.upperRotationOffsetLimit = val) }), jsx(NumberInputPropertyLine, { label: "Lower Height Offset Limit", value: lowerHeightOffsetLimit, onChange: (val) => (camera.lowerHeightOffsetLimit = val) }), jsx(NumberInputPropertyLine, { label: "Upper Height Offset Limit", value: upperHeightOffsetLimit, onChange: (val) => (camera.upperHeightOffsetLimit = val) }), jsx(NumberInputPropertyLine, { label: "Max Camera Speed", value: maxCameraSpeed, onChange: (val) => (camera.maxCameraSpeed = val) })] }));
|
|
5899
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Lower Radius Limit", target: camera, propertyKey: "lowerRadiusLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Upper Radius Limit", target: camera, propertyKey: "upperRadiusLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Lower Rotation Offset Limit", target: camera, propertyKey: "lowerRotationOffsetLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Upper Rotation Offset Limit", target: camera, propertyKey: "upperRotationOffsetLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Lower Height Offset Limit", target: camera, propertyKey: "lowerHeightOffsetLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Upper Height Offset Limit", target: camera, propertyKey: "upperHeightOffsetLimit", nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Max Camera Speed", target: camera, propertyKey: "maxCameraSpeed" })] }));
|
|
5744
5900
|
};
|
|
5745
5901
|
|
|
5746
5902
|
const FreeCameraTransformProperties = (props) => {
|
|
5747
5903
|
const { camera, settings } = props;
|
|
5748
5904
|
const useDegrees = useObservableState(() => settings.useDegrees, settings.settingsChangedObservable);
|
|
5749
5905
|
const useEuler = useObservableState(() => settings.useEuler, settings.settingsChangedObservable);
|
|
5750
|
-
const position = useProperty(camera, "position");
|
|
5751
|
-
const rotation = useProperty(camera, "rotation");
|
|
5752
5906
|
const quatRotation = useProperty(camera, "rotationQuaternion");
|
|
5753
|
-
return (jsxs(Fragment, { children: [jsx(
|
|
5907
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: Vector3PropertyLine, label: "Position", target: camera, propertyKey: "position" }), quatRotation ? (jsx(Property, { component: QuaternionPropertyLine, propertyPath: "rotationQuaternion", label: "Rotation (Quat)", value: quatRotation, onChange: (val) => (camera.rotationQuaternion = val), useDegrees: useDegrees, useEuler: useEuler })) : (jsx(BoundProperty, { component: RotationVectorPropertyLine, label: "Rotation", target: camera, propertyKey: "rotation", useDegrees: useDegrees }))] }));
|
|
5754
5908
|
};
|
|
5755
5909
|
const FreeCameraControlProperties = (props) => {
|
|
5756
5910
|
const { camera } = props;
|
|
@@ -5758,15 +5912,12 @@ const FreeCameraControlProperties = (props) => {
|
|
|
5758
5912
|
};
|
|
5759
5913
|
const FreeCameraCollisionProperties = (props) => {
|
|
5760
5914
|
const { camera } = props;
|
|
5761
|
-
|
|
5762
|
-
const ellipsoidOffset = useProperty(camera, "ellipsoidOffset");
|
|
5763
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Check Collisions", target: camera, propertyKey: "checkCollisions" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Apply Gravity", target: camera, propertyKey: "applyGravity" }), jsx(Vector3PropertyLine, { label: "Ellipsoid", value: ellipsoid, onChange: (val) => (camera.ellipsoid = val) }), jsx(Vector3PropertyLine, { label: "Ellipsoid Offset", value: ellipsoidOffset, onChange: (val) => (camera.ellipsoidOffset = val) })] }));
|
|
5915
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Check Collisions", target: camera, propertyKey: "checkCollisions" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Apply Gravity", target: camera, propertyKey: "applyGravity" }), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Ellipsoid", target: camera, propertyKey: "ellipsoid" }), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Ellipsoid Offset", target: camera, propertyKey: "ellipsoidOffset" })] }));
|
|
5764
5916
|
};
|
|
5765
5917
|
|
|
5766
5918
|
const TargetCameraTransformProperties = (props) => {
|
|
5767
5919
|
const { camera } = props;
|
|
5768
|
-
|
|
5769
|
-
return (jsx(Fragment, { children: jsx(Vector3PropertyLine, { label: "Target", description: "The point the camera looks at.", value: target, onChange: (value) => (camera.target = value) }) }));
|
|
5920
|
+
return (jsx(Fragment, { children: jsx(BoundProperty, { component: Vector3PropertyLine, label: "Target", description: "The point the camera looks at.", target: camera, propertyKey: "target" }) }));
|
|
5770
5921
|
};
|
|
5771
5922
|
const TargetCameraControlProperties = (props) => {
|
|
5772
5923
|
const { camera } = props;
|
|
@@ -5859,6 +6010,24 @@ const CameraPropertiesServiceDefinition = {
|
|
|
5859
6010
|
},
|
|
5860
6011
|
],
|
|
5861
6012
|
});
|
|
6013
|
+
const geospatialCameraContentRegistration = propertiesService.addSectionContent({
|
|
6014
|
+
key: "Geospatial Camera Properties",
|
|
6015
|
+
predicate: (entity) => entity instanceof GeospatialCamera,
|
|
6016
|
+
content: [
|
|
6017
|
+
{
|
|
6018
|
+
section: "Transform",
|
|
6019
|
+
component: ({ context }) => jsx(GeospatialCameraTransformProperties, { camera: context, settings: settingsContext }),
|
|
6020
|
+
},
|
|
6021
|
+
{
|
|
6022
|
+
section: "Collision",
|
|
6023
|
+
component: ({ context }) => jsx(GeospatialCameraCollisionProperties, { camera: context }),
|
|
6024
|
+
},
|
|
6025
|
+
{
|
|
6026
|
+
section: "Limits",
|
|
6027
|
+
component: ({ context }) => jsx(GeospatialCameraLimitsProperties, { camera: context }),
|
|
6028
|
+
},
|
|
6029
|
+
],
|
|
6030
|
+
});
|
|
5862
6031
|
return {
|
|
5863
6032
|
dispose: () => {
|
|
5864
6033
|
cameraContentRegistration.dispose();
|
|
@@ -5866,6 +6035,7 @@ const CameraPropertiesServiceDefinition = {
|
|
|
5866
6035
|
arcRotateCameraContentRegistration.dispose();
|
|
5867
6036
|
freeCameraContentRegistration.dispose();
|
|
5868
6037
|
followCameraContentRegistration.dispose();
|
|
6038
|
+
geospatialCameraContentRegistration.dispose();
|
|
5869
6039
|
},
|
|
5870
6040
|
};
|
|
5871
6041
|
},
|
|
@@ -6138,20 +6308,20 @@ const ShadowGeneratorSetupProperties = ({ context: shadowLight }) => {
|
|
|
6138
6308
|
return (jsxs(Fragment, { children: [!hasShadowGenerator && (jsxs(Fragment, { children: [jsx(StringDropdownPropertyLine, { label: "Type", options: shadowGeneratorOptions, value: shadowGeneratorSettings.generatorType, onChange: (value) => setShadowGeneratorSettings((prev) => ({ ...prev, generatorType: value })) }), jsx(NumberDropdownPropertyLine, { label: "Map Size", options: MapSizeOptions, value: shadowGeneratorSettings.mapSize, onChange: (value) => setShadowGeneratorSettings((prev) => ({ ...prev, mapSize: value })) }), jsx(ButtonLine, { label: "Create Generator", onClick: () => {
|
|
6139
6309
|
CreateShadowGenerator(shadowLight, shadowGeneratorSettings);
|
|
6140
6310
|
setHasShadowGenerator(true);
|
|
6141
|
-
} })] })), shadowGenerator && (jsxs(Fragment, { children: [isCascaded && jsx(CascadedShadowGeneratorProperties, { generator: shadowGenerator, near: near, far: far, isPCSS: isPCSS }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Bias", description: "Bias to apply to the shadow map to avoid shadow acne.", target: shadowGenerator, propertyKey: "bias", step: 0.0001 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Normal Bias", description: "Normal bias to apply to avoid shadow acne.", target: shadowGenerator, propertyKey: "normalBias" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Darkness", description: "Darkness of the shadow (0 = no shadow, 1 = full shadow).", target: shadowGenerator, propertyKey: "darkness", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Transparent Shadows", description: "Allow transparent objects to cast shadows.", target: shadowGenerator, propertyKey: "transparencyShadow" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Filter", description: "Shadow filtering mode.", target: shadowGenerator, propertyKey: "filter", options: blurModeOptions }), jsx(Collapse, { visible: isPCFOrPCSS, children: jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Filtering Quality", target: shadowGenerator, propertyKey: "filteringQuality", options: FilteringQualityOptions }) }), jsx(Collapse, { visible: isPCSS, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Penumbra Ratio", description: "Light size UV ratio for PCSS.", target: shadowGenerator, propertyKey: "contactHardeningLightSizeUVRatio", min: 0, max: 0.5, step: 0.001 }) }), isStandardGenerator && (jsxs(Fragment, { children: [jsx(Collapse, { visible: isBlurExponential, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Kernel Blur", description: "Use kernel-based blur instead of box blur.", target: shadowGenerator, propertyKey: "useKernelBlur" }), useKernelBlur ? (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Kernel", target: shadowGenerator, propertyKey: "blurKernel", min: 1, max: 64, step: 1 })) : (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Box Offset", target: shadowGenerator, propertyKey: "blurBoxOffset", min: 1, max: 64, step: 1 }))] }) }), jsx(Collapse, { visible: isExponential, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Depth Scale", target: shadowGenerator, propertyKey: "depthScale" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Scale", target: shadowGenerator, propertyKey: "blurScale", min: 1, max: 4, step: 1 })] }) })] })), jsx(ButtonLine, { label: "Dispose Generator", onClick: () => {
|
|
6311
|
+
} })] })), shadowGenerator && (jsxs(Fragment, { children: [isCascaded && jsx(CascadedShadowGeneratorProperties, { generator: shadowGenerator, near: near, far: far, isPCSS: isPCSS }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Bias", description: "Bias to apply to the shadow map to avoid shadow acne.", target: shadowGenerator, propertyKey: "bias", propertyPath: "getShadowGenerator().bias", step: 0.0001 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Normal Bias", description: "Normal bias to apply to avoid shadow acne.", target: shadowGenerator, propertyKey: "normalBias", propertyPath: "getShadowGenerator().normalBias" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Darkness", description: "Darkness of the shadow (0 = no shadow, 1 = full shadow).", target: shadowGenerator, propertyKey: "darkness", propertyPath: "getShadowGenerator().darkness", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Transparent Shadows", description: "Allow transparent objects to cast shadows.", target: shadowGenerator, propertyKey: "transparencyShadow", propertyPath: "getShadowGenerator().transparencyShadow" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Filter", description: "Shadow filtering mode.", target: shadowGenerator, propertyKey: "filter", propertyPath: "getShadowGenerator().filter", options: blurModeOptions }), jsx(Collapse, { visible: isPCFOrPCSS, children: jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Filtering Quality", target: shadowGenerator, propertyKey: "filteringQuality", propertyPath: "getShadowGenerator().filteringQuality", options: FilteringQualityOptions }) }), jsx(Collapse, { visible: isPCSS, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Penumbra Ratio", description: "Light size UV ratio for PCSS.", target: shadowGenerator, propertyKey: "contactHardeningLightSizeUVRatio", propertyPath: "getShadowGenerator().contactHardeningLightSizeUVRatio", min: 0, max: 0.5, step: 0.001 }) }), isStandardGenerator && (jsxs(Fragment, { children: [jsx(Collapse, { visible: isBlurExponential, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Kernel Blur", description: "Use kernel-based blur instead of box blur.", target: shadowGenerator, propertyKey: "useKernelBlur", propertyPath: "getShadowGenerator().useKernelBlur" }), useKernelBlur ? (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Kernel", target: shadowGenerator, propertyKey: "blurKernel", propertyPath: "getShadowGenerator().blurKernel", min: 1, max: 64, step: 1 })) : (jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Box Offset", target: shadowGenerator, propertyKey: "blurBoxOffset", propertyPath: "getShadowGenerator().blurBoxOffset", min: 1, max: 64, step: 1 }))] }) }), jsx(Collapse, { visible: isExponential, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Depth Scale", target: shadowGenerator, propertyKey: "depthScale", propertyPath: "getShadowGenerator().depthScale" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Blur Scale", target: shadowGenerator, propertyKey: "blurScale", propertyPath: "getShadowGenerator().blurScale", min: 1, max: 4, step: 1 })] }) })] })), jsx(ButtonLine, { label: "Dispose Generator", onClick: () => {
|
|
6142
6312
|
DisposeShadowGenerator(camera, shadowLight);
|
|
6143
6313
|
setHasShadowGenerator(false);
|
|
6144
6314
|
} })] }))] }));
|
|
6145
6315
|
};
|
|
6146
6316
|
const CascadedShadowGeneratorProperties = ({ generator, near, far, isPCSS, }) => {
|
|
6147
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Num Cascades", description: "Number of cascades for the cascaded shadow map.", target: generator, propertyKey: "numCascades", options: NumCascadesOptions }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Debug Mode", description: "Colorize cascades for debugging.", target: generator, propertyKey: "debug" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Stabilize Cascades", description: "Stabilize the cascade splits to avoid shimmering.", target: generator, propertyKey: "stabilizeCascades" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Lambda", description: "Balance between logarithmic and uniform cascade splits.", target: generator, propertyKey: "lambda", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Cascade Blend", description: "Percentage of blending between cascades.", target: generator, propertyKey: "cascadeBlendPercentage", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Depth Clamp", target: generator, propertyKey: "depthClamp" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Auto-Calc Depth Bounds", target: generator, propertyKey: "autoCalcDepthBounds" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Shadow MaxZ", target: generator, propertyKey: "shadowMaxZ", min: near, max: far, step: 0.5 }), jsx(Collapse, { visible: isPCSS, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Penumbra Darkness", description: "Darkness of the penumbra for PCSS in CSM.", target: generator, propertyKey: "penumbraDarkness", min: 0, max: 1, step: 0.01 }) })] }));
|
|
6317
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Num Cascades", description: "Number of cascades for the cascaded shadow map.", target: generator, propertyKey: "numCascades", propertyPath: "getShadowGenerator().numCascades", options: NumCascadesOptions }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Debug Mode", description: "Colorize cascades for debugging.", target: generator, propertyKey: "debug", propertyPath: "getShadowGenerator().debug" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Stabilize Cascades", description: "Stabilize the cascade splits to avoid shimmering.", target: generator, propertyKey: "stabilizeCascades", propertyPath: "getShadowGenerator().stabilizeCascades" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Lambda", description: "Balance between logarithmic and uniform cascade splits.", target: generator, propertyKey: "lambda", propertyPath: "getShadowGenerator().lambda", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Cascade Blend", description: "Percentage of blending between cascades.", target: generator, propertyKey: "cascadeBlendPercentage", propertyPath: "getShadowGenerator().cascadeBlendPercentage", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Depth Clamp", target: generator, propertyKey: "depthClamp", propertyPath: "getShadowGenerator().depthClamp" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Auto-Calc Depth Bounds", target: generator, propertyKey: "autoCalcDepthBounds", propertyPath: "getShadowGenerator().autoCalcDepthBounds" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Shadow MaxZ", target: generator, propertyKey: "shadowMaxZ", propertyPath: "getShadowGenerator().shadowMaxZ", min: near, max: far, step: 0.5 }), jsx(Collapse, { visible: isPCSS, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Penumbra Darkness", description: "Darkness of the penumbra for PCSS in CSM.", target: generator, propertyKey: "penumbraDarkness", propertyPath: "getShadowGenerator().penumbraDarkness", min: 0, max: 1, step: 0.01 }) })] }));
|
|
6148
6318
|
};
|
|
6149
6319
|
|
|
6150
6320
|
const ShadowsSetupProperties = ({ context: shadowLight }) => {
|
|
6151
6321
|
const shadowsEnabled = useProperty(shadowLight, "shadowEnabled");
|
|
6152
6322
|
const shadowsMinZ = useProperty(shadowLight, "shadowMinZ");
|
|
6153
6323
|
const shadowsMaxZ = useProperty(shadowLight, "shadowMaxZ");
|
|
6154
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Shadows Enabled", target: shadowLight, propertyKey: "shadowEnabled" }), jsx(Collapse, { visible: shadowsEnabled, children: jsxs(Fragment, { children: [jsx(
|
|
6324
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Shadows Enabled", target: shadowLight, propertyKey: "shadowEnabled" }), jsx(Collapse, { visible: shadowsEnabled, children: jsxs(Fragment, { children: [jsx(Property, { component: NumberInputPropertyLine, label: "Shadows Near Plane", propertyPath: "shadowMinZ", value: shadowsMinZ ?? 0, onChange: (value) => (shadowLight.shadowMinZ = value) }), jsx(Property, { component: NumberInputPropertyLine, label: "Shadows Far Plane", propertyPath: "shadowMaxZ", value: shadowsMaxZ ?? 0, onChange: (value) => (shadowLight.shadowMaxZ = value) })] }) })] }));
|
|
6155
6325
|
};
|
|
6156
6326
|
|
|
6157
6327
|
const SpotLightSetupProperties = ({ context: spotLight }) => {
|
|
@@ -6347,7 +6517,7 @@ const MaterialTransparencyProperties = (props) => {
|
|
|
6347
6517
|
const MaterialStencilProperties = (props) => {
|
|
6348
6518
|
const { material } = props;
|
|
6349
6519
|
const stencilEnabled = useProperty(material.stencil, "enabled");
|
|
6350
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.stencil, propertyKey: "enabled" }), jsx(Collapse, { visible: stencilEnabled, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: HexPropertyLine, label: "Write Mask", target: material.stencil, propertyKey: "mask", numBits: 8 }), jsx(BoundProperty, { component: HexPropertyLine, label: "Read Mask", target: material.stencil, propertyKey: "funcMask", numBits: 8 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Reference Value", target: material.stencil, propertyKey: "funcRef", step: 1, forceInt: true, min: 0, max: 255 }), jsx(PropertyLine, { label: "Front", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Function", target: material.stencil, propertyKey: "func", options: StencilFunctionOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil Fail Operation", target: material.stencil, propertyKey: "opStencilFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Depth Fail Operation", target: material.stencil, propertyKey: "opDepthFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil & Depth Pass Operation", target: material.stencil, propertyKey: "opStencilDepthPass", options: StencilOperationOptions })] }) }), jsx(PropertyLine, { label: "Back", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Function", target: material.stencil, propertyKey: "backFunc", options: StencilFunctionOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil Fail Operation", target: material.stencil, propertyKey: "backOpStencilFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Depth Fail Operation", target: material.stencil, propertyKey: "backOpDepthFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil & Depth Pass Operation", target: material.stencil, propertyKey: "backOpStencilDepthPass", options: StencilOperationOptions })] }) })] }) })] }));
|
|
6520
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.stencil, propertyKey: "enabled", propertyPath: "stencil.enabled" }), jsx(Collapse, { visible: stencilEnabled, children: jsxs(Fragment, { children: [jsx(BoundProperty, { component: HexPropertyLine, label: "Write Mask", target: material.stencil, propertyKey: "mask", propertyPath: "stencil.mask", numBits: 8 }), jsx(BoundProperty, { component: HexPropertyLine, label: "Read Mask", target: material.stencil, propertyKey: "funcMask", propertyPath: "stencil.funcMask", numBits: 8 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Reference Value", target: material.stencil, propertyKey: "funcRef", propertyPath: "stencil.funcRef", step: 1, forceInt: true, min: 0, max: 255 }), jsx(PropertyLine, { label: "Front", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Function", target: material.stencil, propertyKey: "func", propertyPath: "stencil.func", options: StencilFunctionOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil Fail Operation", target: material.stencil, propertyKey: "opStencilFail", propertyPath: "stencil.opStencilFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Depth Fail Operation", target: material.stencil, propertyKey: "opDepthFail", propertyPath: "stencil.opDepthFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil & Depth Pass Operation", target: material.stencil, propertyKey: "opStencilDepthPass", propertyPath: "stencil.opStencilDepthPass", options: StencilOperationOptions })] }) }), jsx(PropertyLine, { label: "Back", expandByDefault: true, expandedContent: jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Function", target: material.stencil, propertyKey: "backFunc", propertyPath: "stencil.backFunc", options: StencilFunctionOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil Fail Operation", target: material.stencil, propertyKey: "backOpStencilFail", propertyPath: "stencil.backOpStencilFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Depth Fail Operation", target: material.stencil, propertyKey: "backOpDepthFail", propertyPath: "stencil.backOpDepthFail", options: StencilOperationOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Stencil & Depth Pass Operation", target: material.stencil, propertyKey: "backOpStencilDepthPass", propertyPath: "stencil.backOpStencilDepthPass", options: StencilOperationOptions })] }) })] }) })] }));
|
|
6351
6521
|
};
|
|
6352
6522
|
|
|
6353
6523
|
const MultiMaterialChildrenProperties = (props) => {
|
|
@@ -6886,13 +7056,13 @@ const PBRBaseMaterialGeneralProperties = (props) => {
|
|
|
6886
7056
|
};
|
|
6887
7057
|
const PBRBaseMaterialTransparencyProperties = (props) => {
|
|
6888
7058
|
const { material } = props;
|
|
6889
|
-
return (jsxs(Fragment, { children: [material._albedoTexture && (jsx(Fragment, { children: jsx(BoundProperty, { component: SwitchPropertyLine, label: "Albedo texture has alpha", target: material._albedoTexture, propertyKey: "hasAlpha" }) })), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use alpha from albedo texture", target: material, propertyKey: "_useAlphaFromAlbedoTexture" })] }));
|
|
7059
|
+
return (jsxs(Fragment, { children: [material._albedoTexture && (jsx(Fragment, { children: jsx(BoundProperty, { component: SwitchPropertyLine, label: "Albedo texture has alpha", target: material._albedoTexture, propertyKey: "hasAlpha", propertyPath: "_albedoTexture.hasAlpha" }) })), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use alpha from albedo texture", target: material, propertyKey: "_useAlphaFromAlbedoTexture" })] }));
|
|
6890
7060
|
};
|
|
6891
7061
|
const PBRBaseMaterialChannelsProperties = (props) => {
|
|
6892
7062
|
const { material, selectionService } = props;
|
|
6893
7063
|
const scene = material.getScene();
|
|
6894
7064
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6895
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Albedo", target: material, propertyKey: "_albedoTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Base Weight", target: material, propertyKey: "_baseWeightTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "_baseDiffuseRoughnessTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Metallic Roughness", target: material, propertyKey: "_metallicTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflection", target: material, propertyKey: "_reflectionTexture", scene: scene, cubeOnly: true, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material.subSurface, propertyKey: "refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflectivity", target: material, propertyKey: "_reflectivityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Micro Surface", target: material, propertyKey: "_microSurfaceTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material, propertyKey: "_bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Emissive", target: material, propertyKey: "_emissiveTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Opacity", target: material, propertyKey: "_opacityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Ambient", target: material, propertyKey: "_ambientTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Lightmap", target: material, propertyKey: "_lightmapTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Detailmap", target: material.detailMap, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Lightmap as Shadowmap", target: material, propertyKey: "_useLightmapAsShadowmap" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Detailmap", target: material.detailMap, propertyKey: "isEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Decalmap", target: material.decalMap, propertyKey: "isEnabled" })] }));
|
|
7065
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Albedo", target: material, propertyKey: "_albedoTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Base Weight", target: material, propertyKey: "_baseWeightTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "_baseDiffuseRoughnessTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Metallic Roughness", target: material, propertyKey: "_metallicTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflection", target: material, propertyKey: "_reflectionTexture", scene: scene, cubeOnly: true, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material.subSurface, propertyKey: "refractionTexture", propertyPath: "subSurface.refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflectivity", target: material, propertyKey: "_reflectivityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Micro Surface", target: material, propertyKey: "_microSurfaceTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material, propertyKey: "_bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Emissive", target: material, propertyKey: "_emissiveTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Opacity", target: material, propertyKey: "_opacityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Ambient", target: material, propertyKey: "_ambientTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Lightmap", target: material, propertyKey: "_lightmapTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Detailmap", target: material.detailMap, propertyKey: "texture", propertyPath: "detailMap.texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Lightmap as Shadowmap", target: material, propertyKey: "_useLightmapAsShadowmap" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Detailmap", target: material.detailMap, propertyKey: "isEnabled", propertyPath: "detailMap.isEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Decalmap", target: material.decalMap, propertyKey: "isEnabled", propertyPath: "decalMap.isEnabled" })] }));
|
|
6896
7066
|
};
|
|
6897
7067
|
const PBRBaseMaterialLightingAndColorProperties = (props) => {
|
|
6898
7068
|
const { material } = props;
|
|
@@ -6902,7 +7072,7 @@ const PBRBaseMaterialMetallicWorkflowProperties = (props) => {
|
|
|
6902
7072
|
const { material, selectionService } = props;
|
|
6903
7073
|
const scene = material.getScene();
|
|
6904
7074
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6905
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Metallic", target: material, propertyKey: "_metallic", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Roughness", target: material, propertyKey: "_roughness", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "_baseDiffuseRoughness", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Index of Refraction", target: material.subSurface, propertyKey: "indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "F0 Factor", target: material, propertyKey: "_metallicF0Factor", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Reflectance Color", target: material, propertyKey: "_metallicReflectanceColor", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Metallic Only", description: "Use only metallic from MetallicReflectance texture", target: material, propertyKey: "_useOnlyMetallicFromMetallicReflectanceTexture" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Metallic Reflectance", target: material, propertyKey: "_metallicReflectanceTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflectance", target: material, propertyKey: "_reflectanceTexture", scene: scene, onLink: selectEntity, defaultValue: null })] }));
|
|
7075
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Metallic", target: material, propertyKey: "_metallic", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Roughness", target: material, propertyKey: "_roughness", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Base Diffuse Roughness", target: material, propertyKey: "_baseDiffuseRoughness", min: 0, max: 1, step: 0.01, nullable: true, defaultValue: 0 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Index of Refraction", target: material.subSurface, propertyKey: "indexOfRefraction", propertyPath: "subSurface.indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "F0 Factor", target: material, propertyKey: "_metallicF0Factor", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Reflectance Color", target: material, propertyKey: "_metallicReflectanceColor", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Metallic Only", description: "Use only metallic from MetallicReflectance texture", target: material, propertyKey: "_useOnlyMetallicFromMetallicReflectanceTexture" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Metallic Reflectance", target: material, propertyKey: "_metallicReflectanceTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflectance", target: material, propertyKey: "_reflectanceTexture", scene: scene, onLink: selectEntity, defaultValue: null })] }));
|
|
6906
7076
|
};
|
|
6907
7077
|
const PBRBaseMaterialClearCoatProperties = (props) => {
|
|
6908
7078
|
const { material, selectionService } = props;
|
|
@@ -6911,21 +7081,21 @@ const PBRBaseMaterialClearCoatProperties = (props) => {
|
|
|
6911
7081
|
const isEnabled = useProperty(material.clearCoat, "isEnabled");
|
|
6912
7082
|
const isTintEnabled = useProperty(material.clearCoat, "isTintEnabled");
|
|
6913
7083
|
const bumpTexture = useProperty(material.clearCoat, "bumpTexture");
|
|
6914
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.clearCoat, propertyKey: "isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.clearCoat, propertyKey: "intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Roughness", target: material.clearCoat, propertyKey: "roughness", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "IOR", description: "Index of Refraction", target: material.clearCoat, propertyKey: "indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Remap F0", target: material.clearCoat, propertyKey: "remapF0OnInterfaceChange" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Clear Coat", target: material.clearCoat, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Roughness", target: material.clearCoat, propertyKey: "textureRoughness", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material.clearCoat, propertyKey: "bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(Collapse, { visible: bumpTexture !== null, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Strength", target: bumpTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness from Main Texture", target: material.clearCoat, propertyKey: "useRoughnessFromMainTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Tint", target: material.clearCoat, propertyKey: "isTintEnabled" }), jsxs(Collapse, { visible: isTintEnabled, children: [jsx(BoundProperty, { component: Color3PropertyLine, label: "Tint Color", target: material.clearCoat, propertyKey: "tintColor", isLinearMode: true }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "At Distance", target: material.clearCoat, propertyKey: "tintColorAtDistance", min: 0, max: 20, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Tint Thickness", target: material.clearCoat, propertyKey: "tintThickness", min: 0, max: 20, step: 0.1 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Tint", target: material.clearCoat, propertyKey: "tintTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] })] }));
|
|
7084
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.clearCoat, propertyKey: "isEnabled", propertyPath: "clearCoat.isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.clearCoat, propertyKey: "intensity", propertyPath: "clearCoat.intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Roughness", target: material.clearCoat, propertyKey: "roughness", propertyPath: "clearCoat.roughness", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "IOR", description: "Index of Refraction", target: material.clearCoat, propertyKey: "indexOfRefraction", propertyPath: "clearCoat.indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Remap F0", target: material.clearCoat, propertyKey: "remapF0OnInterfaceChange", propertyPath: "clearCoat.remapF0OnInterfaceChange" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Clear Coat", target: material.clearCoat, propertyKey: "texture", propertyPath: "clearCoat.texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Roughness", target: material.clearCoat, propertyKey: "textureRoughness", propertyPath: "clearCoat.textureRoughness", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material.clearCoat, propertyKey: "bumpTexture", propertyPath: "clearCoat.bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(Collapse, { visible: bumpTexture !== null, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Strength", target: bumpTexture, propertyKey: "level", propertyPath: "clearCoat.bumpTexture.level", min: 0, max: 2, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness from Main Texture", target: material.clearCoat, propertyKey: "useRoughnessFromMainTexture", propertyPath: "clearCoat.useRoughnessFromMainTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Tint", target: material.clearCoat, propertyKey: "isTintEnabled", propertyPath: "clearCoat.isTintEnabled" }), jsxs(Collapse, { visible: isTintEnabled, children: [jsx(BoundProperty, { component: Color3PropertyLine, label: "Tint Color", target: material.clearCoat, propertyKey: "tintColor", propertyPath: "clearCoat.tintColor", isLinearMode: true }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "At Distance", target: material.clearCoat, propertyKey: "tintColorAtDistance", propertyPath: "clearCoat.tintColorAtDistance", min: 0, max: 20, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Tint Thickness", target: material.clearCoat, propertyKey: "tintThickness", propertyPath: "clearCoat.tintThickness", min: 0, max: 20, step: 0.1 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Tint", target: material.clearCoat, propertyKey: "tintTexture", propertyPath: "clearCoat.tintTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] })] }));
|
|
6915
7085
|
};
|
|
6916
7086
|
const PBRBaseMaterialIridescenceProperties = (props) => {
|
|
6917
7087
|
const { material, selectionService } = props;
|
|
6918
7088
|
const scene = material.getScene();
|
|
6919
7089
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6920
7090
|
const isEnabled = useProperty(material.iridescence, "isEnabled");
|
|
6921
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.iridescence, propertyKey: "isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.iridescence, propertyKey: "intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "IOR", description: "Index of Refraction", target: material.iridescence, propertyKey: "indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Min Thickness", target: material.iridescence, propertyKey: "minimumThickness", min: 0, max: 1000, step: 10 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Max Thickness", target: material.iridescence, propertyKey: "maximumThickness", min: 0, max: 1000, step: 10 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Iridescence", target: material.iridescence, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Thickness", target: material.iridescence, propertyKey: "thicknessTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
7091
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.iridescence, propertyKey: "isEnabled", propertyPath: "iridescence.isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.iridescence, propertyKey: "intensity", propertyPath: "iridescence.intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "IOR", description: "Index of Refraction", target: material.iridescence, propertyKey: "indexOfRefraction", propertyPath: "iridescence.indexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Min Thickness", target: material.iridescence, propertyKey: "minimumThickness", propertyPath: "iridescence.minimumThickness", min: 0, max: 1000, step: 10 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Max Thickness", target: material.iridescence, propertyKey: "maximumThickness", propertyPath: "iridescence.maximumThickness", min: 0, max: 1000, step: 10 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Iridescence", target: material.iridescence, propertyKey: "texture", propertyPath: "iridescence.texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Thickness", target: material.iridescence, propertyKey: "thicknessTexture", propertyPath: "iridescence.thicknessTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
6922
7092
|
};
|
|
6923
7093
|
const PBRBaseMaterialAnisotropicProperties = (props) => {
|
|
6924
7094
|
const { material, selectionService } = props;
|
|
6925
7095
|
const scene = material.getScene();
|
|
6926
7096
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6927
7097
|
const isEnabled = useProperty(material.anisotropy, "isEnabled");
|
|
6928
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.anisotropy, propertyKey: "isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Legacy Mode", target: material.anisotropy, propertyKey: "legacy" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.anisotropy, propertyKey: "intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Vector2PropertyLine, label: "Direction", target: material.anisotropy, propertyKey: "direction" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Anisotropic", target: material.anisotropy, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
7098
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.anisotropy, propertyKey: "isEnabled", propertyPath: "anisotropy.isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Legacy Mode", target: material.anisotropy, propertyKey: "legacy", propertyPath: "anisotropy.legacy" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.anisotropy, propertyKey: "intensity", propertyPath: "anisotropy.intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Vector2PropertyLine, label: "Direction", target: material.anisotropy, propertyKey: "direction", propertyPath: "anisotropy.direction" }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Anisotropic", target: material.anisotropy, propertyKey: "texture", propertyPath: "anisotropy.texture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
6929
7099
|
};
|
|
6930
7100
|
const PBRBaseMaterialSheenProperties = (props) => {
|
|
6931
7101
|
const { material, selectionService } = props;
|
|
@@ -6933,7 +7103,7 @@ const PBRBaseMaterialSheenProperties = (props) => {
|
|
|
6933
7103
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6934
7104
|
const isEnabled = useProperty(material.sheen, "isEnabled");
|
|
6935
7105
|
const useRoughness = useProperty(material.sheen, "_useRoughness");
|
|
6936
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.sheen, propertyKey: "isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Link to Albedo", target: material.sheen, propertyKey: "linkSheenWithAlbedo" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.sheen, propertyKey: "intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Color", target: material.sheen, propertyKey: "color", isLinearMode: true }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Sheen", target: material.sheen, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Roughness", target: material.sheen, propertyKey: "textureRoughness", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness", target: material.sheen, propertyKey: "_useRoughness" }), jsx(Collapse, { visible: useRoughness, children: jsx(BoundProperty, { nullable: true, component: SyncedSliderPropertyLine, label: "Roughness", target: material.sheen, propertyKey: "roughness", defaultValue: 0, min: 0, max: 1, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness from Main Texture", target: material.sheen, propertyKey: "useRoughnessFromMainTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Albedo Scaling", target: material.sheen, propertyKey: "albedoScaling" })] })] }));
|
|
7106
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Enabled", target: material.sheen, propertyKey: "isEnabled", propertyPath: "sheen.isEnabled" }), jsxs(Collapse, { visible: isEnabled, children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Link to Albedo", target: material.sheen, propertyKey: "linkSheenWithAlbedo", propertyPath: "sheen.linkSheenWithAlbedo" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.sheen, propertyKey: "intensity", propertyPath: "sheen.intensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Color", target: material.sheen, propertyKey: "color", propertyPath: "sheen.color", isLinearMode: true }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Sheen", target: material.sheen, propertyKey: "texture", propertyPath: "sheen.texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Roughness", target: material.sheen, propertyKey: "textureRoughness", propertyPath: "sheen.textureRoughness", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness", target: material.sheen, propertyKey: "_useRoughness", propertyPath: "sheen._useRoughness" }), jsx(Collapse, { visible: useRoughness, children: jsx(BoundProperty, { nullable: true, component: SyncedSliderPropertyLine, label: "Roughness", target: material.sheen, propertyKey: "roughness", propertyPath: "sheen.roughness", defaultValue: 0, min: 0, max: 1, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Roughness from Main Texture", target: material.sheen, propertyKey: "useRoughnessFromMainTexture", propertyPath: "sheen.useRoughnessFromMainTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Albedo Scaling", target: material.sheen, propertyKey: "albedoScaling", propertyPath: "sheen.albedoScaling" })] })] }));
|
|
6937
7107
|
};
|
|
6938
7108
|
const PBRBaseMaterialSubSurfaceProperties = (props) => {
|
|
6939
7109
|
const { material, selectionService } = props;
|
|
@@ -6943,19 +7113,19 @@ const PBRBaseMaterialSubSurfaceProperties = (props) => {
|
|
|
6943
7113
|
const useRefraction = useProperty(material.subSurface, "isRefractionEnabled");
|
|
6944
7114
|
const useDispersion = useProperty(material.subSurface, "isDispersionEnabled");
|
|
6945
7115
|
const useTranslucency = useProperty(material.subSurface, "isTranslucencyEnabled");
|
|
6946
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Thickness", target: material.subSurface, propertyKey: "thicknessTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Min Thickness", target: material.subSurface, propertyKey: "minimumThickness", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Max Thickness", target: material.subSurface, propertyKey: "maximumThickness", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Mask From Thickness", target: material.subSurface, propertyKey: "useMaskFromThicknessTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "glTF-Style Textures", target: material.subSurface, propertyKey: "useGltfStyleTextures" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Thickness as Depth", target: material.subSurface, propertyKey: "useThicknessAsDepth" }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Tint Color", target: material.subSurface, propertyKey: "tintColor", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Scattering Enabled", target: material.subSurface, propertyKey: "isScatteringEnabled" }), jsx(Collapse, { visible: useScattering, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Meters Per Unit", target: material.getScene().subSurfaceConfiguration, propertyKey: "metersPerUnit", min: 0.01, max: 2, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Refraction Enabled", target: material.subSurface, propertyKey: "isRefractionEnabled" }), jsxs(Collapse, { visible: useRefraction, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "refractionIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction Intensity", target: material.subSurface, propertyKey: "refractionIntensityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material.subSurface, propertyKey: "refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Volume Index of Refraction", target: material.subSurface, propertyKey: "volumeIndexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Tint at Distance", target: material.subSurface, propertyKey: "tintColorAtDistance", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Link Refraction with Transparency", target: material.subSurface, propertyKey: "linkRefractionWithTransparency" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Albedo to Tint Surface Transparency", target: material.subSurface, propertyKey: "useAlbedoToTintRefraction" })] }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Dispersion Enabled", target: material.subSurface, propertyKey: "isDispersionEnabled" }), jsx(Collapse, { visible: useDispersion, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "dispersion", min: 0, max: 5, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Translucency Enabled", target: material.subSurface, propertyKey: "isTranslucencyEnabled" }), jsxs(Collapse, { visible: useTranslucency, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "translucencyIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Intensity Texture", target: material.subSurface, propertyKey: "translucencyIntensityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Diffusion Distance", target: material.subSurface, propertyKey: "diffusionDistance", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Albedo to Tint Surface Translucency", target: material.subSurface, propertyKey: "useAlbedoToTintTranslucency" }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Translucency Tint", target: material.subSurface, propertyKey: "translucencyColor", isLinearMode: true, nullable: true, defaultValue: Color3.White() }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Translucency Tint Texture", target: material.subSurface, propertyKey: "translucencyColorTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
7116
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Thickness", target: material.subSurface, propertyKey: "thicknessTexture", propertyPath: "subSurface.thicknessTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Min Thickness", target: material.subSurface, propertyKey: "minimumThickness", propertyPath: "subSurface.minimumThickness", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Max Thickness", target: material.subSurface, propertyKey: "maximumThickness", propertyPath: "subSurface.maximumThickness", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Mask From Thickness", target: material.subSurface, propertyKey: "useMaskFromThicknessTexture", propertyPath: "subSurface.useMaskFromThicknessTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "glTF-Style Textures", target: material.subSurface, propertyKey: "useGltfStyleTextures", propertyPath: "subSurface.useGltfStyleTextures" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Thickness as Depth", target: material.subSurface, propertyKey: "useThicknessAsDepth", propertyPath: "subSurface.useThicknessAsDepth" }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Tint Color", target: material.subSurface, propertyKey: "tintColor", propertyPath: "subSurface.tintColor", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Scattering Enabled", target: material.subSurface, propertyKey: "isScatteringEnabled", propertyPath: "subSurface.isScatteringEnabled" }), jsx(Collapse, { visible: useScattering, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Meters Per Unit", target: material.getScene().subSurfaceConfiguration, propertyKey: "metersPerUnit", propertyPath: "getScene().subSurfaceConfiguration.metersPerUnit", min: 0.01, max: 2, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Refraction Enabled", target: material.subSurface, propertyKey: "isRefractionEnabled", propertyPath: "subSurface.isRefractionEnabled" }), jsxs(Collapse, { visible: useRefraction, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "refractionIntensity", propertyPath: "subSurface.refractionIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction Intensity", target: material.subSurface, propertyKey: "refractionIntensityTexture", propertyPath: "subSurface.refractionIntensityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material.subSurface, propertyKey: "refractionTexture", propertyPath: "subSurface.refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Volume Index of Refraction", target: material.subSurface, propertyKey: "volumeIndexOfRefraction", propertyPath: "subSurface.volumeIndexOfRefraction", min: 1, max: 3, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Tint at Distance", target: material.subSurface, propertyKey: "tintColorAtDistance", propertyPath: "subSurface.tintColorAtDistance", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Link Refraction with Transparency", target: material.subSurface, propertyKey: "linkRefractionWithTransparency", propertyPath: "subSurface.linkRefractionWithTransparency" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Albedo to Tint Surface Transparency", target: material.subSurface, propertyKey: "useAlbedoToTintRefraction", propertyPath: "subSurface.useAlbedoToTintRefraction" })] }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Dispersion Enabled", target: material.subSurface, propertyKey: "isDispersionEnabled", propertyPath: "subSurface.isDispersionEnabled" }), jsx(Collapse, { visible: useDispersion, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "dispersion", propertyPath: "subSurface.dispersion", min: 0, max: 5, step: 0.01 }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Translucency Enabled", target: material.subSurface, propertyKey: "isTranslucencyEnabled", propertyPath: "subSurface.isTranslucencyEnabled" }), jsxs(Collapse, { visible: useTranslucency, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Intensity", target: material.subSurface, propertyKey: "translucencyIntensity", propertyPath: "subSurface.translucencyIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Intensity Texture", target: material.subSurface, propertyKey: "translucencyIntensityTexture", propertyPath: "subSurface.translucencyIntensityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Diffusion Distance", target: material.subSurface, propertyKey: "diffusionDistance", propertyPath: "subSurface.diffusionDistance", isLinearMode: true }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Albedo to Tint Surface Translucency", target: material.subSurface, propertyKey: "useAlbedoToTintTranslucency", propertyPath: "subSurface.useAlbedoToTintTranslucency" }), jsx(BoundProperty, { component: Color3PropertyLine, label: "Translucency Tint", target: material.subSurface, propertyKey: "translucencyColor", propertyPath: "subSurface.translucencyColor", isLinearMode: true, nullable: true, defaultValue: Color3.White() }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Translucency Tint Texture", target: material.subSurface, propertyKey: "translucencyColorTexture", propertyPath: "subSurface.translucencyColorTexture", scene: scene, onLink: selectEntity, defaultValue: null })] })] }));
|
|
6947
7117
|
};
|
|
6948
7118
|
const PBRBaseMaterialLevelProperties = (props) => {
|
|
6949
7119
|
const { material } = props;
|
|
6950
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Environment", target: material, propertyKey: "_environmentIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular", target: material, propertyKey: "_specularIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Emissive", target: material, propertyKey: "_emissiveIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Direct", target: material, propertyKey: "_directIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Strength", target: material._bumpTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(Collapse, { visible: !!material._ambientTexture, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Ambient Strength", target: material, propertyKey: "_ambientTextureStrength", min: 0, max: 1, step: 0.01 }) }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflection Strength", target: material._reflectionTexture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Clear Coat", target: material.clearCoat.texture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Clear Coat Bump", target: material.clearCoat.bumpTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Anisotropic", target: material.anisotropy.texture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Sheen", target: material.sheen.texture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Thickness", target: material.subSurface.thicknessTexture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Refraction", target: material.subSurface.refractionTexture, propertyKey: "level", min: 0, max: 1, step: 0.01 }), jsxs(Collapse, { visible: material.detailMap.isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Diffuse", target: material.detailMap, propertyKey: "diffuseBlendLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Bump", target: material.detailMap, propertyKey: "bumpLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Roughness", target: material.detailMap, propertyKey: "roughnessBlendLevel", min: 0, max: 1, step: 0.01 })] })] }));
|
|
7120
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Environment", target: material, propertyKey: "_environmentIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular", target: material, propertyKey: "_specularIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Emissive", target: material, propertyKey: "_emissiveIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Direct", target: material, propertyKey: "_directIntensity", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Strength", target: material._bumpTexture, propertyKey: "level", propertyPath: "_bumpTexture.level", min: 0, max: 2, step: 0.01 }), jsx(Collapse, { visible: !!material._ambientTexture, children: jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Ambient Strength", target: material, propertyKey: "_ambientTextureStrength", min: 0, max: 1, step: 0.01 }) }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflection Strength", target: material._reflectionTexture, propertyKey: "level", propertyPath: "_reflectionTexture.level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Clear Coat", target: material.clearCoat.texture, propertyKey: "level", propertyPath: "clearCoat.texture.level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Clear Coat Bump", target: material.clearCoat.bumpTexture, propertyKey: "level", propertyPath: "clearCoat.bumpTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Anisotropic", target: material.anisotropy.texture, propertyKey: "level", propertyPath: "anisotropy.texture.level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Sheen", target: material.sheen.texture, propertyKey: "level", propertyPath: "sheen.texture.level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Thickness", target: material.subSurface.thicknessTexture, propertyKey: "level", propertyPath: "subSurface.thicknessTexture.level", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Refraction", target: material.subSurface.refractionTexture, propertyKey: "level", propertyPath: "subSurface.refractionTexture.level", min: 0, max: 1, step: 0.01 }), jsxs(Collapse, { visible: material.detailMap.isEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Diffuse", target: material.detailMap, propertyKey: "diffuseBlendLevel", propertyPath: "detailMap.diffuseBlendLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Bump", target: material.detailMap, propertyKey: "bumpLevel", propertyPath: "detailMap.bumpLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Roughness", target: material.detailMap, propertyKey: "roughnessBlendLevel", propertyPath: "detailMap.roughnessBlendLevel", min: 0, max: 1, step: 0.01 })] })] }));
|
|
6951
7121
|
};
|
|
6952
7122
|
const PBRBaseMaterialRenderingProperties = (props) => {
|
|
6953
7123
|
const { material } = props;
|
|
6954
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Alpha from Albedo", target: material, propertyKey: "_useAlphaFromAlbedoTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Ambient in Grayscale", target: material, propertyKey: "_useAmbientInGrayScale" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Radiance over Alpha", target: material, propertyKey: "_useRadianceOverAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Micro-surface from Ref. Map Alpha", target: material, propertyKey: "_useMicroSurfaceFromReflectivityMapAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Specular over Alpha", target: material, propertyKey: "_useSpecularOverAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Specular Anti-aliasing", target: material, propertyKey: "_enableSpecularAntiAliasing" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Realtime Filtering", target: material, propertyKey: "realTimeFiltering" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Realtime Filtering Quality", target: material, propertyKey: "realTimeFilteringQuality", options: RealTimeFilteringQualityOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Base Diffuse Model", target: material.brdf, propertyKey: "baseDiffuseModel", options: BaseDiffuseModelOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Dielectric Specular Model", target: material.brdf, propertyKey: "dielectricSpecularModel", options: DielectricSpecularModelOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Conductor Specular Model", target: material.brdf, propertyKey: "conductorSpecularModel", options: ConductorSpecularModelOptions })] }));
|
|
7124
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Alpha from Albedo", target: material, propertyKey: "_useAlphaFromAlbedoTexture" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Ambient in Grayscale", target: material, propertyKey: "_useAmbientInGrayScale" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Radiance over Alpha", target: material, propertyKey: "_useRadianceOverAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Micro-surface from Ref. Map Alpha", target: material, propertyKey: "_useMicroSurfaceFromReflectivityMapAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Specular over Alpha", target: material, propertyKey: "_useSpecularOverAlpha" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Specular Anti-aliasing", target: material, propertyKey: "_enableSpecularAntiAliasing" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Realtime Filtering", target: material, propertyKey: "realTimeFiltering" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Realtime Filtering Quality", target: material, propertyKey: "realTimeFilteringQuality", options: RealTimeFilteringQualityOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Base Diffuse Model", target: material.brdf, propertyKey: "baseDiffuseModel", propertyPath: "brdf.baseDiffuseModel", options: BaseDiffuseModelOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Dielectric Specular Model", target: material.brdf, propertyKey: "dielectricSpecularModel", propertyPath: "brdf.dielectricSpecularModel", options: DielectricSpecularModelOptions }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, label: "Conductor Specular Model", target: material.brdf, propertyKey: "conductorSpecularModel", propertyPath: "brdf.conductorSpecularModel", options: ConductorSpecularModelOptions })] }));
|
|
6955
7125
|
};
|
|
6956
7126
|
const PBRBaseMaterialAdvancedProperties = (props) => {
|
|
6957
7127
|
const { material } = props;
|
|
6958
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Energy Conservation", target: material.brdf, propertyKey: "useEnergyConservation" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Spherical Harmonics", target: material.brdf, propertyKey: "useSphericalHarmonics" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Radiance Occlusion", target: material, propertyKey: "_useRadianceOcclusion" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Horizon Occlusion", target: material, propertyKey: "_useHorizonOcclusion" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Mix Irradiance with Rough Radiance", target: material.brdf, propertyKey: "mixIblRadianceWithIrradiance" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Legacy Specular Energy Conservation", target: material.brdf, propertyKey: "useLegacySpecularEnergyConservation" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Unlit", target: material, propertyKey: "_unlit" })] }));
|
|
7128
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SwitchPropertyLine, label: "Energy Conservation", target: material.brdf, propertyKey: "useEnergyConservation", propertyPath: "brdf.useEnergyConservation" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Spherical Harmonics", target: material.brdf, propertyKey: "useSphericalHarmonics", propertyPath: "brdf.useSphericalHarmonics" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Radiance Occlusion", target: material, propertyKey: "_useRadianceOcclusion" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Horizon Occlusion", target: material, propertyKey: "_useHorizonOcclusion" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Mix Irradiance with Rough Radiance", target: material.brdf, propertyKey: "mixIblRadianceWithIrradiance", propertyPath: "brdf.mixIblRadianceWithIrradiance" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Legacy Specular Energy Conservation", target: material.brdf, propertyKey: "useLegacySpecularEnergyConservation", propertyPath: "brdf.useLegacySpecularEnergyConservation" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Unlit", target: material, propertyKey: "_unlit" })] }));
|
|
6959
7129
|
};
|
|
6960
7130
|
const PBRBaseMaterialDebugProperties = (props) => {
|
|
6961
7131
|
const { material } = props;
|
|
@@ -6974,13 +7144,13 @@ const StandardMaterialGeneralProperties = (props) => {
|
|
|
6974
7144
|
};
|
|
6975
7145
|
const StandardMaterialTransparencyProperties = (props) => {
|
|
6976
7146
|
const { material } = props;
|
|
6977
|
-
return (jsxs(Fragment, { children: [material.diffuseTexture && (jsx(Fragment, { children: jsx(BoundProperty, { component: SwitchPropertyLine, label: "Diffuse Texture has Alpha", target: material.diffuseTexture, propertyKey: "hasAlpha" }) })), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Alpha from Diffuse Texture", target: material, propertyKey: "useAlphaFromDiffuseTexture" })] }));
|
|
7147
|
+
return (jsxs(Fragment, { children: [material.diffuseTexture && (jsx(Fragment, { children: jsx(BoundProperty, { component: SwitchPropertyLine, label: "Diffuse Texture has Alpha", target: material.diffuseTexture, propertyKey: "hasAlpha", propertyPath: "diffuseTexture.hasAlpha" }) })), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Alpha from Diffuse Texture", target: material, propertyKey: "useAlphaFromDiffuseTexture" })] }));
|
|
6978
7148
|
};
|
|
6979
7149
|
const StandardMaterialTexturesProperties = (props) => {
|
|
6980
7150
|
const { material, selectionService } = props;
|
|
6981
7151
|
const scene = material.getScene();
|
|
6982
7152
|
const selectEntity = (entity) => (selectionService.selectedEntity = entity);
|
|
6983
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Diffuse", target: material, propertyKey: "diffuseTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Specular", target: material, propertyKey: "specularTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflection", target: material, propertyKey: "reflectionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material, propertyKey: "refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Emissive", target: material, propertyKey: "emissiveTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material, propertyKey: "bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Opacity", target: material, propertyKey: "opacityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Ambient", target: material, propertyKey: "ambientTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Lightmap", target: material, propertyKey: "lightmapTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Detailmap", target: material.detailMap, propertyKey: "texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Lightmap as Shadowmap", target: material, propertyKey: "useLightmapAsShadowmap" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Detailmap", target: material.detailMap, propertyKey: "isEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Decalmap", target: material.decalMap, propertyKey: "isEnabled" })] }));
|
|
7153
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Diffuse", target: material, propertyKey: "diffuseTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Specular", target: material, propertyKey: "specularTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Reflection", target: material, propertyKey: "reflectionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Refraction", target: material, propertyKey: "refractionTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Emissive", target: material, propertyKey: "emissiveTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Bump", target: material, propertyKey: "bumpTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Opacity", target: material, propertyKey: "opacityTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Ambient", target: material, propertyKey: "ambientTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Lightmap", target: material, propertyKey: "lightmapTexture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: TextureSelectorPropertyLine, label: "Detailmap", target: material.detailMap, propertyKey: "texture", propertyPath: "detailMap.texture", scene: scene, onLink: selectEntity, defaultValue: null }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Lightmap as Shadowmap", target: material, propertyKey: "useLightmapAsShadowmap" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Detailmap", target: material.detailMap, propertyKey: "isEnabled", propertyPath: "detailMap.isEnabled" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Use Decalmap", target: material.decalMap, propertyKey: "isEnabled", propertyPath: "decalMap.isEnabled" })] }));
|
|
6984
7154
|
};
|
|
6985
7155
|
/**
|
|
6986
7156
|
* Displays the levels properties of a standard material.
|
|
@@ -6990,7 +7160,7 @@ const StandardMaterialTexturesProperties = (props) => {
|
|
|
6990
7160
|
const StandardMaterialLevelsProperties = (props) => {
|
|
6991
7161
|
const { standardMaterial } = props;
|
|
6992
7162
|
const isDetailMapEnabled = useProperty(standardMaterial.detailMap, "isEnabled");
|
|
6993
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Diffuse Level", target: standardMaterial.diffuseTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Level", target: standardMaterial.specularTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflection Level", target: standardMaterial.reflectionTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Refraction Level", target: standardMaterial.refractionTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Emissive Level", target: standardMaterial.emissiveTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Level", target: standardMaterial.bumpTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Opacity Level", target: standardMaterial.opacityTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Ambient Level", target: standardMaterial.ambientTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Lightmap Level", target: standardMaterial.lightmapTexture, propertyKey: "level", min: 0, max: 2, step: 0.01 }), jsxs(Collapse, { visible: isDetailMapEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Diffuse", target: standardMaterial.detailMap, propertyKey: "diffuseBlendLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Bump", target: standardMaterial.detailMap, propertyKey: "bumpLevel", min: 0, max: 1, step: 0.01 })] })] }));
|
|
7163
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Diffuse Level", target: standardMaterial.diffuseTexture, propertyKey: "level", propertyPath: "diffuseTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Specular Level", target: standardMaterial.specularTexture, propertyKey: "level", propertyPath: "specularTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Reflection Level", target: standardMaterial.reflectionTexture, propertyKey: "level", propertyPath: "reflectionTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Refraction Level", target: standardMaterial.refractionTexture, propertyKey: "level", propertyPath: "refractionTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Emissive Level", target: standardMaterial.emissiveTexture, propertyKey: "level", propertyPath: "emissiveTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Bump Level", target: standardMaterial.bumpTexture, propertyKey: "level", propertyPath: "bumpTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Opacity Level", target: standardMaterial.opacityTexture, propertyKey: "level", propertyPath: "opacityTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Ambient Level", target: standardMaterial.ambientTexture, propertyKey: "level", propertyPath: "ambientTexture.level", min: 0, max: 2, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Lightmap Level", target: standardMaterial.lightmapTexture, propertyKey: "level", propertyPath: "lightmapTexture.level", min: 0, max: 2, step: 0.01 }), jsxs(Collapse, { visible: isDetailMapEnabled, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Diffuse", target: standardMaterial.detailMap, propertyKey: "diffuseBlendLevel", propertyPath: "detailMap.diffuseBlendLevel", min: 0, max: 1, step: 0.01 }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Detailmap Bump", target: standardMaterial.detailMap, propertyKey: "bumpLevel", propertyPath: "detailMap.bumpLevel", min: 0, max: 1, step: 0.01 })] })] }));
|
|
6994
7164
|
};
|
|
6995
7165
|
/**
|
|
6996
7166
|
* Displays the lighting and color properties of a standard material.
|
|
@@ -7454,7 +7624,7 @@ const AbstractMeshEdgeRenderingProperties = ({ mesh }) => {
|
|
|
7454
7624
|
else {
|
|
7455
7625
|
mesh.disableEdgesRendering();
|
|
7456
7626
|
}
|
|
7457
|
-
} }),
|
|
7627
|
+
} }), jsxs(Collapse, { visible: !!edgesRenderer, children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Edges Width", description: "Width of the rendered edges (0 to 10).", target: mesh, propertyKey: "edgesWidth", min: 0, max: 10, step: 0.1 }), jsx(BoundProperty, { component: Color4PropertyLine, label: "Edge Color", target: mesh, propertyKey: "edgesColor" })] })] }));
|
|
7458
7628
|
};
|
|
7459
7629
|
const AbstractMeshDebugProperties = (props) => {
|
|
7460
7630
|
const { mesh } = props;
|
|
@@ -9010,15 +9180,7 @@ const PhysicsBodyProperties = (props) => {
|
|
|
9010
9180
|
const shape = useProperty(physicsBody, "shape");
|
|
9011
9181
|
const type = useProperty(shape, "type");
|
|
9012
9182
|
const material = useProperty(shape, "material");
|
|
9013
|
-
return (jsxs(Fragment, { children: [jsx(NumberDropdownPropertyLine, { label: "Motion Type", options: MotionOptions, value: motionType, onChange: (value) => {
|
|
9014
|
-
return physicsBody.setMotionType(value);
|
|
9015
|
-
} }, "MotionType"), jsx(NumberDropdownPropertyLine, { label: "Prestep Type", options: PrestepOptions, value: prestepType, onChange: (value) => {
|
|
9016
|
-
return physicsBody.setPrestepType(value);
|
|
9017
|
-
} }), shape && jsx(TextPropertyLine, { label: "Shape Type", value: GetShapeTypeString(type) }), jsx(NumberInputPropertyLine, { label: "Linear Damping", min: 0, max: 1, step: 0.01, value: linearDamping, onChange: (e) => {
|
|
9018
|
-
physicsBody.setLinearDamping(e);
|
|
9019
|
-
} }), jsx(NumberInputPropertyLine, { label: "Angular Damping", min: 0, max: 1, step: 0.01, value: angularDamping, onChange: (e) => {
|
|
9020
|
-
physicsBody.setAngularDamping(e);
|
|
9021
|
-
} }), shape && (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Dynamic Friction", min: 0, max: 1, step: 0.01, target: material, propertyKey: "friction", nullable: true, defaultValue: 0.5 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Static Friction", min: 0, max: 1, step: 0.01, target: material, propertyKey: "staticFriction", nullable: true, defaultValue: material?.friction ?? 0.5 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Restitution", min: 0, max: 1, step: 0.01, target: material, propertyKey: "restitution", nullable: true, defaultValue: 0 })] })), jsx(Vector3PropertyLine, { label: "Linear Velocity", value: linearVelocity, onChange: (value) => physicsBody.setLinearVelocity(value) }), jsx(Vector3PropertyLine, { label: "Angular Velocity", value: angularVelocity, onChange: (value) => physicsBody.setAngularVelocity(value) }), massProperties && (jsxs(Fragment, { children: [jsx(NumberInputPropertyLine, { label: "Mass", value: massProperties.mass ?? 0, min: 0, step: 0.01, onChange: (value) => {
|
|
9183
|
+
return (jsxs(Fragment, { children: [jsx(NumberDropdownPropertyLine, { label: "Motion Type", options: MotionOptions, value: motionType, onChange: (value) => physicsBody.setMotionType(value) }, "MotionType"), jsx(NumberDropdownPropertyLine, { label: "Prestep Type", options: PrestepOptions, value: prestepType, onChange: (value) => physicsBody.setPrestepType(value) }), shape && jsx(TextPropertyLine, { label: "Shape Type", value: GetShapeTypeString(type) }), jsx(NumberInputPropertyLine, { label: "Linear Damping", min: 0, max: 1, step: 0.01, value: linearDamping, onChange: (value) => physicsBody.setLinearDamping(value) }), jsx(NumberInputPropertyLine, { label: "Angular Damping", min: 0, max: 1, step: 0.01, value: angularDamping, onChange: (value) => physicsBody.setAngularDamping(value) }), shape && (jsxs(Fragment, { children: [jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Dynamic Friction", min: 0, max: 1, step: 0.01, target: material, propertyKey: "friction", nullable: true, defaultValue: 0.5 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Static Friction", min: 0, max: 1, step: 0.01, target: material, propertyKey: "staticFriction", nullable: true, defaultValue: material?.friction ?? 0.5 }), jsx(BoundProperty, { component: NumberInputPropertyLine, label: "Restitution", min: 0, max: 1, step: 0.01, target: material, propertyKey: "restitution", nullable: true, defaultValue: 0 })] })), jsx(Vector3PropertyLine, { label: "Linear Velocity", value: linearVelocity, onChange: (value) => physicsBody.setLinearVelocity(value) }), jsx(Vector3PropertyLine, { label: "Angular Velocity", value: angularVelocity, onChange: (value) => physicsBody.setAngularVelocity(value) }), massProperties && (jsxs(Fragment, { children: [jsx(NumberInputPropertyLine, { label: "Mass", value: massProperties.mass ?? 0, min: 0, step: 0.01, onChange: (value) => {
|
|
9022
9184
|
physicsBody.setMassProperties({ ...massProperties, mass: value });
|
|
9023
9185
|
} }), jsx(Vector3PropertyLine, { label: "Center of Mass", value: centerOfMass, onChange: (value) => {
|
|
9024
9186
|
physicsBody.setMassProperties({ ...massProperties, centerOfMass: value });
|
|
@@ -9134,14 +9296,14 @@ let StoredEnvironmentTexture;
|
|
|
9134
9296
|
const SceneMaterialImageProcessingProperties = (props) => {
|
|
9135
9297
|
const { scene } = props;
|
|
9136
9298
|
const imageProcessing = scene.imageProcessingConfiguration;
|
|
9137
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Contrast", min: 0, max: 4, step: 0.1, target: imageProcessing, propertyKey: "contrast" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Exposure", min: 0, max: 4, step: 0.1, target: imageProcessing, propertyKey: "exposure" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Tone Mapping", target: imageProcessing, propertyKey: "toneMappingEnabled" }), jsx(Collapse, { visible: imageProcessing.toneMappingEnabled, children: jsx(BoundProperty, { component: NumberDropdownPropertyLine, options: [
|
|
9299
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Contrast", min: 0, max: 4, step: 0.1, target: imageProcessing, propertyKey: "contrast", propertyPath: "imageProcessingConfiguration.contrast" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Exposure", min: 0, max: 4, step: 0.1, target: imageProcessing, propertyKey: "exposure", propertyPath: "imageProcessingConfiguration.exposure" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Tone Mapping", target: imageProcessing, propertyKey: "toneMappingEnabled", propertyPath: "imageProcessingConfiguration.toneMappingEnabled" }), jsx(Collapse, { visible: imageProcessing.toneMappingEnabled, children: jsx(BoundProperty, { component: NumberDropdownPropertyLine, options: [
|
|
9138
9300
|
{ label: "Standard", value: ImageProcessingConfiguration.TONEMAPPING_STANDARD },
|
|
9139
9301
|
{ label: "ACES", value: ImageProcessingConfiguration.TONEMAPPING_ACES },
|
|
9140
9302
|
{ label: "Khronos PBR Neutral", value: ImageProcessingConfiguration.TONEMAPPING_KHR_PBR_NEUTRAL },
|
|
9141
|
-
], label: "Tone Mapping Type", target: imageProcessing, propertyKey: "toneMappingType" }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Vignette", target: imageProcessing, propertyKey: "vignetteEnabled" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette FOV", min: 0, max: Math.PI, step: 0.1, target: imageProcessing, propertyKey: "vignetteCameraFov" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center X", min: 0, max: 1, step: 0.1, target: imageProcessing, propertyKey: "vignetteCenterX" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center Y", min: 0, max: 1, step: 0.1, target: imageProcessing, propertyKey: "vignetteCenterY" }), jsx(BoundProperty, { component: Color4PropertyLine, label: "Vignette Color", target: imageProcessing, propertyKey: "vignetteColor" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, options: [
|
|
9303
|
+
], label: "Tone Mapping Type", target: imageProcessing, propertyKey: "toneMappingType", propertyPath: "imageProcessingConfiguration.toneMappingType" }) }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Vignette", target: imageProcessing, propertyKey: "vignetteEnabled", propertyPath: "imageProcessingConfiguration.vignetteEnabled" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette FOV", min: 0, max: Math.PI, step: 0.1, target: imageProcessing, propertyKey: "vignetteCameraFov", propertyPath: "imageProcessingConfiguration.vignetteCameraFov" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center X", min: 0, max: 1, step: 0.1, target: imageProcessing, propertyKey: "vignetteCenterX", propertyPath: "imageProcessingConfiguration.vignetteCenterX" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Vignette Center Y", min: 0, max: 1, step: 0.1, target: imageProcessing, propertyKey: "vignetteCenterY", propertyPath: "imageProcessingConfiguration.vignetteCenterY" }), jsx(BoundProperty, { component: Color4PropertyLine, label: "Vignette Color", target: imageProcessing, propertyKey: "vignetteColor", propertyPath: "imageProcessingConfiguration.vignetteColor" }), jsx(BoundProperty, { component: NumberDropdownPropertyLine, options: [
|
|
9142
9304
|
{ label: "Multiply", value: ImageProcessingConfiguration.VIGNETTEMODE_MULTIPLY },
|
|
9143
9305
|
{ label: "Opaque", value: ImageProcessingConfiguration.VIGNETTEMODE_OPAQUE },
|
|
9144
|
-
], label: "Vignette Blend Mode", target: imageProcessing, propertyKey: "vignetteBlendMode" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Dithering", target: imageProcessing, propertyKey: "ditheringEnabled" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Dithering Intensity", min: 0, max: 1, step: 0.5 / 255.0, target: imageProcessing, propertyKey: "ditheringIntensity" })] }));
|
|
9306
|
+
], label: "Vignette Blend Mode", target: imageProcessing, propertyKey: "vignetteBlendMode", propertyPath: "imageProcessingConfiguration.vignetteBlendMode" }), jsx(BoundProperty, { component: SwitchPropertyLine, label: "Dithering", target: imageProcessing, propertyKey: "ditheringEnabled", propertyPath: "imageProcessingConfiguration.ditheringEnabled" }), jsx(BoundProperty, { component: SyncedSliderPropertyLine, label: "Dithering Intensity", min: 0, max: 1, step: 0.5 / 255.0, target: imageProcessing, propertyKey: "ditheringIntensity", propertyPath: "imageProcessingConfiguration.ditheringIntensity" })] }));
|
|
9145
9307
|
};
|
|
9146
9308
|
const ScenePhysicsProperties = (props) => {
|
|
9147
9309
|
const { scene } = props;
|
|
@@ -9993,7 +10155,7 @@ const ThinTextureGeneralProperties = (props) => {
|
|
|
9993
10155
|
const ThinTextureSamplingProperties = (props) => {
|
|
9994
10156
|
const { texture } = props;
|
|
9995
10157
|
const samplingMode = useObservableState(useCallback(() => texture.samplingMode, [texture]), useInterceptObservable("function", texture, "updateSamplingMode"));
|
|
9996
|
-
return jsx(
|
|
10158
|
+
return (jsx(Property, { component: NumberDropdownPropertyLine, label: "Sampling", propertyPath: "samplingMode", value: samplingMode, options: SamplingMode, onChange: (value) => texture.updateSamplingMode(value) }));
|
|
9997
10159
|
};
|
|
9998
10160
|
|
|
9999
10161
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
@@ -11735,7 +11897,7 @@ const TransformProperties = (props) => {
|
|
|
11735
11897
|
const quatRotation = useQuaternionProperty(transform, "rotationQuaternion");
|
|
11736
11898
|
const useDegrees = useObservableState(() => settings.useDegrees, settings.settingsChangedObservable);
|
|
11737
11899
|
const useEuler = useObservableState(() => settings.useEuler, settings.settingsChangedObservable);
|
|
11738
|
-
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: Vector3PropertyLine, label: "Position", target: transform, propertyKey: "position" }), quatRotation ? (jsx(
|
|
11900
|
+
return (jsxs(Fragment, { children: [jsx(BoundProperty, { component: Vector3PropertyLine, label: "Position", target: transform, propertyKey: "position" }), quatRotation ? (jsx(Property, { component: QuaternionPropertyLine, label: "Rotation (Quat)", propertyPath: "rotationQuaternion", value: quatRotation, onChange: (val) => (transform.rotationQuaternion = val), useDegrees: useDegrees, useEuler: useEuler })) : (jsx(BoundProperty, { component: RotationVectorPropertyLine, label: "Rotation", target: transform, propertyKey: "rotation", useDegrees: useDegrees })), jsx(BoundProperty, { component: Vector3PropertyLine, label: "Scaling", target: transform, propertyKey: "scaling" })] }));
|
|
11739
11901
|
};
|
|
11740
11902
|
|
|
11741
11903
|
const TransformPropertiesServiceDefinition = {
|
|
@@ -13826,5 +13988,5 @@ const TextAreaPropertyLine = (props) => {
|
|
|
13826
13988
|
// Attach Inspector v2 to Scene.debugLayer as a side effect for back compat.
|
|
13827
13989
|
AttachDebugLayer();
|
|
13828
13990
|
|
|
13829
|
-
export {
|
|
13830
|
-
//# sourceMappingURL=index-
|
|
13991
|
+
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
|