@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.
Files changed (322) hide show
  1. package/_vendor/react-multi-carousel/index.js +13 -0
  2. package/_vendor/react-multi-carousel/lib/Arrows.js +13 -0
  3. package/_vendor/react-multi-carousel/lib/Carousel.js +19 -0
  4. package/_vendor/react-multi-carousel/lib/CarouselItems.js +14 -0
  5. package/_vendor/react-multi-carousel/lib/Dots.js +16 -0
  6. package/_vendor/react-multi-carousel/lib/index.js +13 -0
  7. package/_vendor/react-multi-carousel/lib/types.js +13 -0
  8. package/_vendor/react-multi-carousel/lib/utils/clones.js +14 -0
  9. package/_vendor/react-multi-carousel/lib/utils/common.js +13 -0
  10. package/_vendor/react-multi-carousel/lib/utils/dots.js +14 -0
  11. package/_vendor/react-multi-carousel/lib/utils/elementWidth.js +12 -0
  12. package/_vendor/react-multi-carousel/lib/utils/index.js +20 -0
  13. package/_vendor/react-multi-carousel/lib/utils/mouseOrTouchMove.js +14 -0
  14. package/_vendor/react-multi-carousel/lib/utils/next.js +13 -0
  15. package/_vendor/react-multi-carousel/lib/utils/previous.js +14 -0
  16. package/_vendor/react-multi-carousel/lib/utils/throttle.js +12 -0
  17. package/_vendor/react-multi-carousel/lib/utils/throwError.js +14 -0
  18. package/_virtual/Arrows.js +3 -0
  19. package/_virtual/Carousel.js +3 -0
  20. package/_virtual/CarouselItems.js +3 -0
  21. package/_virtual/Dots.js +3 -0
  22. package/_virtual/_commonjsHelpers.js +5 -0
  23. package/_virtual/clones.js +3 -0
  24. package/_virtual/common.js +3 -0
  25. package/_virtual/dots2.js +3 -0
  26. package/_virtual/elementWidth.js +3 -0
  27. package/_virtual/index.js +7 -0
  28. package/_virtual/index2.js +3 -0
  29. package/_virtual/index3.js +3 -0
  30. package/_virtual/mouseOrTouchMove.js +3 -0
  31. package/_virtual/next.js +3 -0
  32. package/_virtual/previous.js +3 -0
  33. package/_virtual/throttle.js +3 -0
  34. package/_virtual/throwError.js +3 -0
  35. package/_virtual/types.js +3 -0
  36. package/components/AntSwitch/index.js +6 -4
  37. package/components/Autocomplete/Autocomplete.js +19 -16
  38. package/components/Badge/index.js +8 -6
  39. package/components/BusySpinner/index.js +11 -8
  40. package/components/Button/Button.js +12 -9
  41. package/components/Checkbox.js +11 -8
  42. package/components/Confirm/index.js +14 -17
  43. package/components/DatePicker/DatePicker.js +19 -23
  44. package/components/DialogBox/DialogBox.js +25 -20
  45. package/components/Divisor.js +11 -8
  46. package/components/Dropdown.js +18 -15
  47. package/components/EditableTable/index.js +17 -14
  48. package/components/ErrorBox/ErrorBox.js +18 -15
  49. package/components/FileChooser/index.js +20 -15
  50. package/components/FormBottomBar/index.js +15 -12
  51. package/components/Icon/Icon.js +9 -6
  52. package/components/Icon/icons/index.js +252 -251
  53. package/components/IconTooltip/index.js +14 -9
  54. package/components/Map/MapBox.js +35 -32
  55. package/components/Map/MapContainer.js +10 -6
  56. package/components/Map/MapDateSliderControl.js +14 -12
  57. package/components/Map/MapDrawer.js +16 -12
  58. package/components/Map/MapLegend.js +32 -28
  59. package/components/Map/MapViewStyleControl.js +11 -9
  60. package/components/Map/ReactMapboxWrapper.js +1 -1
  61. package/components/Map/index.js +13 -11
  62. package/components/Map/types.js +5 -3
  63. package/components/Map/useMaintainLayerOrder.js +5 -2
  64. package/components/Markdown/index.js +6 -4
  65. package/components/Message/Message.js +25 -20
  66. package/components/MultiSelect/index.js +26 -23
  67. package/components/Navbar/NavFooter.js +8 -5
  68. package/components/Navbar/NavItem.js +14 -11
  69. package/components/Navbar/NavSection.js +10 -7
  70. package/components/Navbar/Navbar.js +16 -11
  71. package/components/Navbar/SubNavbar.js +8 -5
  72. package/components/Note.js +10 -7
  73. package/components/OverlayModal/OverlayModal.js +13 -11
  74. package/components/PageForm/index.js +15 -12
  75. package/components/PhotoChooser/index.js +30 -25
  76. package/components/PhotosCarousel/index.js +15 -18
  77. package/components/Pill/index.js +14 -11
  78. package/components/PillList/index.js +10 -7
  79. package/components/PlacementWrapper/index.js +8 -6
  80. package/components/PopoverMenu/Popover.js +12 -9
  81. package/components/PopoverMenu/index.js +14 -11
  82. package/components/PopoverMultiSelect/index.js +14 -11
  83. package/components/ProgressCircle/ProgressCircle.js +12 -9
  84. package/components/RadioButton.js +9 -6
  85. package/components/Select/Select.js +9 -6
  86. package/components/Select/SelectT.js +30 -26
  87. package/components/Separator/index.js +7 -5
  88. package/components/Size.js +1 -1
  89. package/components/Slider/index.js +9 -6
  90. package/components/SummaryBox.js +13 -10
  91. package/components/Tabs/index.js +22 -18
  92. package/components/TextTruncated/index.js +13 -20
  93. package/components/Textfield/Textfield.js +34 -28
  94. package/components/Textfield/TruncatedTextArea.js +12 -10
  95. package/components/TimelineSlider/TimelineMarker.js +8 -6
  96. package/components/TimelineSlider/TimelineRail.js +6 -4
  97. package/components/TimelineSlider/index.js +14 -12
  98. package/components/Tooltip/Tooltip.js +12 -7
  99. package/components/ViewPhotosDialog/index.js +14 -11
  100. package/components/VirtualWalkthrough/Annotation.js +10 -8
  101. package/components/VirtualWalkthrough/AnnotationEditPane.js +23 -21
  102. package/components/VirtualWalkthrough/AnnotationPanel.js +16 -14
  103. package/components/VirtualWalkthrough/Application.js +9 -7
  104. package/components/VirtualWalkthrough/AutoRotator.js +5 -3
  105. package/components/VirtualWalkthrough/BlockingSpinner.js +10 -7
  106. package/components/VirtualWalkthrough/BoundaryRing.js +8 -6
  107. package/components/VirtualWalkthrough/BoundaryWall.js +8 -6
  108. package/components/VirtualWalkthrough/CameraInfo.js +15 -13
  109. package/components/VirtualWalkthrough/ControlsInfoPane.js +59 -57
  110. package/components/VirtualWalkthrough/GradientSky.js +8 -6
  111. package/components/VirtualWalkthrough/SplatControls.js +37 -35
  112. package/components/VirtualWalkthrough/SplatCrop.js +6 -4
  113. package/components/VirtualWalkthrough/SplatFadeCrop.js +7 -5
  114. package/components/VirtualWalkthrough/SplatModel.js +17 -14
  115. package/components/VirtualWalkthrough/SplatRevealRain.js +6 -4
  116. package/components/VirtualWalkthrough/TfAnnotationManager.js +8 -5
  117. package/components/VirtualWalkthrough/TfXrNavigation.js +7 -5
  118. package/components/VirtualWalkthrough/VirtualWalkthroughViewer.js +47 -45
  119. package/components/VirtualWalkthrough/VrAnnotationPanel.js +9 -7
  120. package/components/VirtualWalkthrough/XrAnnotationInteraction.js +9 -7
  121. package/components/VirtualWalkthrough/XrExitButton.js +9 -7
  122. package/components/VirtualWalkthrough/XrGazeDwell.js +9 -7
  123. package/components/VirtualWalkthrough/XrPointerRay.js +9 -7
  124. package/components/VirtualWalkthrough/boundary-ring.js +7 -5
  125. package/components/VirtualWalkthrough/boundary-wall.js +8 -6
  126. package/components/VirtualWalkthrough/groundPlane.js +6 -3
  127. package/components/VirtualWalkthrough/gsplat-fade-crop-effect.js +5 -2
  128. package/components/VirtualWalkthrough/splatFormat.js +6 -4
  129. package/components/VirtualWalkthrough/vr-annotation-panel-layout.js +4 -2
  130. package/components/VirtualWalkthrough/vr-annotation-panel.js +8 -5
  131. package/components/VirtualWalkthrough/walkthrough-camera.js +6 -4
  132. package/components/VirtualWalkthrough/xr-annotation-candidates.js +8 -6
  133. package/components/VirtualWalkthrough/xr-annotation-interaction.js +9 -6
  134. package/components/VirtualWalkthrough/xr-annotation-targeting.js +5 -2
  135. package/components/VirtualWalkthrough/xr-button-arming.js +4 -2
  136. package/components/VirtualWalkthrough/xr-button-hold.js +5 -3
  137. package/components/VirtualWalkthrough/xr-exit-button.js +10 -8
  138. package/components/VirtualWalkthrough/xr-face-buttons.js +6 -4
  139. package/components/VirtualWalkthrough/xr-gaze-dwell-state.js +5 -3
  140. package/components/VirtualWalkthrough/xr-gaze-dwell.js +9 -7
  141. package/components/VirtualWalkthrough/xr-interactive-ui.js +10 -8
  142. package/components/VirtualWalkthrough/xr-pointer-ray.js +5 -3
  143. package/components/VirtualWalkthrough/xr-progress-pie.js +4 -2
  144. package/components/VirtualWalkthrough/xr-ray-quad.js +5 -2
  145. package/components/VirtualWalkthrough/xr-scene-bounds.js +5 -3
  146. package/components/VirtualWalkthrough/xr-teleport-gesture.js +4 -2
  147. package/components/svg/BlobbyGrayIconImage.js +13 -11
  148. package/components/svg/BlobbyGrayIconImport.js +13 -11
  149. package/components/svg/BlobbyGrayIconUploadToTheCloud.js +13 -11
  150. package/components/svg/BlobbyIconCloudChecked.js +41 -39
  151. package/components/svg/BlobbyIconExportOrUploadPhoto.js +41 -39
  152. package/components/svg/BlobbyIconFolder.js +41 -39
  153. package/components/svg/BlobbyIconGraphReport.js +41 -39
  154. package/components/svg/BlobbyIconHappy.js +41 -39
  155. package/components/svg/BlobbyIconHeartMonitor.js +41 -39
  156. package/components/svg/BlobbyIconLeaf.js +41 -39
  157. package/components/svg/BlobbyIconLibrary.js +41 -39
  158. package/components/svg/BlobbyIconNursery.js +41 -39
  159. package/components/svg/BlobbyIconOrganization.js +41 -39
  160. package/components/svg/BlobbyIconParchment.js +41 -39
  161. package/components/svg/BlobbyIconPeople.js +41 -39
  162. package/components/svg/BlobbyIconSeedBank.js +41 -39
  163. package/components/svg/BlobbyIconSeedling.js +41 -39
  164. package/components/svg/BlobbyIconSeeds.js +41 -39
  165. package/components/svg/BlobbyIconSite.js +42 -40
  166. package/components/svg/BlobbyIconSparkles.js +41 -39
  167. package/components/svg/BlobbyIconWrench.js +41 -39
  168. package/components/svg/Bug.js +8 -6
  169. package/components/svg/Calendar.js +8 -6
  170. package/components/svg/CaretDown.js +8 -6
  171. package/components/svg/CaretLeft.js +8 -6
  172. package/components/svg/CaretRight.js +8 -6
  173. package/components/svg/CaretUp.js +8 -6
  174. package/components/svg/ChevronDown.js +8 -6
  175. package/components/svg/ChevronUp.js +8 -6
  176. package/components/svg/Close.js +8 -6
  177. package/components/svg/Critical.js +8 -6
  178. package/components/svg/Edit.js +41 -39
  179. package/components/svg/Error.js +8 -6
  180. package/components/svg/Filter.js +8 -6
  181. package/components/svg/Folder.js +8 -6
  182. package/components/svg/Help.js +8 -6
  183. package/components/svg/Home.js +8 -6
  184. package/components/svg/IconAdd.js +8 -6
  185. package/components/svg/IconArrowRight.js +8 -6
  186. package/components/svg/IconBusinessNetwork.js +8 -6
  187. package/components/svg/IconCalendar.js +8 -6
  188. package/components/svg/IconCancel.js +8 -6
  189. package/components/svg/IconChargingBattery.js +8 -6
  190. package/components/svg/IconChecklist.js +8 -6
  191. package/components/svg/IconCheckmark.js +8 -6
  192. package/components/svg/IconCoinInHand.js +8 -6
  193. package/components/svg/IconColumns.js +8 -6
  194. package/components/svg/IconComment.js +8 -6
  195. package/components/svg/IconDashboard.js +8 -6
  196. package/components/svg/IconDataMigration.js +8 -6
  197. package/components/svg/IconDocument.js +8 -6
  198. package/components/svg/IconDownloadFromTheCloud.js +8 -6
  199. package/components/svg/IconEdit.js +8 -6
  200. package/components/svg/IconExpand.js +8 -6
  201. package/components/svg/IconExport.js +8 -6
  202. package/components/svg/IconExternalLink.js +8 -6
  203. package/components/svg/IconEye.js +8 -6
  204. package/components/svg/IconEyeOff.js +8 -6
  205. package/components/svg/IconFile.js +8 -6
  206. package/components/svg/IconFolder.js +8 -6
  207. package/components/svg/IconFullScreen.js +8 -6
  208. package/components/svg/IconFutures.js +8 -6
  209. package/components/svg/IconGraphReport.js +8 -6
  210. package/components/svg/IconHeartMonitor.js +8 -6
  211. package/components/svg/IconHelp.js +8 -6
  212. package/components/svg/IconHistory.js +8 -6
  213. package/components/svg/IconImport.js +8 -6
  214. package/components/svg/IconIndex.js +8 -6
  215. package/components/svg/IconLayers.js +8 -6
  216. package/components/svg/IconLibrary.js +8 -6
  217. package/components/svg/IconList.js +8 -6
  218. package/components/svg/IconLivePlant.js +8 -6
  219. package/components/svg/IconLocations.js +8 -6
  220. package/components/svg/IconMail.js +8 -6
  221. package/components/svg/IconManager.js +8 -6
  222. package/components/svg/IconMarker.js +8 -6
  223. package/components/svg/IconMenu.js +8 -6
  224. package/components/svg/IconMenuHorizontal.js +8 -6
  225. package/components/svg/IconModule.js +8 -6
  226. package/components/svg/IconMyLocation.js +8 -6
  227. package/components/svg/IconNote.js +8 -6
  228. package/components/svg/IconNursery.js +8 -6
  229. package/components/svg/IconOrg.js +8 -6
  230. package/components/svg/IconParchment.js +8 -6
  231. package/components/svg/IconPhoto.js +8 -6
  232. package/components/svg/IconPlantsFilled.js +8 -6
  233. package/components/svg/IconRedo.js +8 -6
  234. package/components/svg/IconRestorationSite.js +8 -6
  235. package/components/svg/IconSeedBank.js +8 -6
  236. package/components/svg/IconSeedling.js +8 -6
  237. package/components/svg/IconSettings.js +8 -6
  238. package/components/svg/IconSlice.js +8 -6
  239. package/components/svg/IconSubmit.js +8 -6
  240. package/components/svg/IconSubtract.js +8 -6
  241. package/components/svg/IconSynced.js +8 -6
  242. package/components/svg/IconTrashCan.js +8 -6
  243. package/components/svg/IconTreasureMap.js +8 -6
  244. package/components/svg/IconUnavailable.js +8 -6
  245. package/components/svg/IconUndo.js +8 -6
  246. package/components/svg/IconVariable.js +8 -6
  247. package/components/svg/IconVideo.js +9 -7
  248. package/components/svg/IconWifi.js +8 -6
  249. package/components/svg/Info.js +8 -6
  250. package/components/svg/Key.js +8 -6
  251. package/components/svg/Leaf.js +8 -6
  252. package/components/svg/Lock.js +8 -6
  253. package/components/svg/Logo.js +16 -14
  254. package/components/svg/MenuVertical.js +8 -6
  255. package/components/svg/Notification.js +8 -6
  256. package/components/svg/Person.js +8 -6
  257. package/components/svg/Plus.js +8 -6
  258. package/components/svg/RestorationSite.js +8 -6
  259. package/components/svg/Search.js +8 -6
  260. package/components/svg/Seeds.js +8 -6
  261. package/components/svg/Site.js +8 -6
  262. package/components/svg/Sparkles.js +8 -6
  263. package/components/svg/Species.js +8 -6
  264. package/components/svg/Species2.js +41 -39
  265. package/components/svg/Spinner.js +16 -14
  266. package/components/svg/Star.js +8 -6
  267. package/components/svg/Success.js +8 -6
  268. package/components/svg/SuccessFilled.js +8 -6
  269. package/components/svg/TerrawareLogoDesktop.js +17 -15
  270. package/components/svg/TerrawareLogoMobile.js +9 -7
  271. package/components/svg/Touchscreen.js +8 -6
  272. package/components/svg/UploadCloud.js +41 -39
  273. package/components/svg/Warning.js +8 -6
  274. package/components/svg/WelcomeClipboard.js +32 -30
  275. package/components/svg/index.js +127 -127
  276. package/components/table/EnhancedTableToolbar.js +18 -15
  277. package/components/table/EnhancedTableToolbarV2.js +8 -6
  278. package/components/table/TableCellRenderer.js +37 -32
  279. package/components/table/TableHeader.js +17 -14
  280. package/components/table/TableHeaderItem.js +18 -15
  281. package/components/table/density.js +5 -3
  282. package/components/table/index.js +40 -37
  283. package/components/table/sort.js +6 -4
  284. package/components/table/types.js +1 -1
  285. package/components/types/index.js +1 -1
  286. package/hooks/useBoolean.js +4 -2
  287. package/hooks/useCameraPosition.js +5 -2
  288. package/hooks/useDevicePerformance.js +6 -3
  289. package/hooks/useXr.js +6 -4
  290. package/index.js +55 -58
  291. package/package.json +6 -2
  292. package/style-dictionary-dist/TerrawareTheme.js +2 -1
  293. package/theme.js +5 -2
  294. package/utils/color.js +5 -2
  295. package/utils/date.js +7 -6
  296. package/utils/index.js +4 -5
  297. package/utils/preventDefaultEvent.js +2 -1
  298. package/utils/text.js +3 -2
  299. package/utils/useDeviceInfo.js +2 -1
  300. package/virtualWalkthrough.js +23 -31
  301. package/components/Button/button.test.js +0 -23
  302. package/components/MultiSelect/MultiSelect.test.js +0 -73
  303. package/components/VirtualWalkthrough/TfXrNavigation.test.js +0 -110
  304. package/components/VirtualWalkthrough/boundary-ring.test.js +0 -109
  305. package/components/VirtualWalkthrough/boundary-wall.test.js +0 -203
  306. package/components/VirtualWalkthrough/groundPlane.test.js +0 -45
  307. package/components/VirtualWalkthrough/splatFormat.test.js +0 -51
  308. package/components/VirtualWalkthrough/vr-annotation-panel-layout.test.js +0 -26
  309. package/components/VirtualWalkthrough/xr-annotation-targeting.test.js +0 -66
  310. package/components/VirtualWalkthrough/xr-button-arming.test.js +0 -35
  311. package/components/VirtualWalkthrough/xr-button-hold.test.js +0 -57
  312. package/components/VirtualWalkthrough/xr-exit-button.test.js +0 -23
  313. package/components/VirtualWalkthrough/xr-face-buttons.test.js +0 -82
  314. package/components/VirtualWalkthrough/xr-gaze-dwell-state.test.js +0 -61
  315. package/components/VirtualWalkthrough/xr-interactive-ui.test.js +0 -165
  316. package/components/VirtualWalkthrough/xr-progress-pie.test.js +0 -79
  317. package/components/VirtualWalkthrough/xr-ray-quad.test.js +0 -37
  318. package/components/VirtualWalkthrough/xr-scene-bounds.test.js +0 -70
  319. package/components/VirtualWalkthrough/xr-teleport-gesture.test.js +0 -90
  320. package/components/table/sort.test.js +0 -35
  321. package/utils/date.test.js +0 -84
  322. package/utils/text.test.js +0 -21
