@threlte/rapier 3.0.0-next.2 → 3.0.0-next.3
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.
|
@@ -17,7 +17,7 @@ let { gravity, rawIntegrationParameters, rawIslands, rawBroadPhase, rawNarrowPha
|
|
|
17
17
|
* Use this to control when the rapier physics engine is updating the scene.
|
|
18
18
|
* @default undefined
|
|
19
19
|
*/
|
|
20
|
-
stage } = $props();
|
|
20
|
+
stage, fallback, children } = $props();
|
|
21
21
|
let error = $state(false);
|
|
22
22
|
const init = async () => {
|
|
23
23
|
if ($initialized)
|
|
@@ -51,10 +51,10 @@ onMount(init);
|
|
|
51
51
|
{rawDebugRenderPipeline}
|
|
52
52
|
{stage}
|
|
53
53
|
>
|
|
54
|
-
|
|
54
|
+
{@render children?.()}
|
|
55
55
|
</InnerWorld>
|
|
56
56
|
{/if}
|
|
57
57
|
|
|
58
58
|
{#if error}
|
|
59
|
-
|
|
59
|
+
{@render fallback?.()}
|
|
60
60
|
{/if}
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
RawRigidBodySet,
|
|
14
14
|
RawSerializationPipeline
|
|
15
15
|
} from '@dimforge/rapier3d-compat/raw'
|
|
16
|
-
import { SvelteComponent } from 'svelte'
|
|
16
|
+
import { SvelteComponent, type Snippet } from 'svelte'
|
|
17
17
|
import type { Vector3 } from 'three'
|
|
18
18
|
import type { Key, Stage } from '@threlte/core'
|
|
19
19
|
|
|
@@ -33,6 +33,9 @@ export type WorldProps = {
|
|
|
33
33
|
rawSerializationPipeline?: RawSerializationPipeline
|
|
34
34
|
rawDebugRenderPipeline?: RawDebugRenderPipeline
|
|
35
35
|
stage?: Key | Stage
|
|
36
|
+
|
|
37
|
+
children?: Snippet
|
|
38
|
+
fallback?: Snippet
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
export default class World extends SvelteComponent<WorldProps> {}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@threlte/rapier",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.3",
|
|
4
4
|
"author": "Grischa Erbe <hello@legrisch.com> (https://legrisch.com)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"devDependencies": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@sveltejs/package": "^2.3.1",
|
|
11
11
|
"@sveltejs/vite-plugin-svelte": "^3.1.0",
|
|
12
12
|
"@types/node": "^20.12.7",
|
|
13
|
-
"@types/three": "^0.
|
|
13
|
+
"@types/three": "^0.165.0",
|
|
14
14
|
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
15
15
|
"@typescript-eslint/parser": "^7.6.0",
|
|
16
16
|
"@yushijinhun/three-minifier-rollup": "^0.4.0",
|
|
@@ -25,12 +25,12 @@
|
|
|
25
25
|
"svelte-check": "^3.6.9",
|
|
26
26
|
"svelte-preprocess": "^5.1.3",
|
|
27
27
|
"svelte2tsx": "^0.7.6",
|
|
28
|
-
"three": "^0.
|
|
28
|
+
"three": "^0.165.0",
|
|
29
29
|
"tslib": "^2.6.2",
|
|
30
30
|
"type-fest": "^4.15.0",
|
|
31
31
|
"typescript": "^5.4.5",
|
|
32
32
|
"vite": "^5.2.8",
|
|
33
|
-
"@threlte/core": "8.0.0-next.
|
|
33
|
+
"@threlte/core": "8.0.0-next.7"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@dimforge/rapier3d-compat": ">=0.12",
|