@threlte/xr 1.0.0-next.0 → 1.0.0-next.1
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/dist/components/ARButton.svelte +1 -1
- package/dist/components/Controller.svelte +2 -2
- package/dist/components/Hand.svelte +2 -2
- package/dist/components/Headset.svelte +1 -1
- package/dist/components/Headset.svelte.d.ts +5 -1
- package/dist/components/VRButton.svelte +1 -1
- package/dist/components/XR.svelte +1 -1
- package/dist/components/XRButton.svelte +1 -1
- package/dist/components/internal/Cursor.svelte +1 -1
- package/dist/components/internal/PointerCursor.svelte +1 -1
- package/dist/components/internal/PointerCursor.svelte.d.ts +3 -0
- package/dist/components/internal/ScenePortal.svelte +1 -1
- package/dist/components/internal/ScenePortal.svelte.d.ts +5 -1
- package/dist/components/internal/ShortRay.svelte +1 -1
- package/dist/components/internal/ShortRay.svelte.d.ts +3 -0
- package/dist/components/internal/TeleportCursor.svelte +1 -1
- package/dist/components/internal/TeleportCursor.svelte.d.ts +3 -0
- package/dist/components/internal/TeleportRay.svelte +1 -1
- package/dist/components/internal/TeleportRay.svelte.d.ts +3 -0
- package/package.json +8 -8
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@component `<Controller />` represents a THREE.XRTargetRaySpace, a THREE.XRGripSpace, and a controller model.
|
|
3
3
|
-->
|
|
4
4
|
<script
|
|
5
|
-
|
|
5
|
+
lang="ts"
|
|
6
6
|
context="module"
|
|
7
7
|
>import { writable } from "svelte/store";
|
|
8
8
|
import { T } from "@threlte/core";
|
|
@@ -19,7 +19,7 @@ const stores = {
|
|
|
19
19
|
};
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
|
-
<script>let { left, right, hand, ...props } = $props();
|
|
22
|
+
<script lang="ts">let { left, right, hand, ...props } = $props();
|
|
23
23
|
const handedness = writable(left ? "left" : right ? "right" : hand);
|
|
24
24
|
$effect.pre(() => handedness.set(left ? "left" : right ? "right" : hand));
|
|
25
25
|
controllerEvents[$handedness].set(props.$$events);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script
|
|
2
|
-
|
|
2
|
+
lang="ts"
|
|
3
3
|
context="module"
|
|
4
4
|
>import { Group } from "three";
|
|
5
5
|
import { T, useThrelte, useTask } from "@threlte/core";
|
|
@@ -13,7 +13,7 @@ const stores = {
|
|
|
13
13
|
};
|
|
14
14
|
</script>
|
|
15
15
|
|
|
16
|
-
<script>let { left, right, hand, ...props } = $props();
|
|
16
|
+
<script lang="ts">let { left, right, hand, ...props } = $props();
|
|
17
17
|
const { xr } = useThrelte().renderer;
|
|
18
18
|
const space = xr.getReferenceSpace();
|
|
19
19
|
const handedness = writable(left ? "left" : right ? "right" : hand);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
3
|
+
props: {
|
|
4
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
5
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
6
|
+
}) | undefined;
|
|
7
|
+
};
|
|
4
8
|
events: {
|
|
5
9
|
[evt: string]: CustomEvent<any>;
|
|
6
10
|
};
|
|
@@ -17,7 +17,7 @@ This should be placed within a Threlte `<Canvas />`.
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
-->
|
|
20
|
-
<script>import { onMount } from "svelte";
|
|
20
|
+
<script lang="ts">import { onMount } from "svelte";
|
|
21
21
|
import { createRawEventDispatcher, useThrelte, watch } from "@threlte/core";
|
|
22
22
|
import {
|
|
23
23
|
isHandTracking,
|
|
@@ -17,7 +17,7 @@ display info about your WebXR session. This is aliased by `ARButton` and
|
|
|
17
17
|
/>
|
|
18
18
|
```
|
|
19
19
|
-->
|
|
20
|
-
<script>import { getXRSupportState } from "../lib/getXRSupportState";
|
|
20
|
+
<script lang="ts">import { getXRSupportState } from "../lib/getXRSupportState";
|
|
21
21
|
import { toggleXRSession } from "../lib/toggleXRSession";
|
|
22
22
|
import { session, xr } from "../internal/stores";
|
|
23
23
|
let { mode, sessionInit, force, styled = true, ...props } = $props();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { Group, Vector3, Matrix3 } from "three";
|
|
1
|
+
<script lang="ts">import { Group, Vector3, Matrix3 } from "three";
|
|
2
2
|
import { T, useTask } from "@threlte/core";
|
|
3
3
|
import { pointerIntersection, pointerState } from "../../internal/stores";
|
|
4
4
|
import Cursor from "./Cursor.svelte";
|
|
@@ -2,6 +2,9 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
handedness: 'left' | 'right';
|
|
5
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
6
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
7
|
+
}) | undefined;
|
|
5
8
|
};
|
|
6
9
|
events: {
|
|
7
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
2
|
declare const __propDef: {
|
|
3
|
-
props:
|
|
3
|
+
props: {
|
|
4
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
5
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
6
|
+
}) | undefined;
|
|
7
|
+
};
|
|
4
8
|
events: {
|
|
5
9
|
[evt: string]: CustomEvent<any>;
|
|
6
10
|
};
|
|
@@ -2,6 +2,9 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
handedness: 'left' | 'right';
|
|
5
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
6
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
7
|
+
}) | undefined;
|
|
5
8
|
};
|
|
6
9
|
events: {
|
|
7
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -2,6 +2,9 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
handedness: 'left' | 'right';
|
|
5
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
6
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
7
|
+
}) | undefined;
|
|
5
8
|
};
|
|
6
9
|
events: {
|
|
7
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<script>import { Vector3, QuadraticBezierCurve3, Vector2 } from "three";
|
|
1
|
+
<script lang="ts">import { Vector3, QuadraticBezierCurve3, Vector2 } from "three";
|
|
2
2
|
import { Line2 } from "three/examples/jsm/lines/Line2.js";
|
|
3
3
|
import { LineGeometry } from "three/examples/jsm/lines/LineGeometry.js";
|
|
4
4
|
import { LineMaterial } from "three/examples/jsm/lines/LineMaterial.js";
|
|
@@ -4,6 +4,9 @@ declare const __propDef: {
|
|
|
4
4
|
props: {
|
|
5
5
|
handedness: 'left' | 'right';
|
|
6
6
|
targetRay: XRTargetRaySpace;
|
|
7
|
+
children?: ((this: void) => typeof import("svelte").SnippetReturn & {
|
|
8
|
+
_: "functions passed to {@render ...} tags must use the `Snippet` type imported from \"svelte\"";
|
|
9
|
+
}) | undefined;
|
|
7
10
|
};
|
|
8
11
|
events: {
|
|
9
12
|
[evt: string]: CustomEvent<any>;
|
package/package.json
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threlte/xr",
|
|
3
|
-
"version": "1.0.0-next.
|
|
3
|
+
"version": "1.0.0-next.1",
|
|
4
4
|
"author": "Micheal Parks <michealparks1989@gmail.com> (https://parks.lol)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
7
7
|
"@sveltejs/adapter-auto": "^3.2.0",
|
|
8
8
|
"@sveltejs/kit": "^2.5.5",
|
|
9
9
|
"@sveltejs/package": "^2.3.1",
|
|
10
|
-
"@sveltejs/vite-plugin-svelte": "^3.0
|
|
11
|
-
"@typescript-eslint/eslint-plugin": "^7.
|
|
12
|
-
"@typescript-eslint/parser": "^7.
|
|
10
|
+
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
|
11
|
+
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
12
|
+
"@typescript-eslint/parser": "^7.6.0",
|
|
13
13
|
"eslint": "^9.0.0",
|
|
14
14
|
"eslint-plugin-svelte": "^2.36.0",
|
|
15
15
|
"svelte-check": "^3.6.9",
|
|
16
|
-
"typescript": "^5.4.
|
|
16
|
+
"typescript": "^5.4.5",
|
|
17
17
|
"@types/three": "^0.163.0",
|
|
18
18
|
"autoprefixer": "^10.4.19",
|
|
19
19
|
"postcss": "^8.4.38",
|
|
20
20
|
"publint": "^0.2.7",
|
|
21
|
-
"svelte": "^
|
|
21
|
+
"svelte": "^5.0.0-next.95",
|
|
22
22
|
"three": "^0.163.0",
|
|
23
23
|
"tslib": "^2.6.2",
|
|
24
24
|
"vite": "^5.2.8",
|
|
25
25
|
"vite-plugin-mkcert": "^1.17.5",
|
|
26
|
-
"@threlte/core": "8.0.0-next.
|
|
26
|
+
"@threlte/core": "8.0.0-next.2"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"svelte": ">=
|
|
29
|
+
"svelte": ">=5",
|
|
30
30
|
"three": ">=0.152"
|
|
31
31
|
},
|
|
32
32
|
"type": "module",
|