vitessce 4.0.0-test.2 → 4.0.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 (34) hide show
  1. package/README.temp.md +2 -288
  2. package/dist/{GeometryAndMeshXR-H3DlWLG2.js → GeometryAndMeshXR-BtBduWk5.js} +39 -38
  3. package/dist/{ReactNeuroglancer-ynqeNj44.js → ReactNeuroglancer-DiJujlVY.js} +1 -1
  4. package/dist/{XREnterButton-C-Xc92kB.js → XREnterButton-CqJBXry_.js} +1 -1
  5. package/dist/{XRSceneComponents-DknWP-KF.js → XRSceneComponents-BI1xgf_W.js} +4 -4
  6. package/dist/XRWrapper-C5Rd9HYZ.js +9 -0
  7. package/dist/{deflate-DePou18j.js → deflate-DziHiA1-.js} +1 -1
  8. package/dist/{higlass-CvGYDZZb.js → higlass-BmiBlo41.js} +1 -1
  9. package/dist/{index-DNangxT1.js → index-9C30IDNz.js} +108925 -132218
  10. package/dist/{index-H9tZsNft.js → index-BRhnGRhn.js} +160 -157
  11. package/dist/index-CfB8ifq3.js +999 -0
  12. package/dist/index.min.js +29 -28
  13. package/dist/{jpeg-BkQmyCqH.js → jpeg-CQjAw5qU.js} +1 -1
  14. package/dist/{lerc-Df9qlqYn.js → lerc-BbCMSMzF.js} +1 -1
  15. package/dist/{lzw-QF6gugJz.js → lzw-BpmDYGKe.js} +1 -1
  16. package/dist/{packbits-BITrgxsQ.js → packbits-FwD2-oii.js} +1 -1
  17. package/dist/{raw-0egotUxH.js → raw-C74xet4N.js} +1 -1
  18. package/dist/{webimage-CqycQKfh.js → webimage-cnZJva-2.js} +1 -1
  19. package/dist/xrStore-BtX9iGzw.js +8 -0
  20. package/dist-tsc/index.js +1 -0
  21. package/dist-tsc/index.js.map +1 -0
  22. package/package.json +27 -9
  23. package/dist/OrbitControls-ZAZ0euXg.js +0 -7700
  24. package/dist/XRWrapper-65DDKoxT.js +0 -10
  25. package/dist/emulate-C56XIxiZ.js +0 -28295
  26. package/dist/index-BJz-iWAr.js +0 -7737
  27. package/dist/index-BP1_qbI-.js +0 -57
  28. package/dist/living_room-uy_CEYZC.js +0 -11
  29. package/dist/meeting_room-BjXC3fLc.js +0 -11
  30. package/dist/music_room-AFchga9Y.js +0 -11
  31. package/dist/office_large-qDeoZNBo.js +0 -11
  32. package/dist/office_small-B_PLvrYC.js +0 -11
  33. package/dist/ray-grab-XwMBlpJb.js +0 -3714
  34. package/dist/xrStore-Di4S0hIK.js +0 -10
