@terraware/web-components 4.2.26-rc.0 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_vendor/react-multi-carousel/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
- package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
- package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
- package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
- package/_vendor/react-multi-carousel/lib/index.js +13 -0
- package/_vendor/react-multi-carousel/lib/types.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
- package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
- package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
- package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
- package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
- package/_virtual/Arrows.js +3 -0
- package/_virtual/Carousel.js +3 -0
- package/_virtual/CarouselItems.js +3 -0
- package/_virtual/Dots.js +3 -0
- package/_virtual/_commonjsHelpers.js +5 -0
- package/_virtual/clones.js +3 -0
- package/_virtual/common.js +3 -0
- package/_virtual/dots2.js +3 -0
- package/_virtual/elementWidth.js +3 -0
- package/_virtual/index.js +7 -0
- package/_virtual/index2.js +3 -0
- package/_virtual/index3.js +3 -0
- package/_virtual/mouseOrTouchMove.js +3 -0
- package/_virtual/next.js +3 -0
- package/_virtual/previous.js +3 -0
- package/_virtual/throttle.js +3 -0
- package/_virtual/throwError.js +3 -0
- package/_virtual/types.js +3 -0
- package/components/AntSwitch/index.js +6 -4
- package/components/Autocomplete/Autocomplete.js +19 -16
- package/components/Badge/index.js +8 -6
- package/components/BusySpinner/index.js +11 -8
- package/components/Button/Button.js +12 -9
- package/components/Checkbox.js +11 -8
- package/components/Confirm/index.js +14 -17
- package/components/DatePicker/DatePicker.js +19 -23
- package/components/DialogBox/DialogBox.js +25 -20
- package/components/Divisor.js +11 -8
- package/components/Dropdown.js +18 -15
- package/components/EditableTable/index.js +17 -14
- package/components/ErrorBox/ErrorBox.js +18 -15
- package/components/FileChooser/index.js +20 -15
- package/components/FormBottomBar/index.js +15 -12
- package/components/Icon/Icon.js +9 -6
- package/components/Icon/icons/index.js +252 -251
- package/components/IconTooltip/index.js +14 -9
- package/components/Map/MapBox.js +35 -32
- package/components/Map/MapContainer.js +10 -6
- package/components/Map/MapDateSliderControl.js +14 -12
- package/components/Map/MapDrawer.js +16 -12
- package/components/Map/MapLegend.js +32 -28
- package/components/Map/MapViewStyleControl.js +11 -9
- package/components/Map/ReactMapboxWrapper.js +1 -1
- package/components/Map/index.js +13 -11
- package/components/Map/types.js +5 -3
- package/components/Map/useMaintainLayerOrder.js +5 -2
- package/components/Markdown/index.js +6 -4
- package/components/Message/Message.js +25 -20
- package/components/MultiSelect/index.js +26 -23
- package/components/Navbar/NavFooter.js +8 -5
- package/components/Navbar/NavItem.js +14 -11
- package/components/Navbar/NavSection.js +10 -7
- package/components/Navbar/Navbar.js +16 -11
- package/components/Navbar/SubNavbar.js +8 -5
- package/components/Note.js +10 -7
- package/components/OverlayModal/OverlayModal.js +13 -11
- package/components/PageForm/index.js +15 -12
- package/components/PhotoChooser/index.js +30 -25
- package/components/PhotosCarousel/index.js +15 -18
- package/components/Pill/index.js +14 -11
- package/components/PillList/index.js +10 -7
- package/components/PlacementWrapper/index.js +8 -6
- package/components/PopoverMenu/Popover.js +12 -9
- package/components/PopoverMenu/index.js +14 -11
- package/components/PopoverMultiSelect/index.js +14 -11
- package/components/ProgressCircle/ProgressCircle.js +12 -9
- package/components/RadioButton.js +9 -6
- package/components/Select/Select.js +9 -6
- package/components/Select/SelectT.js +30 -26
- package/components/Separator/index.js +7 -5
- package/components/Size.js +1 -1
- package/components/Slider/index.js +9 -6
- package/components/SummaryBox.js +13 -10
- package/components/Tabs/index.js +22 -18
- package/components/TextTruncated/index.js +13 -20
- package/components/Textfield/Textfield.js +34 -28
- package/components/Textfield/TruncatedTextArea.js +12 -10
- package/components/TimelineSlider/TimelineMarker.js +8 -6
- package/components/TimelineSlider/TimelineRail.js +6 -4
- package/components/TimelineSlider/index.js +14 -12
- package/components/Tooltip/Tooltip.js +12 -7
- package/components/ViewPhotosDialog/index.js +14 -11
- package/components/VirtualWalkthrough/Annotation.js +10 -8
- package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
- package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
- package/components/VirtualWalkthrough/Application.js +9 -7
- package/components/VirtualWalkthrough/AutoRotator.js +5 -3
- package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
- package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
- package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
- package/components/VirtualWalkthrough/CameraInfo.js +15 -13
- package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
- package/components/VirtualWalkthrough/GradientSky.js +8 -6
- package/components/VirtualWalkthrough/SplatControls.js +37 -35
- package/components/VirtualWalkthrough/SplatCrop.js +6 -4
- package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
- package/components/VirtualWalkthrough/SplatModel.js +17 -14
- package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
- package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
- package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
- package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
- package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
- package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
- package/components/VirtualWalkthrough/XrExitButton.js +9 -7
- package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
- package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
- package/components/VirtualWalkthrough/boundary-ring.js +7 -5
- package/components/VirtualWalkthrough/boundary-wall.js +8 -6
- package/components/VirtualWalkthrough/groundPlane.js +6 -3
- package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
- package/components/VirtualWalkthrough/splatFormat.js +6 -4
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
- package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
- package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
- package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
- package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
- package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
- package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
- package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
- package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
- package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
- package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
- package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
- package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
- package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
- package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
- package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
- package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
- package/components/svg/BlobbyGrayIconImage.js +13 -11
- package/components/svg/BlobbyGrayIconImport.js +13 -11
- package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
- package/components/svg/BlobbyIconCloudChecked.js +41 -39
- package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
- package/components/svg/BlobbyIconFolder.js +41 -39
- package/components/svg/BlobbyIconGraphReport.js +41 -39
- package/components/svg/BlobbyIconHappy.js +41 -39
- package/components/svg/BlobbyIconHeartMonitor.js +41 -39
- package/components/svg/BlobbyIconLeaf.js +41 -39
- package/components/svg/BlobbyIconLibrary.js +41 -39
- package/components/svg/BlobbyIconNursery.js +41 -39
- package/components/svg/BlobbyIconOrganization.js +41 -39
- package/components/svg/BlobbyIconParchment.js +41 -39
- package/components/svg/BlobbyIconPeople.js +41 -39
- package/components/svg/BlobbyIconSeedBank.js +41 -39
- package/components/svg/BlobbyIconSeedling.js +41 -39
- package/components/svg/BlobbyIconSeeds.js +41 -39
- package/components/svg/BlobbyIconSite.js +42 -40
- package/components/svg/BlobbyIconSparkles.js +41 -39
- package/components/svg/BlobbyIconWrench.js +41 -39
- package/components/svg/Bug.js +8 -6
- package/components/svg/Calendar.js +8 -6
- package/components/svg/CaretDown.js +8 -6
- package/components/svg/CaretLeft.js +8 -6
- package/components/svg/CaretRight.js +8 -6
- package/components/svg/CaretUp.js +8 -6
- package/components/svg/ChevronDown.js +8 -6
- package/components/svg/ChevronUp.js +8 -6
- package/components/svg/Close.js +8 -6
- package/components/svg/Critical.js +8 -6
- package/components/svg/Edit.js +41 -39
- package/components/svg/Error.js +8 -6
- package/components/svg/Filter.js +8 -6
- package/components/svg/Folder.js +8 -6
- package/components/svg/Help.js +8 -6
- package/components/svg/Home.js +8 -6
- package/components/svg/IconAdd.js +8 -6
- package/components/svg/IconArrowRight.js +8 -6
- package/components/svg/IconBusinessNetwork.js +8 -6
- package/components/svg/IconCalendar.js +8 -6
- package/components/svg/IconCancel.js +8 -6
- package/components/svg/IconChargingBattery.js +8 -6
- package/components/svg/IconChecklist.js +8 -6
- package/components/svg/IconCheckmark.js +8 -6
- package/components/svg/IconCoinInHand.js +8 -6
- package/components/svg/IconColumns.js +8 -6
- package/components/svg/IconComment.js +8 -6
- package/components/svg/IconDashboard.js +8 -6
- package/components/svg/IconDataMigration.js +8 -6
- package/components/svg/IconDocument.js +8 -6
- package/components/svg/IconDownloadFromTheCloud.js +8 -6
- package/components/svg/IconEdit.js +8 -6
- package/components/svg/IconExpand.js +8 -6
- package/components/svg/IconExport.js +8 -6
- package/components/svg/IconExternalLink.js +8 -6
- package/components/svg/IconEye.js +8 -6
- package/components/svg/IconEyeOff.js +8 -6
- package/components/svg/IconFile.js +8 -6
- package/components/svg/IconFolder.js +8 -6
- package/components/svg/IconFullScreen.js +8 -6
- package/components/svg/IconFutures.js +8 -6
- package/components/svg/IconGraphReport.js +8 -6
- package/components/svg/IconHeartMonitor.js +8 -6
- package/components/svg/IconHelp.js +8 -6
- package/components/svg/IconHistory.js +8 -6
- package/components/svg/IconImport.js +8 -6
- package/components/svg/IconIndex.js +8 -6
- package/components/svg/IconLayers.js +8 -6
- package/components/svg/IconLibrary.js +8 -6
- package/components/svg/IconList.js +8 -6
- package/components/svg/IconLivePlant.js +8 -6
- package/components/svg/IconLocations.js +8 -6
- package/components/svg/IconMail.js +8 -6
- package/components/svg/IconManager.js +8 -6
- package/components/svg/IconMarker.js +8 -6
- package/components/svg/IconMenu.js +8 -6
- package/components/svg/IconMenuHorizontal.js +8 -6
- package/components/svg/IconModule.js +8 -6
- package/components/svg/IconMyLocation.js +8 -6
- package/components/svg/IconNote.js +8 -6
- package/components/svg/IconNursery.js +8 -6
- package/components/svg/IconOrg.js +8 -6
- package/components/svg/IconParchment.js +8 -6
- package/components/svg/IconPhoto.js +8 -6
- package/components/svg/IconPlantsFilled.js +8 -6
- package/components/svg/IconRedo.js +8 -6
- package/components/svg/IconRestorationSite.js +8 -6
- package/components/svg/IconSeedBank.js +8 -6
- package/components/svg/IconSeedling.js +8 -6
- package/components/svg/IconSettings.js +8 -6
- package/components/svg/IconSlice.js +8 -6
- package/components/svg/IconSubmit.js +8 -6
- package/components/svg/IconSubtract.js +8 -6
- package/components/svg/IconSynced.js +8 -6
- package/components/svg/IconTrashCan.js +8 -6
- package/components/svg/IconTreasureMap.js +8 -6
- package/components/svg/IconUnavailable.js +8 -6
- package/components/svg/IconUndo.js +8 -6
- package/components/svg/IconVariable.js +8 -6
- package/components/svg/IconVideo.js +9 -7
- package/components/svg/IconWifi.js +8 -6
- package/components/svg/Info.js +8 -6
- package/components/svg/Key.js +8 -6
- package/components/svg/Leaf.js +8 -6
- package/components/svg/Lock.js +8 -6
- package/components/svg/Logo.js +16 -14
- package/components/svg/MenuVertical.js +8 -6
- package/components/svg/Notification.js +8 -6
- package/components/svg/Person.js +8 -6
- package/components/svg/Plus.js +8 -6
- package/components/svg/RestorationSite.js +8 -6
- package/components/svg/Search.js +8 -6
- package/components/svg/Seeds.js +8 -6
- package/components/svg/Site.js +8 -6
- package/components/svg/Sparkles.js +8 -6
- package/components/svg/Species.js +8 -6
- package/components/svg/Species2.js +41 -39
- package/components/svg/Spinner.js +16 -14
- package/components/svg/Star.js +8 -6
- package/components/svg/Success.js +8 -6
- package/components/svg/SuccessFilled.js +8 -6
- package/components/svg/TerrawareLogoDesktop.js +17 -15
- package/components/svg/TerrawareLogoMobile.js +9 -7
- package/components/svg/Touchscreen.js +8 -6
- package/components/svg/UploadCloud.js +41 -39
- package/components/svg/Warning.js +8 -6
- package/components/svg/WelcomeClipboard.js +32 -30
- package/components/svg/index.js +127 -127
- package/components/table/EnhancedTableToolbar.js +18 -15
- package/components/table/EnhancedTableToolbarV2.js +8 -6
- package/components/table/TableCellRenderer.js +37 -32
- package/components/table/TableHeader.js +17 -14
- package/components/table/TableHeaderItem.js +18 -15
- package/components/table/density.js +5 -3
- package/components/table/index.js +40 -37
- package/components/table/sort.js +6 -4
- package/components/table/types.js +1 -1
- package/components/types/index.js +1 -1
- package/hooks/useBoolean.js +4 -2
- package/hooks/useCameraPosition.js +5 -2
- package/hooks/useDevicePerformance.js +6 -3
- package/hooks/useXr.js +6 -4
- package/index.js +55 -58
- package/package.json +6 -2
- package/style-dictionary-dist/TerrawareTheme.js +2 -1
- package/theme.js +5 -2
- package/utils/color.js +5 -2
- package/utils/date.js +7 -6
- package/utils/index.js +4 -5
- package/utils/preventDefaultEvent.js +2 -1
- package/utils/text.js +3 -2
- package/utils/useDeviceInfo.js +2 -1
- package/virtualWalkthrough.js +23 -31
- package/components/Button/button.test.js +0 -23
- package/components/MultiSelect/MultiSelect.test.js +0 -73
- package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
- package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
- package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
- package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
- package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
- package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
- package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
- package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
- package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
- package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
- package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
- package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
- package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
- package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
- package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
- package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
- package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
- package/components/table/sort.test.js +0 -35
- package/utils/date.test.js +0 -84
- package/utils/text.test.js +0 -21
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { jsx
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import { useTheme, Box, Fade, Typography, Checkbox, Divider } from '@mui/material';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
4
5
|
const ControlsInfoPane = ({
|
|
5
6
|
visible,
|
|
6
7
|
paneRef,
|
|
@@ -29,7 +30,7 @@ const ControlsInfoPane = ({
|
|
|
29
30
|
const dividerSx = {
|
|
30
31
|
backgroundColor: theme.palette.TwClrBrdrTertiary
|
|
31
32
|
};
|
|
32
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/jsx(Box, {
|
|
33
34
|
sx: {
|
|
34
35
|
position: 'absolute',
|
|
35
36
|
top: 0,
|
|
@@ -44,10 +45,10 @@ const ControlsInfoPane = ({
|
|
|
44
45
|
paddingTop: isFullScreen ? 8 : 2,
|
|
45
46
|
zIndex: 1001
|
|
46
47
|
},
|
|
47
|
-
children: /*#__PURE__*/
|
|
48
|
+
children: /*#__PURE__*/jsx(Fade, {
|
|
48
49
|
in: visible,
|
|
49
50
|
timeout: 500,
|
|
50
|
-
children: /*#__PURE__*/
|
|
51
|
+
children: /*#__PURE__*/jsx(Box, {
|
|
51
52
|
ref: paneRef,
|
|
52
53
|
sx: {
|
|
53
54
|
backgroundColor: theme.palette.grey[900],
|
|
@@ -58,134 +59,134 @@ const ControlsInfoPane = ({
|
|
|
58
59
|
maxWidth: 400,
|
|
59
60
|
pointerEvents: 'auto'
|
|
60
61
|
},
|
|
61
|
-
children: /*#__PURE__*/
|
|
62
|
+
children: /*#__PURE__*/jsxs(Box, {
|
|
62
63
|
sx: {
|
|
63
64
|
display: 'flex',
|
|
64
65
|
flexDirection: 'column',
|
|
65
66
|
gap: 1
|
|
66
67
|
},
|
|
67
|
-
children: [/*#__PURE__*/
|
|
68
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
68
69
|
sx: {
|
|
69
70
|
fontWeight: 600
|
|
70
71
|
},
|
|
71
72
|
children: strings.controls
|
|
72
|
-
}), /*#__PURE__*/
|
|
73
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
73
74
|
sx: controlRowSx,
|
|
74
|
-
children: [/*#__PURE__*/
|
|
75
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
75
76
|
children: strings.annotations
|
|
76
|
-
}), /*#__PURE__*/
|
|
77
|
+
}), /*#__PURE__*/jsx(Checkbox, {
|
|
77
78
|
checked: showAnnotations ?? true,
|
|
78
79
|
onChange: handleAnnotationsChange,
|
|
79
80
|
sx: {
|
|
80
81
|
color: theme.palette.primary.main
|
|
81
82
|
}
|
|
82
83
|
})]
|
|
83
|
-
}), /*#__PURE__*/
|
|
84
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
84
85
|
sx: dividerSx
|
|
85
|
-
}), /*#__PURE__*/
|
|
86
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
86
87
|
sx: controlRowSx,
|
|
87
|
-
children: [/*#__PURE__*/
|
|
88
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
88
89
|
children: strings.autoRotate
|
|
89
|
-
}), /*#__PURE__*/
|
|
90
|
+
}), /*#__PURE__*/jsx(Checkbox, {
|
|
90
91
|
checked: autoRotate ?? true,
|
|
91
92
|
onChange: handleAutoRotateChange,
|
|
92
93
|
sx: {
|
|
93
94
|
color: theme.palette.primary.main
|
|
94
95
|
}
|
|
95
96
|
})]
|
|
96
|
-
}), /*#__PURE__*/
|
|
97
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
97
98
|
sx: dividerSx
|
|
98
|
-
}), /*#__PURE__*/
|
|
99
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
99
100
|
sx: controlRowSx,
|
|
100
|
-
children: [/*#__PURE__*/
|
|
101
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
101
102
|
children: strings.orbit
|
|
102
|
-
}), /*#__PURE__*/
|
|
103
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
103
104
|
sx: rightAlignedTextSx,
|
|
104
|
-
children: [/*#__PURE__*/
|
|
105
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
105
106
|
children: strings.leftMouse
|
|
106
|
-
}), /*#__PURE__*/
|
|
107
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
107
108
|
children: strings.touchDrag
|
|
108
109
|
})]
|
|
109
110
|
})]
|
|
110
|
-
}), /*#__PURE__*/
|
|
111
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
111
112
|
sx: dividerSx
|
|
112
|
-
}), /*#__PURE__*/
|
|
113
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
113
114
|
sx: controlRowSx,
|
|
114
|
-
children: [/*#__PURE__*/
|
|
115
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
115
116
|
children: strings.pan
|
|
116
|
-
}), /*#__PURE__*/
|
|
117
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
117
118
|
sx: rightAlignedTextSx,
|
|
118
|
-
children: [/*#__PURE__*/
|
|
119
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
119
120
|
children: strings.middleMouse
|
|
120
|
-
}), /*#__PURE__*/
|
|
121
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
121
122
|
children: strings.swipe
|
|
122
123
|
})]
|
|
123
124
|
})]
|
|
124
|
-
}), /*#__PURE__*/
|
|
125
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
125
126
|
sx: dividerSx
|
|
126
|
-
}), /*#__PURE__*/
|
|
127
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
127
128
|
sx: controlRowSx,
|
|
128
|
-
children: [/*#__PURE__*/
|
|
129
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
129
130
|
children: strings.look
|
|
130
|
-
}), /*#__PURE__*/
|
|
131
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
131
132
|
children: strings.rightMouse
|
|
132
133
|
})]
|
|
133
|
-
}), /*#__PURE__*/
|
|
134
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
134
135
|
sx: dividerSx
|
|
135
|
-
}), /*#__PURE__*/
|
|
136
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
136
137
|
sx: controlRowSx,
|
|
137
|
-
children: [/*#__PURE__*/
|
|
138
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
138
139
|
children: strings.zoom
|
|
139
|
-
}), /*#__PURE__*/
|
|
140
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
140
141
|
sx: rightAlignedTextSx,
|
|
141
|
-
children: [/*#__PURE__*/
|
|
142
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
142
143
|
children: strings.mouseWheel
|
|
143
|
-
}), /*#__PURE__*/
|
|
144
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
144
145
|
children: strings.pinch
|
|
145
146
|
})]
|
|
146
147
|
})]
|
|
147
|
-
}), /*#__PURE__*/
|
|
148
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
148
149
|
sx: dividerSx
|
|
149
|
-
}), /*#__PURE__*/
|
|
150
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
150
151
|
sx: controlRowSx,
|
|
151
|
-
children: [/*#__PURE__*/
|
|
152
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
152
153
|
children: strings.fly
|
|
153
|
-
}), /*#__PURE__*/
|
|
154
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
154
155
|
sx: rightAlignedTextSx,
|
|
155
|
-
children: [/*#__PURE__*/
|
|
156
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
156
157
|
children: "WASD"
|
|
157
|
-
}), /*#__PURE__*/
|
|
158
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
158
159
|
children: strings.arrowKeys
|
|
159
160
|
})]
|
|
160
161
|
})]
|
|
161
|
-
}), /*#__PURE__*/
|
|
162
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
162
163
|
sx: dividerSx
|
|
163
|
-
}), /*#__PURE__*/
|
|
164
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
164
165
|
sx: controlRowSx,
|
|
165
|
-
children: [/*#__PURE__*/
|
|
166
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
166
167
|
children: strings.flyFaster
|
|
167
|
-
}), /*#__PURE__*/
|
|
168
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
168
169
|
children: strings.shift
|
|
169
170
|
})]
|
|
170
|
-
}), /*#__PURE__*/
|
|
171
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
171
172
|
sx: dividerSx
|
|
172
|
-
}), /*#__PURE__*/
|
|
173
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
173
174
|
sx: controlRowSx,
|
|
174
|
-
children: [/*#__PURE__*/
|
|
175
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
175
176
|
children: strings.flySlower
|
|
176
|
-
}), /*#__PURE__*/
|
|
177
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
177
178
|
children: strings.ctrl
|
|
178
179
|
})]
|
|
179
|
-
}), /*#__PURE__*/
|
|
180
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
180
181
|
sx: dividerSx
|
|
181
|
-
}), /*#__PURE__*/
|
|
182
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
182
183
|
sx: controlRowSx,
|
|
183
|
-
children: [/*#__PURE__*/
|
|
184
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
184
185
|
children: strings.resetCamera
|
|
185
|
-
}), /*#__PURE__*/
|
|
186
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
186
187
|
children: "R"
|
|
187
188
|
})]
|
|
188
|
-
}), /*#__PURE__*/
|
|
189
|
+
}), /*#__PURE__*/jsx(Divider, {
|
|
189
190
|
sx: dividerSx
|
|
190
191
|
})]
|
|
191
192
|
})
|
|
@@ -193,4 +194,5 @@ const ControlsInfoPane = ({
|
|
|
193
194
|
})
|
|
194
195
|
});
|
|
195
196
|
};
|
|
196
|
-
|
|
197
|
+
|
|
198
|
+
export { ControlsInfoPane as default };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useMemo, useEffect } from 'react';
|
|
2
2
|
import { Entity } from '@playcanvas/react';
|
|
3
3
|
import { Render } from '@playcanvas/react/components';
|
|
4
4
|
import { useApp } from '@playcanvas/react/hooks';
|
|
5
|
-
import {
|
|
6
|
-
import { jsx
|
|
5
|
+
import { Texture, PIXELFORMAT_RGBA8, StandardMaterial, Color } from 'playcanvas';
|
|
6
|
+
import { jsx } from 'react/jsx-runtime';
|
|
7
|
+
|
|
7
8
|
const GradientSky = ({
|
|
8
9
|
topColor = '#1e90ff',
|
|
9
10
|
horizonColor = '#87ceeb',
|
|
@@ -58,11 +59,11 @@ const GradientSky = ({
|
|
|
58
59
|
if (!material) {
|
|
59
60
|
return null;
|
|
60
61
|
}
|
|
61
|
-
return /*#__PURE__*/
|
|
62
|
+
return /*#__PURE__*/jsx(Entity, {
|
|
62
63
|
name: "gradient-sky",
|
|
63
64
|
position: [0, 0, 0],
|
|
64
65
|
scale: [500, 500, 500],
|
|
65
|
-
children: /*#__PURE__*/
|
|
66
|
+
children: /*#__PURE__*/jsx(Render, {
|
|
66
67
|
type: "sphere",
|
|
67
68
|
material: material,
|
|
68
69
|
castShadows: false,
|
|
@@ -70,4 +71,5 @@ const GradientSky = ({
|
|
|
70
71
|
})
|
|
71
72
|
});
|
|
72
73
|
};
|
|
73
|
-
|
|
74
|
+
|
|
75
|
+
export { GradientSky as default };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { Box, IconButton
|
|
4
|
-
import useBoolean from '../../hooks/useBoolean';
|
|
5
|
-
import { useCameraPosition } from '../../hooks/useCameraPosition';
|
|
6
|
-
import
|
|
7
|
-
import { getRgbaFromHex } from '../../utils/color';
|
|
8
|
-
import useDeviceInfo from '../../utils/useDeviceInfo';
|
|
9
|
-
import Button from '../Button/Button';
|
|
10
|
-
import Icon from '../Icon/Icon';
|
|
11
|
-
import AnnotationEditPane from './AnnotationEditPane';
|
|
12
|
-
import CameraInfo from './CameraInfo';
|
|
13
|
-
import ControlsInfoPane from './ControlsInfoPane';
|
|
14
|
-
import {
|
|
1
|
+
import { useRef, useEffect, useCallback } from 'react';
|
|
2
|
+
import { FullscreenExit, Fullscreen } from '@mui/icons-material';
|
|
3
|
+
import { useTheme, Box, IconButton } from '@mui/material';
|
|
4
|
+
import useBoolean from '../../hooks/useBoolean.js';
|
|
5
|
+
import { useCameraPosition } from '../../hooks/useCameraPosition.js';
|
|
6
|
+
import useXr from '../../hooks/useXr.js';
|
|
7
|
+
import { getRgbaFromHex } from '../../utils/color.js';
|
|
8
|
+
import useDeviceInfo from '../../utils/useDeviceInfo.js';
|
|
9
|
+
import Button from '../Button/Button.js';
|
|
10
|
+
import Icon from '../Icon/Icon.js';
|
|
11
|
+
import AnnotationEditPane from './AnnotationEditPane.js';
|
|
12
|
+
import CameraInfo from './CameraInfo.js';
|
|
13
|
+
import ControlsInfoPane from './ControlsInfoPane.js';
|
|
14
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
15
|
+
|
|
15
16
|
const SplatControls = ({
|
|
16
17
|
strings,
|
|
17
18
|
defaultCameraPosition,
|
|
@@ -99,7 +100,7 @@ const SplatControls = ({
|
|
|
99
100
|
};
|
|
100
101
|
}, [isInfoVisible, setIsInfoVisible, infoButtonRef]);
|
|
101
102
|
const handleEdit = useCallback(() => onToggleEdit?.(true), [onToggleEdit]);
|
|
102
|
-
return /*#__PURE__*/
|
|
103
|
+
return /*#__PURE__*/jsxs(Box, {
|
|
103
104
|
sx: {
|
|
104
105
|
position: 'absolute',
|
|
105
106
|
top: 0,
|
|
@@ -108,7 +109,7 @@ const SplatControls = ({
|
|
|
108
109
|
height: '100%',
|
|
109
110
|
pointerEvents: 'none'
|
|
110
111
|
},
|
|
111
|
-
children: [isEdit && /*#__PURE__*/
|
|
112
|
+
children: [isEdit && /*#__PURE__*/jsxs(Box, {
|
|
112
113
|
sx: {
|
|
113
114
|
position: 'absolute',
|
|
114
115
|
top: 16,
|
|
@@ -118,17 +119,17 @@ const SplatControls = ({
|
|
|
118
119
|
gap: 1,
|
|
119
120
|
pointerEvents: 'auto'
|
|
120
121
|
},
|
|
121
|
-
children: [!hasSelectedAnnotation && onAddAnnotation && /*#__PURE__*/
|
|
122
|
+
children: [!hasSelectedAnnotation && onAddAnnotation && /*#__PURE__*/jsx(Button, {
|
|
122
123
|
label: strings.addAnnotation,
|
|
123
124
|
onClick: onAddAnnotation
|
|
124
|
-
}), hasSelectedAnnotation && onDeselectAnnotation && /*#__PURE__*/
|
|
125
|
+
}), hasSelectedAnnotation && onDeselectAnnotation && /*#__PURE__*/jsx(Button, {
|
|
125
126
|
label: strings.deselectAnnotation,
|
|
126
127
|
onClick: onDeselectAnnotation
|
|
127
|
-
}), hasSelectedAnnotation && onDeleteAnnotation && /*#__PURE__*/
|
|
128
|
+
}), hasSelectedAnnotation && onDeleteAnnotation && /*#__PURE__*/jsx(Button, {
|
|
128
129
|
label: strings.deleteAnnotation,
|
|
129
130
|
onClick: onDeleteAnnotation
|
|
130
131
|
})]
|
|
131
|
-
}), /*#__PURE__*/
|
|
132
|
+
}), /*#__PURE__*/jsxs(Box, {
|
|
132
133
|
sx: {
|
|
133
134
|
position: 'absolute',
|
|
134
135
|
bottom: 16,
|
|
@@ -138,27 +139,27 @@ const SplatControls = ({
|
|
|
138
139
|
gap: 1,
|
|
139
140
|
pointerEvents: 'auto'
|
|
140
141
|
},
|
|
141
|
-
children: [isXrAvailable('AR') && !isEdit && /*#__PURE__*/
|
|
142
|
+
children: [isXrAvailable('AR') && !isEdit && /*#__PURE__*/jsx(Button, {
|
|
142
143
|
label: strings.ar,
|
|
143
144
|
onClick: () => startXr('AR')
|
|
144
|
-
}), isXrAvailable('VR') && !isEdit && /*#__PURE__*/
|
|
145
|
+
}), isXrAvailable('VR') && !isEdit && /*#__PURE__*/jsx(Button, {
|
|
145
146
|
label: strings.vr,
|
|
146
147
|
onClick: () => startXr('VR')
|
|
147
|
-
}), isDesktop && editable && !isEdit && onToggleEdit && /*#__PURE__*/
|
|
148
|
+
}), isDesktop && editable && !isEdit && onToggleEdit && /*#__PURE__*/jsx(Button, {
|
|
148
149
|
label: strings.edit,
|
|
149
150
|
onClick: handleEdit
|
|
150
|
-
}), isDesktop && showFreeFly && !isEdit && onToggleFreeFly && /*#__PURE__*/
|
|
151
|
+
}), isDesktop && showFreeFly && !isEdit && onToggleFreeFly && /*#__PURE__*/jsx(Button, {
|
|
151
152
|
label: isFreeFly ? strings.boundedFly : strings.freeFly,
|
|
152
153
|
onClick: onToggleFreeFly
|
|
153
|
-
}), isEdit && onCancel && /*#__PURE__*/
|
|
154
|
+
}), isEdit && onCancel && /*#__PURE__*/jsx(Button, {
|
|
154
155
|
label: strings.cancel,
|
|
155
156
|
onClick: onCancel
|
|
156
|
-
}), isEdit && onSave && /*#__PURE__*/
|
|
157
|
+
}), isEdit && onSave && /*#__PURE__*/jsx(Button, {
|
|
157
158
|
label: strings.save,
|
|
158
159
|
onClick: onSave,
|
|
159
160
|
disabled: !canSave
|
|
160
161
|
})]
|
|
161
|
-
}), onToggleFullScreen && /*#__PURE__*/
|
|
162
|
+
}), onToggleFullScreen && /*#__PURE__*/jsx(IconButton, {
|
|
162
163
|
sx: {
|
|
163
164
|
position: 'absolute',
|
|
164
165
|
bottom: 16,
|
|
@@ -171,16 +172,16 @@ const SplatControls = ({
|
|
|
171
172
|
},
|
|
172
173
|
onClick: onToggleFullScreen,
|
|
173
174
|
"aria-label": isFullScreen ? 'Exit fullscreen' : 'Enter fullscreen',
|
|
174
|
-
children: isFullScreen ? /*#__PURE__*/
|
|
175
|
+
children: isFullScreen ? /*#__PURE__*/jsx(FullscreenExit, {
|
|
175
176
|
sx: {
|
|
176
177
|
color: theme.palette.TwClrIcnInfo
|
|
177
178
|
}
|
|
178
|
-
}) : /*#__PURE__*/
|
|
179
|
+
}) : /*#__PURE__*/jsx(Fullscreen, {
|
|
179
180
|
sx: {
|
|
180
181
|
color: theme.palette.TwClrIcnInfo
|
|
181
182
|
}
|
|
182
183
|
})
|
|
183
|
-
}), /*#__PURE__*/
|
|
184
|
+
}), /*#__PURE__*/jsx(IconButton, {
|
|
184
185
|
ref: infoButtonRef,
|
|
185
186
|
sx: {
|
|
186
187
|
position: 'absolute',
|
|
@@ -193,12 +194,12 @@ const SplatControls = ({
|
|
|
193
194
|
pointerEvents: 'auto'
|
|
194
195
|
},
|
|
195
196
|
onClick: handleInfo,
|
|
196
|
-
children: /*#__PURE__*/
|
|
197
|
+
children: /*#__PURE__*/jsx(Icon, {
|
|
197
198
|
name: "info",
|
|
198
199
|
size: 'medium',
|
|
199
200
|
fillColor: theme.palette.TwClrIcnInfo
|
|
200
201
|
})
|
|
201
|
-
}), /*#__PURE__*/
|
|
202
|
+
}), /*#__PURE__*/jsx(ControlsInfoPane, {
|
|
202
203
|
visible: isInfoVisible,
|
|
203
204
|
paneRef: paneRef,
|
|
204
205
|
strings: strings.controlsInfoPane,
|
|
@@ -207,7 +208,7 @@ const SplatControls = ({
|
|
|
207
208
|
autoRotate: autoRotate,
|
|
208
209
|
onToggleAutoRotate: onToggleAutoRotate,
|
|
209
210
|
isFullScreen: isFullScreen
|
|
210
|
-
}), /*#__PURE__*/
|
|
211
|
+
}), /*#__PURE__*/jsx(AnnotationEditPane, {
|
|
211
212
|
visible: isEdit === true && hasSelectedAnnotation === true,
|
|
212
213
|
annotation: selectedAnnotation ?? null,
|
|
213
214
|
strings: strings.annotationEditPane,
|
|
@@ -215,10 +216,11 @@ const SplatControls = ({
|
|
|
215
216
|
onTextFieldFocus: onTextFieldFocus,
|
|
216
217
|
maxImages: maxImagesPerAnnotation,
|
|
217
218
|
onImagesChange: onImagesChange
|
|
218
|
-
}, selectedAnnotationIndex), isEdit && /*#__PURE__*/
|
|
219
|
+
}, selectedAnnotationIndex), isEdit && /*#__PURE__*/jsx(CameraInfo, {
|
|
219
220
|
strings: strings.cameraInfo,
|
|
220
221
|
getCameraState: getCameraState
|
|
221
222
|
})]
|
|
222
223
|
});
|
|
223
224
|
};
|
|
224
|
-
|
|
225
|
+
|
|
226
|
+
export { SplatControls as default };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Script } from '@playcanvas/react/components';
|
|
3
3
|
import { Vec3 } from 'playcanvas';
|
|
4
4
|
import { GSplatCropShaderEffect } from 'playcanvas/scripts/esm/gsplat/shader-effect-crop.mjs';
|
|
5
|
-
import { jsx
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
6
7
|
const SplatCrop = ({
|
|
7
8
|
aabbMin = [-1, -1, -1],
|
|
8
9
|
aabbMax = [1, 1, 1],
|
|
9
10
|
edgeScaleFactor = 0.5
|
|
10
11
|
}) => {
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/jsx(Script, {
|
|
12
13
|
script: GSplatCropShaderEffect,
|
|
13
14
|
aabbMin: new Vec3(...aabbMin),
|
|
14
15
|
aabbMax: new Vec3(...aabbMax),
|
|
15
16
|
edgeScaleFactor: edgeScaleFactor
|
|
16
17
|
});
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
export { SplatCrop as default };
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Script } from '@playcanvas/react/components';
|
|
3
3
|
import { Vec3 } from 'playcanvas';
|
|
4
|
-
import { GsplatFadeCropShaderEffect } from './gsplat-fade-crop-effect';
|
|
5
|
-
import { jsx
|
|
4
|
+
import { GsplatFadeCropShaderEffect } from './gsplat-fade-crop-effect.js';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
6
7
|
const SplatFadeCrop = ({
|
|
7
8
|
aabbMin = [-1, -1, -1],
|
|
8
9
|
aabbMax = [1, 1, 1],
|
|
9
10
|
fadeDistance = 0.5
|
|
10
11
|
}) => {
|
|
11
|
-
return /*#__PURE__*/
|
|
12
|
+
return /*#__PURE__*/jsx(Script, {
|
|
12
13
|
script: GsplatFadeCropShaderEffect,
|
|
13
14
|
aabbMin: new Vec3(...aabbMin),
|
|
14
15
|
aabbMax: new Vec3(...aabbMax),
|
|
15
16
|
fadeDistance: fadeDistance
|
|
16
17
|
});
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
+
|
|
20
|
+
export { SplatFadeCrop as default };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { memo, useEffect } from 'react';
|
|
2
2
|
import { Entity } from '@playcanvas/react';
|
|
3
3
|
import { GSplat } from '@playcanvas/react/components';
|
|
4
4
|
import { useSplat } from '@playcanvas/react/hooks';
|
|
5
|
-
import BlockingSpinner from './BlockingSpinner';
|
|
6
|
-
import SplatCrop from './SplatCrop';
|
|
7
|
-
import SplatFadeCrop from './SplatFadeCrop';
|
|
8
|
-
import SplatRevealRain from './SplatRevealRain';
|
|
9
|
-
import {
|
|
10
|
-
import { jsx
|
|
5
|
+
import BlockingSpinner from './BlockingSpinner.js';
|
|
6
|
+
import SplatCrop from './SplatCrop.js';
|
|
7
|
+
import SplatFadeCrop from './SplatFadeCrop.js';
|
|
8
|
+
import SplatRevealRain from './SplatRevealRain.js';
|
|
9
|
+
import { splatLoaderFilename, detectSplatFormat } from './splatFormat.js';
|
|
10
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
11
|
+
|
|
11
12
|
const SplatModel = ({
|
|
12
13
|
splatSrc,
|
|
13
14
|
splatFormat,
|
|
@@ -38,28 +39,30 @@ const SplatModel = ({
|
|
|
38
39
|
}
|
|
39
40
|
}, [error, onError]);
|
|
40
41
|
if (loading) {
|
|
41
|
-
return /*#__PURE__*/
|
|
42
|
+
return /*#__PURE__*/jsx(BlockingSpinner, {});
|
|
42
43
|
}
|
|
43
44
|
if (!asset) {
|
|
44
45
|
return null;
|
|
45
46
|
}
|
|
46
|
-
return /*#__PURE__*/
|
|
47
|
+
return /*#__PURE__*/jsxs(Entity, {
|
|
47
48
|
name: "splat",
|
|
48
49
|
rotation: rotation,
|
|
49
|
-
children: [/*#__PURE__*/
|
|
50
|
+
children: [/*#__PURE__*/jsx(GSplat, {
|
|
50
51
|
asset: asset,
|
|
51
52
|
unified: true
|
|
52
|
-
}), (cropAabbMin || cropAabbMax) && (cropFade ? /*#__PURE__*/
|
|
53
|
+
}), (cropAabbMin || cropAabbMax) && (cropFade ? /*#__PURE__*/jsx(SplatFadeCrop, {
|
|
53
54
|
aabbMin: cropAabbMin,
|
|
54
55
|
aabbMax: cropAabbMax,
|
|
55
56
|
fadeDistance: cropFadeDistance
|
|
56
|
-
}) : /*#__PURE__*/
|
|
57
|
+
}) : /*#__PURE__*/jsx(SplatCrop, {
|
|
57
58
|
aabbMin: cropAabbMin,
|
|
58
59
|
aabbMax: cropAabbMax,
|
|
59
60
|
edgeScaleFactor: cropEdgeScaleFactor
|
|
60
|
-
})), /*#__PURE__*/
|
|
61
|
+
})), /*#__PURE__*/jsx(SplatRevealRain, {
|
|
61
62
|
enabled: revealRain
|
|
62
63
|
})]
|
|
63
64
|
});
|
|
64
65
|
};
|
|
65
|
-
|
|
66
|
+
var SplatModel$1 = /*#__PURE__*/memo(SplatModel);
|
|
67
|
+
|
|
68
|
+
export { SplatModel$1 as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
2
|
import { Script } from '@playcanvas/react/components';
|
|
3
3
|
import { Color, Vec3 } from 'playcanvas';
|
|
4
4
|
import { GSplatRevealRain } from 'playcanvas/scripts/esm/gsplat/reveal-rain.mjs';
|
|
5
|
-
import { jsx
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
6
7
|
const SplatRevealRain = ({
|
|
7
8
|
enabled = true,
|
|
8
9
|
center = [0, 0, 0],
|
|
@@ -18,7 +19,7 @@ const SplatRevealRain = ({
|
|
|
18
19
|
hitDuration = 0,
|
|
19
20
|
endRadius = 5
|
|
20
21
|
}) => {
|
|
21
|
-
return /*#__PURE__*/
|
|
22
|
+
return /*#__PURE__*/jsx(Script, {
|
|
22
23
|
script: GSplatRevealRain,
|
|
23
24
|
enabled: enabled,
|
|
24
25
|
center: new Vec3(...center),
|
|
@@ -35,4 +36,5 @@ const SplatRevealRain = ({
|
|
|
35
36
|
endRadius: endRadius
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
|
-
|
|
39
|
+
|
|
40
|
+
export { SplatRevealRain as default };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createElement } from 'react';
|
|
2
2
|
import { renderToStaticMarkup } from 'react-dom/server';
|
|
3
|
-
import {
|
|
4
|
-
import { AnnotationManager
|
|
5
|
-
import Icon from '../Icon/Icon';
|
|
3
|
+
import { Vec3, Texture, FILTER_LINEAR, PIXELFORMAT_RGBA8 } from 'playcanvas';
|
|
4
|
+
import { AnnotationManager } from 'playcanvas/scripts/esm/annotations.mjs';
|
|
5
|
+
import Icon from '../Icon/Icon.js';
|
|
6
|
+
|
|
6
7
|
// Maps each annotation icon type to a @terraware/web-components icon.
|
|
7
8
|
const ANNOTATION_ICONS = {
|
|
8
9
|
text: 'iconComment',
|
|
@@ -20,7 +21,7 @@ const HOTSPOT_HOVER_SCALE = 1.3;
|
|
|
20
21
|
* Extended AnnotationManager that adds max size clamping for annotations
|
|
21
22
|
* and fixes positioning when canvas is not at document origin.
|
|
22
23
|
*/
|
|
23
|
-
|
|
24
|
+
class TfAnnotationManager extends AnnotationManager {
|
|
24
25
|
static scriptName = 'tfAnnotationManager';
|
|
25
26
|
_maxWorldSize = 1.0;
|
|
26
27
|
_scratchScale = new Vec3();
|
|
@@ -415,4 +416,6 @@ export class TfAnnotationManager extends PcAnnotationManager {
|
|
|
415
416
|
levels: [new Uint8Array(data.buffer)]
|
|
416
417
|
});
|
|
417
418
|
}
|
|
418
|
-
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
export { TfAnnotationManager };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Vec3 } from 'playcanvas';
|
|
2
|
-
import { XrNavigation
|
|
3
|
-
import { clampToCircle } from './xr-scene-bounds';
|
|
4
|
-
import { TeleportGestureLatch } from './xr-teleport-gesture';
|
|
2
|
+
import { XrNavigation } from 'playcanvas/scripts/esm/xr/xr-navigation.mjs';
|
|
3
|
+
import { clampToCircle } from './xr-scene-bounds.js';
|
|
4
|
+
import { TeleportGestureLatch } from './xr-teleport-gesture.js';
|
|
5
5
|
|
|
6
6
|
/** The base script's per-source aim state, which it exposes only as underscore-private fields. */
|
|
7
7
|
|
|
@@ -10,7 +10,7 @@ import { TeleportGestureLatch } from './xr-teleport-gesture';
|
|
|
10
10
|
* enableTeleport flag (which the base ignores in tryTeleport) and skips sources whose ray is over
|
|
11
11
|
* interactive UI.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
class TfXrNavigation extends XrNavigation {
|
|
14
14
|
static scriptName = 'tfXrNavigation';
|
|
15
15
|
|
|
16
16
|
/** Assigned by the React wrapper. True when this source's ray is over interactive UI. */
|
|
@@ -121,4 +121,6 @@ export class TfXrNavigation extends PcXrNavigation {
|
|
|
121
121
|
rec.point.x = clamped.x;
|
|
122
122
|
rec.point.z = clamped.z;
|
|
123
123
|
}
|
|
124
|
-
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
export { TfXrNavigation };
|