@@ -1,31 +1,32 @@
1
- import React, { useCallback, useEffect, useMemo, useState } from 'react';
1
+ import { useState, useMemo, useEffect, useCallback } from 'react';
2
2
  import { useTheme } from '@mui/material';
3
3
  import { Entity } from '@playcanvas/react';
4
4
  import { Camera, Script } from '@playcanvas/react/components';
5
5
  import { useApp } from '@playcanvas/react/hooks';
6
- import { Color, Vec3 } from 'playcanvas';
6
+ import { Vec3, Color } from 'playcanvas';
7
7
  import { XrControllers } from 'playcanvas/scripts/esm/xr/xr-controllers.mjs';
8
- import { useCameraPosition } from '../../hooks/useCameraPosition';
9
- import { useDevicePerformance } from '../../hooks/useDevicePerformance';
10
- import { useXr } from '../../hooks/useXr';
11
- import Annotation from './Annotation';
12
- import AnnotationPanel from './AnnotationPanel';
13
- import { AutoRotator } from './AutoRotator';
14
- import BoundaryRing from './BoundaryRing';
15
- import BoundaryWall from './BoundaryWall';
16
- import GradientSky from './GradientSky';
17
- import SplatControls from './SplatControls';
18
- import SplatModel from './SplatModel';
19
- import { TfAnnotationManager } from './TfAnnotationManager';
20
- import { TfXrNavigation } from './TfXrNavigation';
21
- import VrAnnotationPanel from './VrAnnotationPanel';
22
- import XrAnnotationInteraction from './XrAnnotationInteraction';
23
- import XrExitButton from './XrExitButton';
24
- import XrGazeDwell from './XrGazeDwell';
25
- import XrPointerRay from './XrPointerRay';
26
- import { WalkthroughCamera } from './walkthrough-camera';
27
- import { rayHitsInteractiveUi } from './xr-interactive-ui';
28
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
8
+ import { useCameraPosition } from '../../hooks/useCameraPosition.js';
9
+ import { useDevicePerformance } from '../../hooks/useDevicePerformance.js';
10
+ import useXr from '../../hooks/useXr.js';
11
+ import Annotation from './Annotation.js';
12
+ import AnnotationPanel from './AnnotationPanel.js';
13
+ import { AutoRotator } from './AutoRotator.js';
14
+ import BoundaryRing from './BoundaryRing.js';
15
+ import BoundaryWall from './BoundaryWall.js';
16
+ import GradientSky from './GradientSky.js';
17
+ import SplatControls from './SplatControls.js';
18
+ import SplatModel from './SplatModel.js';
19
+ import { TfAnnotationManager } from './TfAnnotationManager.js';
20
+ import { TfXrNavigation } from './TfXrNavigation.js';
21
+ import VrAnnotationPanel from './VrAnnotationPanel.js';
22
+ import XrAnnotationInteraction from './XrAnnotationInteraction.js';
23
+ import XrExitButton from './XrExitButton.js';
24
+ import XrGazeDwell from './XrGazeDwell.js';
25
+ import XrPointerRay from './XrPointerRay.js';
26
+ import { WalkthroughCamera } from './walkthrough-camera.js';
27
+ import { rayHitsInteractiveUi } from './xr-interactive-ui.js';
28
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
29
+
29
30
  const DEFAULT_FOCUS_POINT = [0, 0.1, 0];