package/README.temp.md CHANGED
@@ -1,288 +1,2 @@
1
- <a href="http://vitessce.io">
2
- <img src="./img/logo-transparent.png" alt="Vitessce logo" title="Vitessce" />
3
- </a>
4
-
5
- Visual Integration Tool for Exploration of Spatial Single-Cell Experiments
6
-
7
- - [Documentation and demos](http://vitessce.io/)
8
- - [Online configuration editor](http://vitessce.io/#?edit=true)
9
- - [Older releases and demos](https://github.com/vitessce/vitessce/releases)
10
- - [Older releases on NPM](https://www.npmjs.com/package/vitessce?activeTab=versions)
11
-
12
- <table><tr>
13
- <td>
14
- <img src="https://user-images.githubusercontent.com/1216518/93336741-2b60c880-f7f6-11ea-8b82-7e1e0ea45e43.png" width="500" alt="Screenshot of Vitessce with Linnarsson data" />
15
- </td>
16
- <td>
17
- <img src="https://user-images.githubusercontent.com/1216518/93337080-a4f8b680-f7f6-11ea-9e53-2c73cc661b94.png" width="500" alt="Same data, zoomed in to cellular scale" />
18
- </td>
19
- </tr></table>
20
-
21
- ## Why Vitessce
22
-
23
- ### Interactive
24
-
25
- Vitessce consists of reusable interactive views including a scatterplot, spatial+imaging plot, genome browser tracks, statistical plots, and control views, built on web technologies such as WebGL.
26
-
27
- ### Integrative
28
-
29
- Vitessce enables visual analysis of multi-modal assay types which probe biological systems through techniques such as microscopy, genomics, and transcriptomics.
30
-
31
- ### Serverless
32
-
33
- Visualize large datasets stored in static cloud object stores such as AWS S3. No need to manage or pay for expensive compute infrastructure for visualization purposes.
34
-
35
- ## Usage
36
-
37
- Vitessce can be used in React projects by installing the package from NPM:
38
-
39
- ```sh
40
- npm install vitessce
41
- ```
42
-
43
- For more details, please visit the [documentation](http://vitessce.io/docs/js-overview/).
44
-
45
- ## How to Contribute
46
-
47
- We welcome contributions! Please check out our [Contributing Guide](CONTRIBUTING.md) for detailed instructions.
48
-
49
-
50
- ## Development
51
-
52
- First install [PNPM](https://pnpm.io/installation) v9.5. We develop and test against NodeJS `v18.6.0` and NPM `8.13.2`.
53
-
54
- > **Note**
55
- > NodeJS may require the [`max_old_space_size`](https://stackoverflow.com/a/59572966) value to be increased.
56
- ```sh
57
- . ./scripts/set-node-options.sh
58
- ```
59
-
60
- Checkout the project, `cd`, and then:
61
-
62
- ```sh
63
- pnpm install
64
- pnpm run build
65
- pnpm run start-demo
66
- ```
67
-
68
- The development server will refresh the browser as you edit the code.
69
-
70
- To get started creating a new view:
71
-
72
- ```sh
73
- pnpm run create-view line-plot
74
- ```
75
-
76
- Further details for internal developers can be found within [dev-docs](./dev-docs/).
77
-
78
- ### Changesets
79
-
80
- We use [changesets](https://github.com/changesets/changesets) to manage the changelog.
81
- Therefore, when making code changes, do not edit `CHANGELOG.md` directly.
82
- Instead, run `pnpm changeset`, follow the prompts, and commit the resulting markdown files along with the code changes.
83
-
84
- ### Branches
85
-
86
- Please use one of the following naming conventions for new branches:
87
- - `{github-username}/{feature-name}`
88
- - `{github-username}/fix-{issue-num}`
89
-
90
- ### Pull requests
91
-
92
- We use squash merging for pull requests.
93
-
94
- ### Monorepo organization
95
-
96
- See `pnpm-workspace.yaml` for more information.
97
- We are using PNPM [catalogs](https://pnpm.io/catalogs) which are available from v9.5.0 of PNPM.
98
-
99
- ### Testing
100
-
101
- For the end-to-end tests, they depend on
102
- ```sh
103
- cd sites/demo && pnpm run build-demo
104
- ```
105
-
106
- - To run all the tests, both unit and e2e: `./scripts/test.sh`
107
- - To run just the unit tests: `pnpm run test`
108
-
109
- ### Linting
110
-
111
- ```sh
112
- pnpm run lint
113
- ```
114
-
115
- To allow the linter to perform automated fixes during linting: `pnpm run lint-fix`
116
-
117
- ### Troubleshooting
118
-
119
- The following commands can be helpful in case the local environment gets into a broken state:
120
-
121
- - `pnpm install`
122
- - `pnpm run clean`: removes build/bundle directories and all `tsconfig.tsbuildinfo` files (used by TypeScript's Project References).
123
- - `pnpm run build`: need to re-build subpackages after this type of cleanup.
124
- - `pnpm run clean-deps`: removes all `node_modules` directories, including those nested inside subpackages.
125
- - `pnpm install`: need to re-install dependencies after this type of cleanup.
126
-
127
- ## Deployment
128
-
129
- Before running any of the deployment scripts, confirm that you have installed the AWS CLI and are in the appropriate AWS account:
130
- ```
131
- $ aws iam list-account-aliases --query 'AccountAliases[0]'
132
- "hdv-vitessce"
133
- ```
134
-
135
- ### Staging
136
-
137
- To build the current branch and push the "minimal" demo and docs sites to S3, run this script:
138
- ```sh
139
- ./scripts/push-demos.sh
140
- ```
141
-
142
- This will build the demo and docs, push both to S3, and finally open the docs deployment in your browser.
143
-
144
- #### Publish staged development site
145
-
146
- After doing a [manual test](./dev-docs/manual-testing.md) of the deployment of the dev site,
147
- if it looks good, copy it to dev.vitessce.io:
148
-
149
- ```sh
150
- ./scripts/copy-dev.sh https://{url returned by scripts/deploy-release.sh or scripts/push-demos.sh}
151
- ```
152
-
153
- Note: if you need to obtain this URL later:
154
-
155
- ```
156
- Copy dev to https://legacy.vitessce.io/demos/$DATE/$HASH/index.html
157
- ```
158
-
159
- #### Publish staged docs to vitessce.io
160
-
161
- After doing a manual test of the deployment of the docs,
162
- if it looks good, copy it to vitessce.io:
163
-
164
- ```sh
165
- ./scripts/copy-docs.sh https://{url returned by scripts/deploy-release.sh or scripts/push-demos.sh}
166
- ```
167
-
168
- Note: if you need to obtain this URL later:
169
-
170
- ```
171
- Copy docs to https://data-1.vitessce.io/docs-root/$DATE/$HASH/index.html
172
- ```
173
-
174
- ## Release
175
-
176
- Releasing refers to publishing all sub-packages to NPM and creating a corresponding GitHub release.
177
-
178
- Note: releasing does not currently result in automatic deployment of the documentation or development sites (see the [Deployment](#deployment) section above).
179
-
180
- Also note: If the release includes a new NPM package (e.g., `@vitessce/new-view`), trusted publishing must first be configured via NPM (see [discussion](https://github.com/orgs/community/discussions/181927)).
181
-
182
- ### From GitHub Actions
183
-
184
- When there are changesets on the `main` branch, the [`changesets/action`](https://github.com/changesets/action) bot will run `./scripts/changeset-version.sh --action` and make a pull request titled "Create release".
185
-
186
- - This pull request remains open until ready to make a release. The bot will update the pull request as new changesets are added to `main`.
187
-
188
- Once this "Create release" pull request is merged, the next time `release.yml` is executed on GitHub Actions, the following will occur:
189
- - [`changesets/action`](https://github.com/changesets/action) will run `./scripts/changeset-publish.sh --action`, which:
190
- - publishes to NPM using [OIDC trusted publishing](https://docs.npmjs.com/trusted-publishers)
191
- - creates a new git tag for the release
192
- - [`softprops/action-gh-release`](https://github.com/softprops/action-gh-release) will generate a GitHub release based on the git tag, using the latest changelog entries for the release notes.
193
-
194
- ### From local machine
195
-
196
- ```sh
197
- pnpm run build
198
- pnpm run bundle
199
- pnpm run build-json-schema
200
-
201
- ./scripts/changeset-version.sh
202
- ./scripts/changeset-publish.sh # runs pnpm publish internally
203
- ```
204
-
205
- ## Version bumps
206
-
207
- In this project we try to follow semantic versioning.
208
- The following are examples of things that would require a major, minor, or patch type of bump.
209
-
210
- ### Patch version bumps
211
-
212
- Bug fixes, minor feature improvements, additional view types, additional coordination types, and additional file type implementations are possible in a patch version bump.
213
-
214
- When a coordination type is added, it must be reflected by a new view config JSON schema with an incremented `version` property, and a new view config upgrade function to enable previous view config versions to remain compatible.
215
- The default schema version parameter of the `VitessceConfig` constructor may also change to reflect the new schema version.
216
-
217
- ### Minor version bumps
218
-
219
- An exported helper function or React component for plugin views had a change in props or function signature.
220
- Major feature improvements or additions.
221
-
222
- ### Major version bumps
223
-
224
- The exported constant values changed, such as view types and coordination types, such that previous code using these values may no longer run successfully.
225
- React props of the main `<Vitessce />` component changed.
226
- Major behavior changes or interface updates.
227
- Changes to the directory structure or filenames in the `dist/` directory that could result in broken import statements.
228
-
229
-
230
- ## Related repositories
231
-
232
- - [Viv](https://github.com/hms-dbmi/viv): A library for multiscale visualization of high-resolution multiplexed tissue data on the web.
233
- - [HiGlass](https://github.com/higlass/higlass): A library for multiscale visualization of genomic data on the web.
234
- - [vitessce-python](https://github.com/vitessce/vitessce-python): Python API and Jupyter widget.
235
- - [vitessce-r](https://github.com/vitessce/vitessce-r): R API and R htmlwidget.
236
- - [vitessce-data](https://github.com/hms-dbmi/vitessce-data): Scripts to generate sample data
237
-
238
- ## Old presentations
239
-
240
- - [May 2022: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1qfd0rc6bF9nFIvOMp2YacpbJ7F8_UYhSYjLn26AlH7k/edit?usp=sharing)
241
- - [February 2022: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1J4lcWxD1GRGLBm0RLkGmEGcuQvXX9yBVBsQo2rXPTVM/edit?usp=sharing)
242
- - [October 2021: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1bibMLiR5aW_MgXn6ydhXWJsEN3tG5gJSw9xuYa49x5U/edit?usp=sharing)
243
- - [September 2021: HuBMAP Consortium Sci-Tech Webinar (Mark)](https://docs.google.com/presentation/d/1iPXSGEGT9HNNSrXT5uu0x_9Jq6L3cnhrpaz1Pge5O50/edit?usp=sharing)
244
- - [June 2021: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1P--F_MLeWK2n3JrY21mGn9FBgI2u60nQGN_XZtniSnc/edit?usp=sharing)
245
- - [April 2021: Spatial Biology Europe (Mark)](https://docs.google.com/presentation/d/1s33dKMCdE3LtC43IWBw48ZDmmtYJarDPtUOhH9T3D6Q/edit?usp=sharing)
246
- - [January 2021: Ilan Gold's lab meeting update](https://docs.google.com/presentation/d/10kmjLxQh5ji-4TVMq06KRpXek3uje_fQpTXBqjFj0p4/edit?usp=sharing)
247
- - [December 2020: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1rG0s5eH_NrFSk3_7lpmc9dsaUPFvnakYD59ff9D-G1M/edit?usp=sharing)
248
- - [November 2020: Ilan Gold's lab meeting update](https://docs.google.com/presentation/d/1egAwCR8UwdRCWiGYVRelebwNDH9boBX1nJIX5auvf1w/edit?usp=sharing)
249
- - [October 2020: Mark Keller's lab meeting update](https://docs.google.com/presentation/d/1M8dGbIGA_cfa3uZnGLnk3iMzMNVbxzza33OKBqwwlNQ/edit?usp=sharing)
250
- - [July 2020: Ilan Gold's lab meeting update](https://docs.google.com/presentation/d/1QzKYP6sXPefBMNfY4PW4H0AMoWVbw9HeNoweLmJg17Y/edit?usp=sharing)
251
- - [June 2020: NLM Informatics Training Conference (Trevor)](https://docs.google.com/presentation/d/1eYslI4y1LbnEGwj4XHXxqYcRKpYgqc9Y2mZTd5iCzMc/edit?usp=sharing)
252
- - [May 2020: Trevor Manz's overview of multimodal imaging in Vitessce](https://docs.google.com/presentation/d/1NPYZPduymN7wzgN-NYRQwd15D-nUZYILJTgBR2oNb04/edit?usp=sharing)
253
- - [January 2020: Ilan Gold's overview of IF Imagery](https://docs.google.com/presentation/d/1BSz2JefN2WSF_RwVpOrIhYD2V8D7ZLc5b21VTy2Xmlo/edit#slide=id.p)
254
- - [January 2020: Trevor Manz's wrap-up on Arrow, Zarr, and IMS](https://docs.google.com/presentation/d/1H2hff-bW4SZ3KFD5_q0iN-Dv1yew7pVe0MbdMsA2gko/edit)
255
- - [September 2019: HuBMAP Poster](https://drive.google.com/open?id=1pRiTN99-wZ6QuEMWzorcD4fA2Fi-7eW4)
256
- - [August 2019: SIBMI Presentations](https://docs.google.com/presentation/d/1IRWDofdvKS3qbLY-s0a1EUijha3m-JopMYgmETOIHq0/edit?usp=sharing)
257
- - [July 2019: Intern progress reports and HuBMAP collaboration](https://docs.google.com/presentation/d/10zanc_cHh-OcFvBeuJdKBpLnazjVh64pbbdD4kJQ7GY/edit?usp=sharing)
258
- - [May 2019: Harvard IT Summit](https://docs.google.com/presentation/d/1eYDMedzhQtcClB2cIBo17hlaSSAu_-vzkG4LY_mGGQ8/edit#slide=id.p)
259
- - [May 2019: Misc. tools](https://docs.google.com/presentation/d/1TaC68-r6bosnwi05BZ5bNh9tzeXsxyqmBo1gFZDxhGM/edit#slide=id.p)
260
- - [April 2019: Software engineering](https://docs.google.com/presentation/d/1uW3J83LYaa67M9ZKe15AQw_h06QiFJBzpBickbRFcCY/edit#slide=id.p)
261
-
262
- ## Citation
263
-
264
- To cite Vitessce in your work, please use:
265
-
266
- ```bibtex
267
- @article{keller2024vitessce,
268
- title = {{Vitessce: integrative visualization of multimodal and spatially resolved single-cell data}},
269
- author = {Keller, Mark S. and Gold, Ilan and McCallum, Chuck and Manz, Trevor and Kharchenko, Peter V. and Gehlenborg, Nils},
270
- journal = {Nature Methods},
271
- year = {2024},
272
- month = sep,
273
- doi = {10.1038/s41592-024-02436-x}
274
- }
275
- ```
276
-
277
- If you use the image rendering functionality, please additionally cite Viv:
278
-
279
- ```bibtex
280
- @article{manz2022viv,
281
- title = {{Viv: multiscale visualization of high-resolution multiplexed bioimaging data on the web}},
282
- author = {Manz, Trevor and Gold, Ilan and Patterson, Nathan Heath and McCallum, Chuck and Keller, Mark S. and Herr, II, Bruce W. and Börner, Kay and Spraggins, Jeffrey M. and Gehlenborg, Nils},
283
- journal = {Nature Methods},
284
- year = {2022},
285
- month = may,
286
- doi = {10.1038/s41592-022-01482-7}
287
- }
288
- ```
1
+ This package is the main `vitessce` package on NPM.
2
+ It exports the `<Vitessce/>` from `@vitessce/all` for backwards compatibility.
@@ -1,33 +1,34 @@
1
1
  import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
2
  import { useRef as r, useEffect as Pe, useState as L } from "react";
3
- import { M as Se, s as ie } from "./ray-grab-XwMBlpJb.js";
4
- import { M as xe, V as g, F as oe, a as X } from "./index-DNangxT1.js";
5
- import { i as be, M as K, s as se, B as Fe } from "./index-BJz-iWAr.js";
6
- import { u as ye, a as Le } from "./OrbitControls-ZAZ0euXg.js";
7
- function Be(l, o) {
3
+ import { useThree as Se, useFrame as xe } from "@react-three/fiber";
4
+ import { Bvh as be } from "@react-three/drei";
5
+ import { useXR as Fe, useXRInputSourceState as ie } from "@react-three/xr";
6
+ import { Matrix4 as ye, Vector3 as g, Box3 as X, FrontSide as oe } from "three";
7
+ import { i as Le, M as K, s as se } from "./index-CfB8ifq3.js";
8
+ function we(l, o) {
8
9
  return l.get(o);
9
10
  }
10
- function H(l, o, B, P) {
11
+ function H(l, o, w, P) {
11
12
  if (!l?.inputSource?.hand)
12
13
  return null;
13
- const t = Be(l.inputSource.hand, o);
14
+ const t = we(l.inputSource.hand, o);
14
15
  if (!t)
15
16
  return null;
16
- const i = B.getJointPose?.(t, P);
17
+ const i = w.getJointPose?.(t, P);
17
18
  return i ? new g(i.transform.position.x, i.transform.position.y, i.transform.position.z) : null;
18
19
  }
19
- function z(l, o, B, P = 0.02) {
20
- const t = H(l, "thumb-tip", o, B), i = H(l, "index-finger-tip", o, B);
20
+ function z(l, o, w, P = 0.02) {
21
+ const t = H(l, "thumb-tip", o, w), i = H(l, "index-finger-tip", o, w);
21
22
  return !t || !i ? !1 : t.distanceTo(i) < P;
22
23
  }
23
- function Ee(l) {
24
- const { segmentationGroup: o, segmentationSettings: B, segmentationSceneScale: P, renderingSettings: t, materialRef: i, highlightEntity: ce, setObsHighlight: R } = l, T = r(null), ae = r(null), s = r(null), f = r(null);
25
- r(new xe());
26
- const w = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b = Se((e) => e.session) != null;
24
+ function De(l) {
25
+ const { segmentationGroup: o, segmentationSettings: w, segmentationSceneScale: P, renderingSettings: t, materialRef: i, highlightEntity: ce, setObsHighlight: M } = l, T = r(null), ae = r(null), s = r(null), f = r(null);
26
+ r(new ye());
27
+ const B = r(null), S = r(null), E = r(0), p = r(/* @__PURE__ */ new Map()), b = Fe((e) => e.session) != null;
27
28
  Pe(() => {
28
29
  i?.current?.material?.uniforms?.u_physical_Pixel && (i.current.material.uniforms.u_physical_Pixel.value = b ? 0.2 : 2.5);
29
30
  }, [b, i]);
30
- const { scene: N, gl: le } = ye(), V = ie("hand", "right"), U = ie("hand", "left"), [W, k] = L(!1), [A, q] = L(!1), [ue, Q] = L(!1), [J, D] = L({
31
+ const { scene: N, gl: le } = Se(), U = ie("hand", "right"), V = ie("hand", "left"), [W, k] = L(!1), [A, q] = L(!1), [ue, Q] = L(!1), [J, D] = L({
31
32
  startPoint: new g(),
32
33
  midPoint: new g(),
33
34
  endPoint: new g(),
@@ -42,7 +43,7 @@ function Ee(l) {
42
43
  const fe = r(O);
43
44
  fe.current = O;
44
45
  const te = r(Y);
45
- te.current = Y, Le((e, F, c) => {
46
+ te.current = Y, xe((e, F, c) => {
46
47
  if (!b || !c)
47
48
  return;
48
49
  const a = le.xr.getReferenceSpace();
@@ -62,44 +63,44 @@ function Ee(l) {
62
63
  }));
63
64
  const ge = Z.current, u = ee.current;
64
65
  if (ge) {
65
- let d = H(U, "index-finger-tip", c, a), M = H(V, "index-finger-tip", c, a);
66
- if (!d || !M)
66
+ let d = H(V, "index-finger-tip", c, a), j = H(U, "index-finger-tip", c, a);
67
+ if (!d || !j)
67
68
  return;
68
- s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()), M = M.applyMatrix4(s.current.matrixWorld.clone().invert()));
69
- let j = d.clone(), y = M.clone();
70
- u.setStartPoint && (j = u.startPoint), u.setEndPoint && (y = u.endPoint), D({
71
- startPoint: j,
72
- midPoint: new g().addVectors(j, y).multiplyScalar(0.5),
69
+ s.current && (d = d.applyMatrix4(s.current.matrixWorld.clone().invert()), j = j.applyMatrix4(s.current.matrixWorld.clone().invert()));
70
+ let R = d.clone(), y = j.clone();
71
+ u.setStartPoint && (R = u.startPoint), u.setEndPoint && (y = u.endPoint), D({
72
+ startPoint: R,
73
+ midPoint: new g().addVectors(R, y).multiplyScalar(0.5),
73
74
  endPoint: y,
74
75
  setStartPoint: u.setStartPoint,
75
76
  setEndPoint: u.setEndPoint
76
- }), z(V, c, a) && D((h) => ({
77
+ }), z(U, c, a) && D((h) => ({
77
78
  ...h,
78
79
  setEndPoint: !0
79
- })), z(U, c, a) && D((h) => ({
80
+ })), z(V, c, a) && D((h) => ({
80
81
  ...h,
81
82
  setStartPoint: !0
82
83
  })), u.setStartPoint && u.setEndPoint && (de((h) => [...h, u]), Q(!1), k(!1), C(8));
83
84
  } else if (te.current <= 0 && T.current && b) {
84
85
  const d = T.current;
85
- d.children[0].children.forEach((M, j) => {
86
- const y = d.children[0].children[j], h = new X().setFromObject(y), ne = G.intersectsBox(h), re = I.intersectsBox(h);
87
- (ne || re) && (_ = !0, R(y.name), q(!0), ne && z(U, c, a) && (C(10), _ = !1), re && z(V, c, a) && (C(10), _ = !1));
88
- }), !_ && $.current && (R(null), q(!1));
86
+ d.children[0].children.forEach((j, R) => {
87
+ const y = d.children[0].children[R], h = new X().setFromObject(y), ne = G.intersectsBox(h), re = I.intersectsBox(h);
88
+ (ne || re) && (_ = !0, M(y.name), q(!0), ne && z(V, c, a) && (C(10), _ = !1), re && z(U, c, a) && (C(10), _ = !1));
89
+ }), !_ && $.current && (M(null), q(!1));
89
90
  }
90
91
  });
91
92
  const pe = (e) => {
92
93
  if (b) {
93
94
  if (e.stopPropagation(), e.target.setPointerCapture(e.pointerId), f.current === null)
94
- f.current = e.pointerId, p.current.set(e.pointerId, e.point.clone()), s.current && (w.current = s.current.scale.clone());
95
+ f.current = e.pointerId, p.current.set(e.pointerId, e.point.clone()), s.current && (B.current = s.current.scale.clone());
95
96
  else if (S.current === null && e.pointerId !== f.current) {
96
97
  S.current = e.pointerId, p.current.set(e.pointerId, e.point.clone());
97
98
  const F = p.current.get(f.current), c = e.point;
98
- F && (E.current = F.distanceTo(c)), s.current && (w.current = s.current.scale.clone());
99
+ F && (E.current = F.distanceTo(c)), s.current && (B.current = s.current.scale.clone());
99
100
  }
100
101
  }
101
102
  }, he = (e) => {
102
- e.target.releasePointerCapture(e.pointerId), p.current.delete(e.pointerId), f.current === e.pointerId && (f.current = null, w.current = null), S.current === e.pointerId && (S.current = null, E.current = 0);
103
+ e.target.releasePointerCapture(e.pointerId), p.current.delete(e.pointerId), f.current === e.pointerId && (f.current = null, B.current = null), S.current === e.pointerId && (S.current = null, E.current = 0);
103
104
  }, me = (e) => {
104
105
  if (!s.current || !e.point)
105
106
  return;
@@ -107,11 +108,11 @@ function Ee(l) {
107
108
  if (!F && !c)
108
109
  return;
109
110
  const a = p.current.get(e.pointerId);
110
- if (p.current.set(e.pointerId, e.point.clone()), S.current !== null && E.current > 0 && w.current) {
111
+ if (p.current.set(e.pointerId, e.point.clone()), S.current !== null && E.current > 0 && B.current) {
111
112
  const x = p.current.get(f.current), v = p.current.get(S.current);
112
113
  if (x && v) {
113
114
  const I = x.distanceTo(v) / E.current;
114
- s.current.scale.copy(w.current).multiplyScalar(I);
115
+ s.current.scale.copy(B.current).multiplyScalar(I);
115
116
  }
116
117
  } else if (F && a) {
117
118
  const x = e.point.clone().sub(a);
@@ -126,12 +127,12 @@ function Ee(l) {
126
127
  2e-3 * t.meshScale[0],
127
128
  2e-3 * t.meshScale[1],
128
129
  2e-3 * t.meshScale[2]
129
- ], ref: i, children: [be(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "currentLine", ref: ae, children: ue ? n(K, { currentLine: J, scale: 1 / 2e-3 * 0.4 }) : null }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 / 2e-3 * 0.4 }, se(e))) })] }) : m("group", { children: [m("group", { children: [o?.visible ? m("group", { children: [n("hemisphereLight", { color: 8421504, groundColor: 6316128 }), n("directionalLight", { color: 16777215, position: [0, -800, 0] }), n("directionalLight", { color: 16777215, position: [0, 800, 0] }), n(Fe, { firstHitOnly: !0, children: n("primitive", { ref: T, object: o, position: [0, 0, 0], onClick: (e) => {
130
+ ], ref: i, children: [Le(t.geometrySize) && n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "currentLine", ref: ae, children: ue ? n(K, { currentLine: J, scale: 1 / 2e-3 * 0.4 }) : null }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 / 2e-3 * 0.4 }, se(e))) })] }) : m("group", { children: [m("group", { children: [o?.visible ? m("group", { children: [n("hemisphereLight", { color: 8421504, groundColor: 6316128 }), n("directionalLight", { color: 16777215, position: [0, -800, 0] }), n("directionalLight", { color: 16777215, position: [0, 800, 0] }), n(be, { firstHitOnly: !0, children: n("primitive", { ref: T, object: o, position: [0, 0, 0], onClick: (e) => {
130
131
  e.object.parent?.userData.name === "finalPass" && ce(e.object.name, e.object.userData.layerScope, e.object.userData.channelScope);
131
132
  }, onPointerOver: (e) => {
132
- R(e.object.name);
133
- }, onPointerOut: () => R(null) }) })] }) : null, t.uniforms && t.shader && t.meshScale && t.geometrySize ? n("group", { children: m("mesh", { scale: t.meshScale, ref: i, children: [n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 }, se(e))) })] });
133
+ M(e.object.name);
134
+ }, onPointerOut: () => M(null) }) })] }) : null, t.uniforms && t.shader && t.meshScale && t.geometrySize ? n("group", { children: m("mesh", { scale: t.meshScale, ref: i, children: [n("boxGeometry", { args: t.geometrySize }), n("shaderMaterial", { customProgramCacheKey: () => "1", side: oe, uniforms: t.uniforms, needsUpdate: !0, transparent: !0, vertexShader: t.shader.vertexShader, fragmentShader: t.shader.fragmentShader })] }) }) : null] }), n("group", { name: "lines", children: O.map((e) => n(K, { currentLine: e, scale: 1 }, se(e))) })] });
134
135
  }
135
136
  export {
136
- Ee as default
137
+ De as default
137
138
  };
@@ -3,7 +3,7 @@ var p_ = (i, e, t) => e in i ? f_(i, e, { enumerable: !0, configurable: !0, writ
3
3
  var Qn = (i, e, t) => p_(i, typeof e != "symbol" ? e + "" : e, t);
4
4
  import { jsx as g_, jsxs as m_ } from "react/jsx-runtime";
5
5
  import Hb from "react";
6
- import { g as Qe, bs as v_, bt as Ot, bu as ut, bv as Hv, bw as qv, bx as $k, by as jv, bz as Nr, bA as Jv, bB as aa, bC as Ro, bD as Ao, bE as Gk, bF as oa, bG as qu, bH as Or, bI as ju, bJ as Ju, bK as xs, bL as y_, bM as S_, bN as b_, bO as Ku, bP as w_, bQ as C_, bR as Wk, bS as Yu, bT as x_, bU as E_, bV as k_, bW as T_, bX as L_, bY as Kv, bZ as Hk, b_ as D_, b$ as Yv, c0 as I_, c1 as P_, c2 as R_, c3 as A_, c4 as __, c5 as M_, c6 as N_, c7 as O_, c8 as V_, c9 as B_ } from "./index-DNangxT1.js";
6
+ import { b as Qe, r as v_, h as Ot, j as ut, k as Hv, m as qv, n as $k, o as jv, p as Nr, q as Jv, s as aa, t as Ro, v as Ao, w as Gk, x as oa, y as qu, z as Or, A as ju, D as Ju, E as xs, F as y_, G as S_, H as b_, I as Ku, J as w_, K as C_, M as Wk, N as Yu, O as x_, P as E_, Q as k_, R as T_, S as L_, T as Kv, U as Hk, V as D_, W as Yv, X as I_, Y as P_, Z as R_, _ as A_, $ as __, a0 as M_, a1 as N_, a2 as O_, a3 as V_, a4 as B_ } from "./index-9C30IDNz.js";
7
7
  var F_ = v_();
8
8
  const H = /* @__PURE__ */ Qe(F_);
9
9
  var qb = {}, Nf, jb;
@@ -1,6 +1,6 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as o } from "react";
3
- import { x as r } from "./xrStore-Di4S0hIK.js";
3
+ import { x as r } from "./xrStore-BtX9iGzw.js";
4
4
  function b() {
5
5
  const [i, u] = s(!1), [n, a] = s(!1);
6
6
  return o(() => {
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, Fragment as d, jsx as i } from "react/jsx-runtime";
2
2
  import { useRef as f } from "react";
3
- import { s as m, M as x } from "./ray-grab-XwMBlpJb.js";
4
- import { u as h, a as g } from "./OrbitControls-ZAZ0euXg.js";
3
+ import { useXRInputSourceState as m, useXR as x } from "@react-three/xr";
4
+ import { useThree as h, useFrame as g } from "@react-three/fiber";
5
5
  function l(n, r) {
6
6
  return n.get(r);
7
7
  }
@@ -40,9 +40,9 @@ function y() {
40
40
  });
41
41
  }), null;
42
42
  }
43
- function B() {
43
+ function J() {
44
44
  return a(d, { children: [i(S, {}), i(y, {})] });
45
45
  }
46
46
  export {
47
- B as default
47
+ J as default
48
48
  };
@@ -0,0 +1,9 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { XR as t } from "@react-three/xr";
3
+ import { x as e } from "./xrStore-BtX9iGzw.js";
4
+ function i({ children: r }) {
5
+ return o(t, { store: e, children: r });
6
+ }
7
+ export {
8
+ i as default
9
+ };
@@ -1,5 +1,5 @@
1
1
  import { i as r } from "./pako.esm-D68R8YXe.js";
2
- import { B as a } from "./index-DNangxT1.js";
2
+ import { B as a } from "./index-9C30IDNz.js";
3
3
  class s extends a {
4
4
  decodeBlock(e) {
5
5
  return r(new Uint8Array(e)).buffer;
@@ -1,6 +1,6 @@
1
1
  import * as KY from "react";
2
2
  import I, { createContext as op, isValidElement as ZY, PureComponent as ap, Component as sp, useMemo as Zt, useState as Ur, useRef as Mt, useEffect as ar, useCallback as zt, memo as QY, useContext as nl, useReducer as JY, useLayoutEffect as eK } from "react";
3
- import { g as PB, a4 as e4, a5 as qO } from "./index-DNangxT1.js";
3
+ import { b as PB, e as e4, f as qO } from "./index-9C30IDNz.js";
4
4
  import ga, { unstable_batchedUpdates as Yp, createPortal as tK } from "react-dom";
5
5
  import { jsx as Ic, jsxs as rK } from "react/jsx-runtime";
6
6
  function nK(t) {