@threlte/xr 1.0.0-next.6 → 1.0.0-next.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,10 +1,20 @@
1
- <script lang="ts">import { useThrelte, HierarchicalObject } from "@threlte/core";
1
+ <script lang="ts">import { T, useThrelte } from "@threlte/core";
2
+ import { Object3D } from "three";
2
3
  const { scene } = useThrelte();
4
+ const proxy = new Object3D();
5
+ proxy.add = (child) => {
6
+ scene.add(child);
7
+ return child;
8
+ };
9
+ proxy.remove = (child) => {
10
+ scene.remove(child);
11
+ return child;
12
+ };
3
13
  </script>
4
14
 
5
- <HierarchicalObject
6
- onChildMount={(child) => scene.add(child)}
7
- onChildDestroy={(child) => scene.remove(child)}
15
+ <T
16
+ is={proxy}
17
+ attach={false}
8
18
  >
9
19
  <slot />
10
- </HierarchicalObject>
20
+ </T>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threlte/xr",
3
- "version": "1.0.0-next.6",
3
+ "version": "1.0.0-next.8",
4
4
  "author": "Micheal Parks <michealparks1989@gmail.com> (https://parks.lol)",
5
5
  "license": "MIT",
6
6
  "description": "Tools to more easily create VR and AR experiences with Threlte",
@@ -15,16 +15,16 @@
15
15
  "eslint-plugin-svelte": "^2.36.0",
16
16
  "svelte-check": "^3.6.9",
17
17
  "typescript": "^5.4.5",
18
- "@types/three": "^0.166.0",
18
+ "@types/three": "^0.169.0",
19
19
  "autoprefixer": "^10.4.19",
20
20
  "postcss": "^8.4.38",
21
21
  "publint": "^0.2.7",
22
22
  "svelte": "^5.0.0-next.181",
23
- "three": "^0.166.1",
23
+ "three": "^0.169.0",
24
24
  "tslib": "^2.6.2",
25
25
  "vite": "^5.2.8",
26
26
  "vite-plugin-mkcert": "^1.17.5",
27
- "@threlte/core": "8.0.0-next.12"
27
+ "@threlte/core": "8.0.0-next.19"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "svelte": ">=5",