30
31
  const DEFAULT_POSITION = [1, 0.1, 0];
31
32
 
@@ -227,25 +228,25 @@ const VirtualWalkthroughViewer = ({
227
228
  images: files
228
229
  }), [handleAnnotationUpdate]);
229
230
  const canSave = useMemo(() => localAnnotations.every(annotation => annotation.title && annotation.title.trim() !== ''), [localAnnotations]);
230
- const splatModel = useMemo(() => /*#__PURE__*/_jsx(SplatModel, {
231
+ const splatModel = useMemo(() => /*#__PURE__*/jsx(SplatModel, {
231
232
  splatSrc: splatSrc,
232
233
  splatFormat: splatFormat,
233
234
  rotation: [-180, 0, 0],
234
235
  revealRain: isHighPerformance
235
236
  }, 'splat'), [isHighPerformance, splatSrc, splatFormat]);
236
- return /*#__PURE__*/_jsxs(_Fragment, {
237
- children: [/*#__PURE__*/_jsx(GradientSky, {
237
+ return /*#__PURE__*/jsxs(Fragment, {
238
+ children: [/*#__PURE__*/jsx(GradientSky, {
238
239
  topColor: skyColor || '#FFFFFF',
239
240
  horizonColor: skyColor || '#EAF8FF',
240
241
  groundColor: groundColor || '#C3BDB7'
241
- }), /*#__PURE__*/_jsxs(Entity, {
242
+ }), /*#__PURE__*/jsxs(Entity, {
242
243
  name: "camera-root",
243
- children: [/*#__PURE__*/_jsxs(Entity, {
244
+ children: [/*#__PURE__*/jsxs(Entity, {
244
245
  name: "camera",
245
- children: [/*#__PURE__*/_jsx(Camera, {
246
+ children: [/*#__PURE__*/jsx(Camera, {
246
247
  clearColor: "#EAF8FF",
247
248
  fov: 60
248
- }), !isCurrentlyInXr && /*#__PURE__*/_jsx(Script, {
249
+ }), !isCurrentlyInXr && /*#__PURE__*/jsx(Script, {
249
250
  script: WalkthroughCamera,
250
251
  boundsCenter: cameraBoundsCenter,
251
252
  boundsRadius: sceneBoundsRadius * scaleFactor,
@@ -255,39 +256,39 @@ const VirtualWalkthroughViewer = ({
255
256
  moveFastSpeed: 0.5 * scaleFactor,
256
257
  moveSlowSpeed: 0.15 * scaleFactor
257
258
  })]
258
- }), /*#__PURE__*/_jsx(XrExitButton, {}), /*#__PURE__*/_jsx(Script, {
259
+ }), /*#__PURE__*/jsx(XrExitButton, {}), /*#__PURE__*/jsx(Script, {
259
260
  script: XrControllers,
260
261
  enabled: !isEdit
261
- }), /*#__PURE__*/_jsx(XrAnnotationInteraction, {
262
+ }), /*#__PURE__*/jsx(XrAnnotationInteraction, {
262
263
  onDismiss: handleCloseAnnotation
263
- }), /*#__PURE__*/_jsx(XrPointerRay, {}), isCurrentlyInVr && viewingAnnotation && /*#__PURE__*/_jsx(VrAnnotationPanel, {
264
+ }), /*#__PURE__*/jsx(XrPointerRay, {}), isCurrentlyInVr && viewingAnnotation && /*#__PURE__*/jsx(VrAnnotationPanel, {
264
265
  annotation: viewingAnnotation,
265
266
  annotationIndex: viewingAnnotationIndex,
266
267
  scaleFactor: scaleFactor
267
- }, viewingAnnotationIndex), isCurrentlyInXr && /*#__PURE__*/_jsx(XrGazeDwell, {
268
+ }, viewingAnnotationIndex), isCurrentlyInXr && /*#__PURE__*/jsx(XrGazeDwell, {
268
269
  activeIndex: viewingAnnotationIndex
269
- }), /*#__PURE__*/_jsx(Script, {
270
+ }), /*#__PURE__*/jsx(Script, {
270
271
  script: TfXrNavigation,
271
272
  enabled: !isEdit,
272
273
  enableTeleport: !isCurrentlyInAr && !viewingAnnotation,
273
274
  isTeleportBlocked: isTeleportBlocked
274
- }), !isCurrentlyInXr && /*#__PURE__*/_jsx(Script, {
275
+ }), !isCurrentlyInXr && /*#__PURE__*/jsx(Script, {
275
276
  script: AutoRotator,
276
277
  enabled: !isEdit && autoRotate && !viewingAnnotation,
277
278
  startDelay: 0.5,
278
279
  restartDelay: 3,
279
280
  startFadeInTime: 0.5
280
281
  })]
281
- }), /*#__PURE__*/_jsxs(Entity, {
282
+ }), /*#__PURE__*/jsxs(Entity, {
282
283
  name: "content-root",
283
284
  scale: [scaleFactor, scaleFactor, scaleFactor],
284
- children: [splatModel, sceneBounds?.m !== undefined && groundPlane.length === 3 && /*#__PURE__*/_jsx(BoundaryRing, {
285
+ children: [splatModel, sceneBounds?.m !== undefined && groundPlane.length === 3 && /*#__PURE__*/jsx(BoundaryRing, {
285
286
  center: sceneBoundsCenter,
286
287
  radius: sceneBoundsRadius,
287
288
  groundPlane: groundPlane
288
- }), localAnnotations.length > 0 && /*#__PURE__*/_jsxs(Entity, {
289
+ }), localAnnotations.length > 0 && /*#__PURE__*/jsxs(Entity, {
289
290
  name: "annotations-root",
290
- children: [/*#__PURE__*/_jsx(Script, {
291
+ children: [/*#__PURE__*/jsx(Script, {
291
292
  script: TfAnnotationManager,
292
293
  enabled: true,
293
294
  hotspotSize: 30,
@@ -296,7 +297,7 @@ const VirtualWalkthroughViewer = ({
296
297
  hotspotColor: new Color().fromString(theme.palette.TwClrIcnBrand),
297
298
  hoverColor: new Color().fromString('#ffffff'),
298
299
  hotspotBackgroundColor: theme.palette.TwClrBaseWhite
299
- }), localAnnotations.map((annotation, index) => /*#__PURE__*/_jsx(Annotation, {
300
+ }), localAnnotations.map((annotation, index) => /*#__PURE__*/jsx(Annotation, {
300
301
  ...annotation,
301
302
  index: index,
302
303
  visible: showAnnotations,
@@ -309,12 +310,12 @@ const VirtualWalkthroughViewer = ({
309
310
  onScreenPositionUpdate: handleAnnotationScreenPositionUpdate
310
311
  }, `annotation-${index}`))]
311
312
  })]
312
- }), isCurrentlyInXr && sceneBoundsRadius > 0 && /*#__PURE__*/_jsx(BoundaryWall, {
313
+ }), isCurrentlyInXr && sceneBoundsRadius > 0 && /*#__PURE__*/jsx(BoundaryWall, {
313
314
  center: cameraBoundsCenter,
314
315
  radius: sceneBoundsRadius * scaleFactor + WALL_INSET,
315
316
  groundPlane: cameraGroundPlane,
316
317
  baseY: 0
317
- }), /*#__PURE__*/_jsx(SplatControls, {
318
+ }), /*#__PURE__*/jsx(SplatControls, {
318
319
  defaultCameraFocus: origin,
319
320
  defaultCameraPosition: cameraPosition,
320
321
  showAnnotations: showAnnotations,
@@ -343,11 +344,12 @@ const VirtualWalkthroughViewer = ({
343
344
  onToggleFreeFly: handleToggleFreeFly,
344
345
  showFreeFly: showFreeFly,
345
346
  strings: strings
346
- }), /*#__PURE__*/_jsx(AnnotationPanel, {
347
+ }), /*#__PURE__*/jsx(AnnotationPanel, {
347
348
  annotation: viewingAnnotation,
348
349
  hotspotPosition: viewedScreenPos,
349
350
  onClose: handleCloseAnnotation
350
351
  })]
351
352
  });
352
353
  };
353
- export default VirtualWalkthroughViewer;
354
+
355
+ export { VirtualWalkthroughViewer as default };
@@ -1,16 +1,17 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { Entity } from '@playcanvas/react';
3
3
  import { Script } from '@playcanvas/react/components';
4
- import { VrAnnotationPanel as VrAnnotationPanelScript } from './vr-annotation-panel';
5
- import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { VrAnnotationPanel as VrAnnotationPanel$1 } from './vr-annotation-panel.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
6
7
  const VrAnnotationPanel = ({
7
8
  annotation,
8
9
  annotationIndex,
9
10
  scaleFactor
10
- }) => /*#__PURE__*/_jsx(Entity, {
11
+ }) => /*#__PURE__*/jsx(Entity, {
11
12
  name: "vr-annotation-panel",
12
- children: /*#__PURE__*/_jsx(Script, {
13
- script: VrAnnotationPanelScript,
13
+ children: /*#__PURE__*/jsx(Script, {
14
+ script: VrAnnotationPanel$1,
14
15
  title: annotation.title,
15
16
  label: annotation.label,
16
17
  bodyText: annotation.bodyText,
@@ -19,4 +20,5 @@ const VrAnnotationPanel = ({
19
20
  scaleFactor: scaleFactor
20
21
  })
21
22
  });
22
- export default VrAnnotationPanel;
23
+
24
+ export { VrAnnotationPanel as default };
@@ -1,15 +1,17 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { Entity } from '@playcanvas/react';
3
3
  import { Script } from '@playcanvas/react/components';
4
- import { XrAnnotationInteraction as XrAnnotationInteractionScript } from './xr-annotation-interaction';
5
- import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { XrAnnotationInteraction as XrAnnotationInteraction$1 } from './xr-annotation-interaction.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
6
7
  const XrAnnotationInteraction = ({
7
8
  onDismiss
8
- }) => /*#__PURE__*/_jsx(Entity, {
9
+ }) => /*#__PURE__*/jsx(Entity, {
9
10
  name: "xr-annotation-interaction",
10
- children: /*#__PURE__*/_jsx(Script, {
11
- script: XrAnnotationInteractionScript,
11
+ children: /*#__PURE__*/jsx(Script, {
12
+ script: XrAnnotationInteraction$1,
12
13
  onDismissCallback: onDismiss
13
14
  })
14
15
  });
15
- export default XrAnnotationInteraction;
16
+
17
+ export { XrAnnotationInteraction as default };
@@ -1,12 +1,14 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { Entity } from '@playcanvas/react';
3
3
  import { Script } from '@playcanvas/react/components';
4
- import { XrExitButton as XrExitButtonScript } from './xr-exit-button';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- const XrExitButton = () => /*#__PURE__*/_jsx(Entity, {
4
+ import { XrExitButton as XrExitButton$1 } from './xr-exit-button.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
7
+ const XrExitButton = () => /*#__PURE__*/jsx(Entity, {
7
8
  name: "xr-exit-button",
8
- children: /*#__PURE__*/_jsx(Script, {
9
- script: XrExitButtonScript
9
+ children: /*#__PURE__*/jsx(Script, {
10
+ script: XrExitButton$1
10
11
  })
11
12
  });
12
- export default XrExitButton;
13
+
14
+ export { XrExitButton as default };
@@ -1,15 +1,17 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { Entity } from '@playcanvas/react';
3
3
  import { Script } from '@playcanvas/react/components';
4
- import { XrGazeDwell as XrGazeDwellScript } from './xr-gaze-dwell';
5
- import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { XrGazeDwell as XrGazeDwell$1 } from './xr-gaze-dwell.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
6
7
  const XrGazeDwell = ({
7
8
  activeIndex
8
- }) => /*#__PURE__*/_jsx(Entity, {
9
+ }) => /*#__PURE__*/jsx(Entity, {
9
10
  name: "xr-gaze-dwell",
10
- children: /*#__PURE__*/_jsx(Script, {
11
- script: XrGazeDwellScript,
11
+ children: /*#__PURE__*/jsx(Script, {
12
+ script: XrGazeDwell$1,
12
13
  activeIndex: activeIndex
13
14
  })
14
15
  });
15
- export default XrGazeDwell;
16
+
17
+ export { XrGazeDwell as default };
@@ -1,15 +1,17 @@
1
- import React from 'react';
1
+ import 'react';
2
2
  import { Entity } from '@playcanvas/react';
3
3
  import { Script } from '@playcanvas/react/components';
4
- import { DEFAULT_RAY_COLOR, XrPointerRay as XrPointerRayScript } from './xr-pointer-ray';
5
- import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { DEFAULT_RAY_COLOR, XrPointerRay as XrPointerRay$1 } from './xr-pointer-ray.js';
5
+ import { jsx } from 'react/jsx-runtime';
6
+
6
7
  const XrPointerRay = ({
7
8
  color = DEFAULT_RAY_COLOR
8
- }) => /*#__PURE__*/_jsx(Entity, {
9
+ }) => /*#__PURE__*/jsx(Entity, {
9
10
  name: "xr-pointer-ray",
10
- children: /*#__PURE__*/_jsx(Script, {
11
- script: XrPointerRayScript,
11
+ children: /*#__PURE__*/jsx(Script, {
12
+ script: XrPointerRay$1,
12
13
  color: color
13
14
  })
14
15
  });
15
- export default XrPointerRay;
16
+
17
+ export { XrPointerRay as default };
@@ -1,5 +1,5 @@
1
- import { CULLFACE_NONE, Color, LAYERID_IMMEDIATE, Mesh, MeshInstance, Script, StandardMaterial, Vec3 } from 'playcanvas';
2
- import { computeGroundPlane, yOnPlane } from './groundPlane';
1
+ import { Script, Vec3, Color, StandardMaterial, CULLFACE_NONE, Mesh, MeshInstance, LAYERID_IMMEDIATE } from 'playcanvas';
2
+ import { computeGroundPlane, yOnPlane } from './groundPlane.js';
3
3
 
4
4
  /** Flat-array triangle geometry ready for `Mesh.setPositions` / `Mesh.setIndices`. */
5
5
 
@@ -9,7 +9,7 @@ import { computeGroundPlane, yOnPlane } from './groundPlane';
9
9
  * every vertex is sampled on the circle in XZ and lifted onto the plane via `yOnPlane`.
10
10
  * Returns empty arrays when radius, width, or dashCount is non-positive, or the plane is invalid.
11
11
  */
12
- export const boundaryRingMesh = ({
12
+ const boundaryRingMesh = ({
13
13
  center,
14
14
  radius,
15
15
  groundPlane,
@@ -59,7 +59,7 @@ export const boundaryRingMesh = ({
59
59
  * center / radius / groundPlane are set imperatively by the BoundaryRing component (see BoundaryRing.tsx for why
60
60
  * they are not reactive Script props), which calls `rebuild()` after updating them.
61
61
  */
62
- export class BoundaryRingScript extends Script {
62
+ class BoundaryRingScript extends Script {
63
63
  static scriptName = 'boundaryRing';
64
64
  center = new Vec3();
65
65
  radius = 0;
@@ -122,4 +122,6 @@ export class BoundaryRingScript extends Script {
122
122
  this._material?.destroy();
123
123
  this._material = undefined;
124
124
  }
125
- }
125
+ }
126
+
127
+ export { BoundaryRingScript, boundaryRingMesh };
@@ -1,6 +1,6 @@
1
- import { BLEND_NORMAL, CULLFACE_NONE, Color, LAYERID_IMMEDIATE, Mesh, MeshInstance, SEMANTIC_POSITION, SEMANTIC_TEXCOORD0, Script, ShaderMaterial, Vec3 } from 'playcanvas';
2
- import { computeGroundPlane, yOnPlane } from './groundPlane';
3
- import { distanceToCircleEdge } from './xr-scene-bounds';
1
+ import { Script, Vec3, Color, ShaderMaterial, SEMANTIC_TEXCOORD0, SEMANTIC_POSITION, BLEND_NORMAL, CULLFACE_NONE, Mesh, MeshInstance, LAYERID_IMMEDIATE } from 'playcanvas';
2
+ import { computeGroundPlane, yOnPlane } from './groundPlane.js';
3
+ import { distanceToCircleEdge } from './xr-scene-bounds.js';
4
4
 
5
5
  /**
6
6
  * Flat-array geometry ready for `Mesh.setPositions` / `Mesh.setUvs` / `Mesh.setIndices`, plus the
@@ -18,7 +18,7 @@ import { distanceToCircleEdge } from './xr-scene-bounds';
18
18
  * circumference and v runs 0..rows up the wall — so the shader can draw a line at every whole number
19
19
  * and have the seam at u = columns line up perfectly with u = 0.
20
20
  */
21
- export const boundaryWallMesh = ({
21
+ const boundaryWallMesh = ({
22
22
  center,
23
23
  radius,
24
24
  groundPlane,
@@ -182,7 +182,7 @@ const wallFragmentGLSL = /* glsl */`
182
182
  * All of them are world-space: this entity is deliberately mounted outside `content-root`, which
183
183
  * carries the scene's scaleFactor.
184
184
  */
185
- export class BoundaryWallScript extends Script {
185
+ class BoundaryWallScript extends Script {
186
186
  static scriptName = 'boundaryWall';
187
187
  center = new Vec3();
188
188
  radius = 0;
@@ -328,4 +328,6 @@ export class BoundaryWallScript extends Script {
328
328
  this._mesh = undefined;
329
329
  }
330
330
  }
331
- }
331
+ }
332
+
333
+ export { BoundaryWallScript, boundaryWallMesh };
@@ -1,6 +1,7 @@
1
1
  import { Vec3 } from 'playcanvas';
2
+
2
3
  /** Compute Y on the plane defined by `normal` passing through `point` at world XZ coords (x, z). */
3
- export const yOnPlane = (x, z, normal, point, fallback) => {
4
+ const yOnPlane = (x, z, normal, point, fallback) => {
4
5
  if (Math.abs(normal.y) < 1e-6) {
5
6
  return fallback;
6
7
  }
@@ -12,7 +13,7 @@ export const yOnPlane = (x, z, normal, point, fallback) => {
12
13
  * Returns a normalized normal (flipped so normal.y >= 0) and a point on the plane,
13
14
  * or null when fewer than 3 points are supplied or they are degenerate/collinear.
14
15
  */
15
- export const computeGroundPlane = points => {
16
+ const computeGroundPlane = points => {
16
17
  if (points.length < 3) {
17
18
  return null;
18
19
  }
@@ -44,4 +45,6 @@ export const computeGroundPlane = points => {
44
45
  normal: new Vec3(nx, ny, nz),
45
46
  point: new Vec3(p0.x, p0.y, p0.z)
46
47
  };
47
- };
48
+ };
49
+
50
+ export { computeGroundPlane, yOnPlane };
@@ -1,5 +1,6 @@
1
1
  import { Vec3 } from 'playcanvas';
2
2
  import { GSplatShaderEffect } from 'playcanvas/scripts/esm/gsplat/gsplat-shader-effect.mjs';
3
+
3
4
  const shaderGLSL = /* glsl */`
4
5
  uniform vec3 uAabbMin;
5
6
  uniform vec3 uAabbMax;
@@ -92,7 +93,7 @@ fn modifySplatColor(center: vec3f, color: ptr<function, vec4f>) {
92
93
  * Applies a smooth fade to splats outside the AABB based on distance.
93
94
  * Splats at the AABB edge are fully visible, and fade to invisible at fadeDistance away.
94
95
  */
95
- export class GsplatFadeCropShaderEffect extends GSplatShaderEffect {
96
+ class GsplatFadeCropShaderEffect extends GSplatShaderEffect {
96
97
  static scriptName = 'gsplatFadeCropShaderEffect';
97
98
  _aabbMinArray = [0, 0, 0];
98
99
  _aabbMaxArray = [0, 0, 0];
@@ -116,4 +117,6 @@ export class GsplatFadeCropShaderEffect extends GSplatShaderEffect {
116
117
  this.setUniform('uAabbMax', this._aabbMaxArray);
117
118
  this.setUniform('uFadeDistance', this.fadeDistance);
118
119
  }
119
- }
120
+ }
121
+
122
+ export { GsplatFadeCropShaderEffect };
@@ -29,9 +29,9 @@ const LOADER_FILENAMES = {
29
29
  * that existing extensionless splat URLs keep loading the way they did before the other formats were
30
30
  * supported.
31
31
  */
32
- export const DEFAULT_SPLAT_FORMAT = 'sog';
33
- export const splatLoaderFilename = format => LOADER_FILENAMES[format];
34
- export const detectSplatFormat = splatSrc => {
32
+ const DEFAULT_SPLAT_FORMAT = 'sog';
33
+ const splatLoaderFilename = format => LOADER_FILENAMES[format];
34
+ const detectSplatFormat = splatSrc => {
35
35
  const path = splatSrc.split(/[?#]/)[0];
36
36
  const basename = path.slice(path.lastIndexOf('/') + 1).toLowerCase();
37
37
  if (basename === 'lod-meta.json') {
@@ -47,4 +47,6 @@ export const detectSplatFormat = splatSrc => {
47
47
  return 'sog';
48
48
  }
49
49
  return DEFAULT_SPLAT_FORMAT;
50
- };
50
+ };
51
+
52
+ export { DEFAULT_SPLAT_FORMAT, detectSplatFormat, splatLoaderFilename };
@@ -2,7 +2,7 @@
2
2
  * Greedily wraps `text` into lines no wider than `maxWidth`, using `measure` to size
3
3
  * each candidate line. A single word wider than `maxWidth` still gets its own line.
4
4
  */
5
- export const wrapText = (text, maxWidth, measure) => {
5
+ const wrapText = (text, maxWidth, measure) => {
6
6
  const words = text.split(/\s+/).filter(Boolean);
7
7
  const lines = [];
8
8
  let current = '';
@@ -19,4 +19,6 @@ export const wrapText = (text, maxWidth, measure) => {
19
19
  lines.push(current);
20
20
  }
21
21
  return lines;
22
- };
22
+ };
23
+
24
+ export { wrapText };
@@ -1,6 +1,7 @@
1
- import { ADDRESS_CLAMP_TO_EDGE, BLEND_NORMAL, CULLFACE_NONE, Color, FILTER_LINEAR, LAYERID_IMMEDIATE, Mesh, MeshInstance, Quat, Script, StandardMaterial, Texture, Vec3 } from 'playcanvas';
2
- import { wrapText } from './vr-annotation-panel-layout';
3
- import { rayQuadHit } from './xr-ray-quad';
1
+ import { Vec3, Script, Quat, Texture, FILTER_LINEAR, ADDRESS_CLAMP_TO_EDGE, StandardMaterial, Color, BLEND_NORMAL, CULLFACE_NONE, MeshInstance, LAYERID_IMMEDIATE, Mesh } from 'playcanvas';
2
+ import { wrapText } from './vr-annotation-panel-layout.js';
3
+ import { rayQuadHit } from './xr-ray-quad.js';
4
+
4
5
  const CANVAS_WIDTH = 1024;
5
6
  const CANVAS_HEIGHT = 768;
6
7
 
@@ -26,7 +27,7 @@ const IMAGE_H = 360;
26
27
 
27
28
  /** Width (canvas px) of the left/right arrow hit + draw zones over the image band. */
28
29
  const ARROW_ZONE_W = 170;
29
- export class VrAnnotationPanel extends Script {
30
+ class VrAnnotationPanel extends Script {
30
31
  static scriptName = 'vrAnnotationPanel';
31
32
 
32
33
  // Props assigned by the React wrapper.
@@ -309,4 +310,6 @@ export class VrAnnotationPanel extends Script {
309
310
  this._material = undefined;
310
311
  this._texture = undefined;
311
312
  }
312
- }
313
+ }
314
+
315
+ export { VrAnnotationPanel };
@@ -1,5 +1,5 @@
1
- import { Quat, Script, Vec3, math } from 'playcanvas';
2
- import { computeGroundPlane, yOnPlane } from './groundPlane';
1
+ import { Quat, Vec3, Script, math } from 'playcanvas';
2
+ import { computeGroundPlane, yOnPlane } from './groundPlane.js';
3
3
 
4
4
  /**
5
5
  * First-person walkthrough camera for Gaussian Splat scenes.
@@ -26,7 +26,7 @@ const ANGLE_EPSILON = 1e-3;
26
26
 
27
27
  /** Below this positional delta (world units) an idle frame skips the transform write. */
28
28
  const POSITION_EPSILON = 1e-5;
29
- export class WalkthroughCamera extends Script {
29
+ class WalkthroughCamera extends Script {
30
30
  static scriptName = 'walkthroughCamera';
31
31
 
32
32
  /** @attribute */
@@ -317,4 +317,6 @@ export class WalkthroughCamera extends Script {
317
317
  this._removeListeners.forEach(fn => fn());
318
318
  this._removeListeners = [];
319
319
  }
320
- }
320
+ }
321
+
322
+ export { WalkthroughCamera };
@@ -1,11 +1,11 @@
1
1
  import { Vec3 } from 'playcanvas';
2
- import { Annotation as PcAnnotation } from 'playcanvas/scripts/esm/annotations.mjs';
2
+ import { Annotation } from 'playcanvas/scripts/esm/annotations.mjs';
3
3
 
4
4
  /** Local half-extent of the unit-plane hotspot quad. */
5
- export const HOTSPOT_HALF_EXTENT = 0.5;
5
+ const HOTSPOT_HALF_EXTENT = 0.5;
6
6
 
7
7
  /** Multiplier on the hotspot's world radius to make controller targeting forgiving. */
8
- export const HIT_RADIUS_PAD = 2.5;
8
+ const HIT_RADIUS_PAD = 2.5;
9
9
  const scratchScale = new Vec3();
10
10
 
11
11
  /**
@@ -13,14 +13,14 @@ const scratchScale = new Vec3();
13
13
  * annotation script (which carries `onVrOpenCallback`), its world position, and a hit-sphere
14
14
  * radius derived from the hotspot's rendered world size, padded by `radiusPad` for easier aiming.
15
15
  */
16
- export const collectAnnotationHitCandidates = (app, radiusPad) => {
16
+ const collectAnnotationHitCandidates = (app, radiusPad) => {
17
17
  const root = app.root.findByName('annotations-root');
18
18
  if (!root) {
19
19
  return [];
20
20
  }
21
21
  return root.children.map(entity => ({
22
22
  entity,
23
- script: entity.script?.get(PcAnnotation.scriptName)
23
+ script: entity.script?.get(Annotation.scriptName)
24
24
  })).filter(({
25
25
  script
26
26
  }) => script && script.enabled !== false && typeof script.onVrOpenCallback === 'function').map(({
@@ -35,4 +35,6 @@ export const collectAnnotationHitCandidates = (app, radiusPad) => {
35
35
  radius: HOTSPOT_HALF_EXTENT * scratchScale.x * radiusPad
36
36
  };
37
37
  });
38
- };
38
+ };
39
+
40
+ export { HIT_RADIUS_PAD, HOTSPOT_HALF_EXTENT, collectAnnotationHitCandidates };
@@ -1,9 +1,10 @@
1
1
  import { Script, XRTYPE_VR } from 'playcanvas';
2
- import { HIT_RADIUS_PAD, collectAnnotationHitCandidates } from './xr-annotation-candidates';
3
- import { nearestAnnotationHit } from './xr-annotation-targeting';
4
- import { FaceButtonPressTracker } from './xr-face-buttons';
5
- import { rayHitsAnnotationPanel } from './xr-interactive-ui';
6
- export class XrAnnotationInteraction extends Script {
2
+ import { collectAnnotationHitCandidates, HIT_RADIUS_PAD } from './xr-annotation-candidates.js';
3
+ import { nearestAnnotationHit } from './xr-annotation-targeting.js';
4
+ import { FaceButtonPressTracker } from './xr-face-buttons.js';
5
+ import { rayHitsAnnotationPanel } from './xr-interactive-ui.js';
6
+
7
+ class XrAnnotationInteraction extends Script {
7
8
  static scriptName = 'xrAnnotationInteraction';
8
9
  _faceButtons = new FaceButtonPressTracker();
9
10
  _isVrActive = () => this.app.xr?.active === true && this.app.xr?.type === XRTYPE_VR;
@@ -56,4 +57,6 @@ export class XrAnnotationInteraction extends Script {
56
57
  }
57
58
  }
58
59
  }
59
- }
60
+ }
61
+
62
+ export { XrAnnotationInteraction };
@@ -1,4 +1,5 @@
1
1
  import { Vec3 } from 'playcanvas';
2
+
2
3
  /**
3
4
  * Distance along a (normalized) ray to where it first enters the sphere, or null if it never does.
4
5
  * A ray starting inside the sphere returns 0.
@@ -21,7 +22,7 @@ const raySphereEntryDistance = (origin, dir, center, radius) => {
21
22
  /**
22
23
  * Index of the closest candidate sphere the ray enters, or null if it hits none.
23
24
  */
24
- export const nearestAnnotationHit = (origin, direction, candidates) => {
25
+ const nearestAnnotationHit = (origin, direction, candidates) => {
25
26
  const dir = direction.clone().normalize();
26
27
  let bestIndex = null;
27
28
  let bestDistance = Infinity;
@@ -33,4 +34,6 @@ export const nearestAnnotationHit = (origin, direction, candidates) => {
33
34
  }
34
35
  });
35
36
  return bestIndex;
36
- };
37
+ };
38
+
39
+ export { nearestAnnotationHit };
@@ -5,7 +5,7 @@
5
5
  * another from arming and counting. Callers must poll every frame for every source they care
6
6
  * about; a press and release between polls is missed.
7
7
  */
8
- export class ButtonArmingLatch {
8
+ class ButtonArmingLatch {
9
9
  _armed = new WeakSet();
10
10
 
11
11
  /** Records one frame for `inputSource` and returns whether its current press may count. */
@@ -16,4 +16,6 @@ export class ButtonArmingLatch {
16
16
  }
17
17
  return this._armed.has(inputSource);
18
18
  }
19
- }
19
+ }
20
+
21
+ export { ButtonArmingLatch };
@@ -1,4 +1,4 @@
1
- export const INITIAL_HOLD_STATE = {
1
+ const INITIAL_HOLD_STATE = {
2
2
  elapsed: 0,
3
3
  armed: false
4
4
  };
@@ -15,7 +15,7 @@ const RELEASED_STATE = {
15
15
  * button would fire `threshold` seconds later. `justFired` is true only on the frame elapsed first
16
16
  * reaches `threshold`, so continuing to hold fires once.
17
17
  */
18
- export const advanceHold = (prev, held, dt, threshold) => {
18
+ const advanceHold = (prev, held, dt, threshold) => {
19
19
  if (!held) {
20
20
  return {
21
21
  state: RELEASED_STATE,
@@ -40,4 +40,6 @@ export const advanceHold = (prev, held, dt, threshold) => {
40
40
  progress: elapsed / threshold,
41
41
  justFired
42
42
  };
43
- };
43
+ };
44
+
45
+ export { INITIAL_HOLD_STATE, advanceHold };