@threlte/rapier 3.1.4 → 3.2.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 (51) hide show
  1. package/README.md +0 -4
  2. package/dist/components/Attractor/Attractor.svelte +58 -32
  3. package/dist/components/Attractor/Attractor.svelte.d.ts +2 -1
  4. package/dist/components/Attractor/types.d.ts +1 -1
  5. package/dist/components/Colliders/AutoColliders/AutoColliders.svelte +123 -76
  6. package/dist/components/Colliders/AutoColliders/AutoColliders.svelte.d.ts +15 -4
  7. package/dist/components/Colliders/AutoColliders/types.d.ts +2 -2
  8. package/dist/components/Colliders/AutoColliders/types.js +1 -1
  9. package/dist/components/Colliders/Collider/Collider.svelte +181 -126
  10. package/dist/components/Colliders/Collider/Collider.svelte.d.ts +13 -4
  11. package/dist/components/Colliders/Collider/types.d.ts +2 -2
  12. package/dist/components/Colliders/Collider/types.js +1 -1
  13. package/dist/components/CollisionGroups/CollisionGroups.svelte +27 -7
  14. package/dist/components/CollisionGroups/CollisionGroups.svelte.d.ts +11 -4
  15. package/dist/components/CollisionGroups/types.d.ts +1 -1
  16. package/dist/components/CollisionGroups/types.js +1 -1
  17. package/dist/components/Debug/Debug.svelte +28 -18
  18. package/dist/components/Debug/Debug.svelte.d.ts +2 -1
  19. package/dist/components/RigidBody/RigidBody.svelte +173 -113
  20. package/dist/components/RigidBody/RigidBody.svelte.d.ts +2 -1
  21. package/dist/components/RigidBody/types.d.ts +4 -4
  22. package/dist/components/RigidBody/types.js +1 -2
  23. package/dist/components/World/InnerWorld.svelte +53 -22
  24. package/dist/components/World/InnerWorld.svelte.d.ts +2 -1
  25. package/dist/components/World/World.svelte +6 -3
  26. package/dist/components/World/World.svelte.d.ts +2 -1
  27. package/dist/components/World/types.d.ts +2 -2
  28. package/dist/components/World/types.js +1 -1
  29. package/dist/hooks/useFixedJoint.js +2 -2
  30. package/dist/hooks/useJoint.d.ts +1 -1
  31. package/dist/hooks/useJoint.js +1 -1
  32. package/dist/hooks/usePhysicsTask.js +1 -1
  33. package/dist/hooks/usePrismaticJoint.js +2 -2
  34. package/dist/hooks/useRapier.d.ts +1 -1
  35. package/dist/hooks/useRevoluteJoint.js +2 -2
  36. package/dist/hooks/useRigidBody.d.ts +1 -1
  37. package/dist/hooks/useRopeJoint.js +2 -2
  38. package/dist/hooks/useSphericalJoint.js +2 -2
  39. package/dist/index.d.ts +12 -12
  40. package/dist/index.js +11 -11
  41. package/dist/lib/applyColliderActiveEvents.d.ts +1 -1
  42. package/dist/lib/createCollidersFromChildren.d.ts +1 -1
  43. package/dist/lib/createPhysicsStages.d.ts +1 -1
  44. package/dist/lib/createPhysicsStages.js +1 -1
  45. package/dist/lib/createPhysicsTasks.d.ts +1 -1
  46. package/dist/lib/createPhysicsTasks.js +1 -1
  47. package/dist/lib/createRapierContext.d.ts +1 -1
  48. package/dist/lib/createRapierContext.js +2 -2
  49. package/dist/lib/scaleColliderArgs.d.ts +1 -1
  50. package/dist/lib/useCreateEvent.d.ts +1 -1
  51. package/package.json +11 -12
@@ -1,151 +1,206 @@
1
1
  <script
2
2
  lang="ts"
3
3
  generics="TShape extends Shape, TMassDef extends MassDef"
4
- >import { ActiveCollisionTypes, CoefficientCombineRule, ColliderDesc } from '@dimforge/rapier3d-compat';
5
- import { createParentObject3DContext, useParentObject3D, useTask, watch } from '@threlte/core';
6
- import { onDestroy, onMount, tick } from 'svelte';
7
- import { Object3D, Quaternion, Vector3 } from 'three';
8
- import { useCollisionGroups } from '../../../hooks/useCollisionGroups';
9
- import { useRapier } from '../../../hooks/useRapier';
10
- import { useRigidBody } from '../../../hooks/useRigidBody';
11
- import { applyColliderActiveEvents } from '../../../lib/applyColliderActiveEvents';
12
- import { eulerToQuaternion } from '../../../lib/eulerToQuaternion';
13
- import { getWorldPosition, getWorldQuaternion } from '../../../lib/getWorldTransforms';
14
- import { useParentRigidbodyObject } from '../../../lib/rigidBodyObjectContext';
15
- import { scaleColliderArgs } from '../../../lib/scaleColliderArgs';
16
- import { useCreateEvent } from '../../../lib/useCreateEvent';
17
- let { shape, args, type, restitution, restitutionCombineRule, friction, frictionCombineRule, sensor, contactForceEventThreshold, density, mass, centerOfMass, principalAngularInertia, angularInertiaLocalFrame, collider = $bindable(), oncreate, oncollisionenter, oncollisionexit, oncontact, onsensorenter, onsensorexit, children } = $props();
18
- const object = new Object3D();
19
- const { updateRef } = useCreateEvent(oncreate);
20
- const rigidBody = useRigidBody();
21
- const parentRigidBodyObject = useParentRigidbodyObject();
22
- const hasRigidBodyParent = !!rigidBody;
23
- const rapierContext = useRapier();
24
- const { world } = rapierContext;
25
- const collisionGroups = useCollisionGroups();
26
- const events = {
4
+ >
5
+ import {
6
+ ActiveCollisionTypes,
7
+ CoefficientCombineRule,
8
+ ColliderDesc
9
+ } from '@dimforge/rapier3d-compat'
10
+ import { createParentObject3DContext, useParentObject3D, useTask, watch } from '@threlte/core'
11
+ import { onDestroy, onMount, tick } from 'svelte'
12
+ import { Object3D, Quaternion, Vector3 } from 'three'
13
+ import { useCollisionGroups } from '../../../hooks/useCollisionGroups.js'
14
+ import { useRapier } from '../../../hooks/useRapier.js'
15
+ import { useRigidBody } from '../../../hooks/useRigidBody.js'
16
+ import { applyColliderActiveEvents } from '../../../lib/applyColliderActiveEvents.js'
17
+ import { eulerToQuaternion } from '../../../lib/eulerToQuaternion.js'
18
+ import { getWorldPosition, getWorldQuaternion } from '../../../lib/getWorldTransforms.js'
19
+ import { useParentRigidbodyObject } from '../../../lib/rigidBodyObjectContext.js'
20
+ import { scaleColliderArgs } from '../../../lib/scaleColliderArgs.js'
21
+ import { useCreateEvent } from '../../../lib/useCreateEvent.js'
22
+ import type { ColliderProps, MassDef, Shape } from './types.js'
23
+
24
+ let {
25
+ shape,
26
+ args,
27
+ type,
28
+ restitution,
29
+ restitutionCombineRule,
30
+ friction,
31
+ frictionCombineRule,
32
+ sensor,
33
+ contactForceEventThreshold,
34
+ density,
35
+ mass,
36
+ centerOfMass,
37
+ principalAngularInertia,
38
+ angularInertiaLocalFrame,
39
+ collider = $bindable(),
40
+ oncreate,
41
+ oncollisionenter,
42
+ oncollisionexit,
43
+ oncontact,
44
+ onsensorenter,
45
+ onsensorexit,
46
+ children
47
+ }: ColliderProps<TShape, TMassDef> = $props()
48
+
49
+ const object = new Object3D()
50
+
51
+ const { updateRef } = useCreateEvent(oncreate)
52
+ const rigidBody = useRigidBody()
53
+ const parentRigidBodyObject = useParentRigidbodyObject()
54
+ const hasRigidBodyParent = !!rigidBody
55
+
56
+ const rapierContext = useRapier()
57
+ const { world } = rapierContext
58
+
59
+ const collisionGroups = useCollisionGroups()
60
+
61
+ const events = {
27
62
  oncollisionenter,
28
63
  oncollisionexit,
29
64
  oncontact,
30
65
  onsensorenter,
31
66
  onsensorexit
32
- };
33
- /**
34
- * Actual collider setup happens onMount as only then
35
- * the transforms are finished.
36
- */
37
- onMount(async () => {
38
- await tick();
39
- const scale = object.getWorldScale(new Vector3());
40
- const scaledArgs = scaleColliderArgs(shape, args, scale);
67
+ }
68
+
69
+ /**
70
+ * Actual collider setup happens onMount as only then
71
+ * the transforms are finished.
72
+ */
73
+ onMount(async () => {
74
+ await tick()
75
+
76
+ const scale = object.getWorldScale(new Vector3())
77
+
78
+ const scaledArgs = scaleColliderArgs(shape, args, scale)
79
+
41
80
  // @ts-expect-error
42
- const colliderDesc = ColliderDesc[shape](...scaledArgs);
43
- collider = world.createCollider(colliderDesc, rigidBody);
44
- collider.setActiveCollisionTypes(ActiveCollisionTypes.ALL);
45
- updateRef(collider);
81
+ const colliderDesc = ColliderDesc[shape](...scaledArgs) as ColliderDesc
82
+
83
+ collider = world.createCollider(colliderDesc, rigidBody)
84
+ collider.setActiveCollisionTypes(ActiveCollisionTypes.ALL)
85
+ updateRef(collider)
86
+
46
87
  /**
47
88
  * Add collider to context
48
89
  */
49
- rapierContext.addColliderToContext(collider, object, events);
90
+ rapierContext.addColliderToContext(collider, object, events)
91
+
50
92
  /**
51
93
  * For use in conjunction with component <CollisionGroups>
52
94
  */
53
- collisionGroups.registerColliders([collider]);
95
+ collisionGroups.registerColliders([collider])
96
+
54
97
  if (hasRigidBodyParent) {
55
- const rigidBodyWorldPos = new Vector3();
56
- const rigidBodyWorldQuatInversed = new Quaternion();
57
- parentRigidBodyObject?.getWorldPosition(rigidBodyWorldPos);
58
- parentRigidBodyObject?.getWorldQuaternion(rigidBodyWorldQuatInversed);
59
- rigidBodyWorldQuatInversed.invert();
60
- const worldPosition = object.getWorldPosition(new Vector3()).sub(rigidBodyWorldPos);
61
- const worldRotation = object
62
- .getWorldQuaternion(new Quaternion())
63
- .premultiply(rigidBodyWorldQuatInversed);
64
- collider.setTranslationWrtParent(worldPosition);
65
- collider.setRotationWrtParent(worldRotation);
66
- }
67
- else {
68
- collider.setTranslation(object.getWorldPosition(new Vector3()));
69
- collider.setRotation(object.getWorldQuaternion(new Quaternion()));
98
+ const rigidBodyWorldPos = new Vector3()
99
+ const rigidBodyWorldQuatInversed = new Quaternion()
100
+
101
+ parentRigidBodyObject?.getWorldPosition(rigidBodyWorldPos)
102
+ parentRigidBodyObject?.getWorldQuaternion(rigidBodyWorldQuatInversed)
103
+ rigidBodyWorldQuatInversed.invert()
104
+
105
+ const worldPosition = object.getWorldPosition(new Vector3()).sub(rigidBodyWorldPos)
106
+ const worldRotation = object
107
+ .getWorldQuaternion(new Quaternion())
108
+ .premultiply(rigidBodyWorldQuatInversed)
109
+
110
+ collider.setTranslationWrtParent(worldPosition)
111
+ collider.setRotationWrtParent(worldRotation)
112
+ } else {
113
+ collider.setTranslation(object.getWorldPosition(new Vector3()))
114
+ collider.setRotation(object.getWorldQuaternion(new Quaternion()))
70
115
  }
71
- });
72
- $effect.pre(() => {
73
- collider?.setRestitution(restitution ?? 0);
74
- });
75
- $effect.pre(() => {
76
- collider?.setRestitutionCombineRule(restitutionCombineRule ?? CoefficientCombineRule.Average);
77
- });
78
- $effect.pre(() => {
79
- collider?.setFriction(friction ?? 0.7);
80
- });
81
- $effect.pre(() => {
82
- collider?.setFrictionCombineRule(frictionCombineRule ?? CoefficientCombineRule.Average);
83
- });
84
- $effect.pre(() => collider?.setSensor(sensor ?? false));
85
- $effect.pre(() => collider?.setContactForceEventThreshold(contactForceEventThreshold ?? 0));
86
- $effect.pre(() => {
87
- if (density !== undefined)
88
- collider?.setDensity(density);
89
- });
90
- $effect.pre(() => {
116
+ })
117
+
118
+ $effect.pre(() => {
119
+ collider?.setRestitution(restitution ?? 0)
120
+ })
121
+ $effect.pre(() => {
122
+ collider?.setRestitutionCombineRule(restitutionCombineRule ?? CoefficientCombineRule.Average)
123
+ })
124
+ $effect.pre(() => {
125
+ collider?.setFriction(friction ?? 0.7)
126
+ })
127
+ $effect.pre(() => {
128
+ collider?.setFrictionCombineRule(frictionCombineRule ?? CoefficientCombineRule.Average)
129
+ })
130
+ $effect.pre(() => collider?.setSensor(sensor ?? false))
131
+ $effect.pre(() => collider?.setContactForceEventThreshold(contactForceEventThreshold ?? 0))
132
+ $effect.pre(() => {
133
+ if (density !== undefined) collider?.setDensity(density)
134
+ })
135
+
136
+ $effect.pre(() => {
91
137
  if (collider && mass) {
92
- if (centerOfMass && principalAngularInertia && angularInertiaLocalFrame) {
93
- collider.setMassProperties(mass, { x: centerOfMass[0], y: centerOfMass[1], z: centerOfMass[2] }, {
94
- x: principalAngularInertia[0],
95
- y: principalAngularInertia[1],
96
- z: principalAngularInertia[2]
97
- }, eulerToQuaternion(angularInertiaLocalFrame));
98
- }
99
- else {
100
- collider.setMass(mass);
101
- }
138
+ if (centerOfMass && principalAngularInertia && angularInertiaLocalFrame) {
139
+ collider.setMassProperties(
140
+ mass,
141
+ { x: centerOfMass[0], y: centerOfMass[1], z: centerOfMass[2] },
142
+ {
143
+ x: principalAngularInertia[0],
144
+ y: principalAngularInertia[1],
145
+ z: principalAngularInertia[2]
146
+ },
147
+ eulerToQuaternion(angularInertiaLocalFrame)
148
+ )
149
+ } else {
150
+ collider.setMass(mass)
151
+ }
102
152
  }
103
- });
104
- $effect.pre(() => {
153
+ })
154
+
155
+ $effect.pre(() => {
105
156
  if (collider) {
106
- applyColliderActiveEvents(collider, events, rigidBody?.userData?.events);
157
+ applyColliderActiveEvents(collider, events, rigidBody?.userData?.events)
158
+ }
159
+ })
160
+
161
+ export const refresh = () => {
162
+ if (!collider) return
163
+ collider.setTranslation(getWorldPosition(object))
164
+ collider.setRotation(getWorldQuaternion(object))
165
+ }
166
+
167
+ /**
168
+ * If the Collider isAttached (i.e. NOT child of a RigidBody), update the
169
+ * transforms on every frame.
170
+ */
171
+ const { start, stop } = useTask(
172
+ () => {
173
+ refresh()
174
+ },
175
+ {
176
+ autoStart: !hasRigidBodyParent && type === 'dynamic'
107
177
  }
108
- });
109
- export const refresh = () => {
110
- if (!collider)
111
- return;
112
- collider.setTranslation(getWorldPosition(object));
113
- collider.setRotation(getWorldQuaternion(object));
114
- };
115
- /**
116
- * If the Collider isAttached (i.e. NOT child of a RigidBody), update the
117
- * transforms on every frame.
118
- */
119
- const { start, stop } = useTask(() => {
120
- refresh();
121
- }, {
122
- autoStart: !hasRigidBodyParent && type === 'dynamic'
123
- });
124
- $effect.pre(() => {
125
- if (!hasRigidBodyParent && type === 'dynamic')
126
- start();
127
- else
128
- stop();
129
- });
130
- /**
131
- * Cleanup
132
- */
133
- onDestroy(() => {
134
- if (!collider)
135
- return;
136
- rapierContext.removeColliderFromContext(collider);
137
- collisionGroups.removeColliders([collider]);
138
- world.removeCollider(collider, true);
139
- collider = undefined;
140
- });
141
- const parent3DObject = useParentObject3D();
142
- createParentObject3DContext(object);
143
- watch(parent3DObject, (parent) => {
144
- parent?.add(object);
178
+ )
179
+
180
+ $effect.pre(() => {
181
+ if (!hasRigidBodyParent && type === 'dynamic') start()
182
+ else stop()
183
+ })
184
+
185
+ /**
186
+ * Cleanup
187
+ */
188
+ onDestroy(() => {
189
+ if (!collider) return
190
+ rapierContext.removeColliderFromContext(collider)
191
+ collisionGroups.removeColliders([collider])
192
+ world.removeCollider(collider, true)
193
+ collider = undefined
194
+ })
195
+
196
+ const parent3DObject = useParentObject3D()
197
+ createParentObject3DContext(object)
198
+ watch(parent3DObject, (parent) => {
199
+ parent?.add(object)
145
200
  return () => {
146
- parent?.remove(object);
147
- };
148
- });
201
+ parent?.remove(object)
202
+ }
203
+ })
149
204
  </script>
150
205
 
151
206
  {@render children?.({ collider })}
@@ -1,8 +1,17 @@
1
- import type { ColliderProps, MassDef, Shape } from './types';
1
+ import type { ColliderProps, MassDef, Shape } from './types.js';
2
+ declare function $$render<TShape extends Shape, TMassDef extends MassDef>(): {
3
+ props: ColliderProps<TShape, TMassDef>;
4
+ exports: {
5
+ refresh: () => void;
6
+ };
7
+ bindings: "collider";
8
+ slots: {};
9
+ events: {};
10
+ };
2
11
  declare class __sveltets_Render<TShape extends Shape, TMassDef extends MassDef> {
3
- props(): ColliderProps<TShape, TMassDef>;
4
- events(): {};
5
- slots(): {};
12
+ props(): ReturnType<typeof $$render<TShape, TMassDef>>['props'];
13
+ events(): ReturnType<typeof $$render<TShape, TMassDef>>['events'];
14
+ slots(): ReturnType<typeof $$render<TShape, TMassDef>>['slots'];
6
15
  bindings(): "collider";
7
16
  exports(): {
8
17
  refresh: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { CoefficientCombineRule, Collider, ColliderDesc, Collider as RapierCollider } from '@dimforge/rapier3d-compat';
2
- import { type Snippet } from 'svelte';
2
+ import type { Snippet } from 'svelte';
3
3
  import type { Euler, Vector3 } from 'three';
4
- import type { ColliderEvents, CreateEvent } from '../../../types/types';
4
+ import type { ColliderEvents, CreateEvent } from '../../../types/types.js';
5
5
  type Type = 'static' | 'dynamic';
6
6
  type BaseProps = {
7
7
  /**
@@ -1 +1 @@
1
- import {} from 'svelte';
1
+ export {};
@@ -1,13 +1,33 @@
1
1
  <script
2
2
  lang="ts"
3
3
  generics="TGroupsDef extends GroupsDef"
4
- >import { setContext } from 'svelte';
5
- import { writable } from 'svelte/store';
6
- import { computeBitMask } from '../../lib/computeBitMask';
7
- let { groups, filter, memberships, children } = $props();
8
- const store = writable(computeBitMask(groups, filter, memberships));
9
- $effect.pre(() => store.set(computeBitMask(groups, filter, memberships)));
10
- setContext('threlte-rapier-collision-group', store);
4
+ >
5
+ import { setContext } from 'svelte'
6
+ import { writable } from 'svelte/store'
7
+ import { computeBitMask } from '../../lib/computeBitMask.js'
8
+ import type { CollisionGroupsContext } from '../../types/types.js'
9
+ import type { CollisionGroupsProps, Groups, GroupsDef, MembershipsAndFilter } from './types.js'
10
+
11
+ let { groups, filter, memberships, children }: CollisionGroupsProps<TGroupsDef> = $props()
12
+
13
+ const store = writable<number>(
14
+ computeBitMask(
15
+ groups as Groups,
16
+ filter as MembershipsAndFilter,
17
+ memberships as MembershipsAndFilter
18
+ )
19
+ )
20
+ $effect.pre(() =>
21
+ store.set(
22
+ computeBitMask(
23
+ groups as Groups,
24
+ filter as MembershipsAndFilter,
25
+ memberships as MembershipsAndFilter
26
+ )
27
+ )
28
+ )
29
+
30
+ setContext<NonNullable<CollisionGroupsContext>>('threlte-rapier-collision-group', store)
11
31
  </script>
12
32
 
13
33
  {@render children?.()}
@@ -1,8 +1,15 @@
1
- import type { CollisionGroupsProps, GroupsDef } from './types';
1
+ import type { CollisionGroupsProps, GroupsDef } from './types.js';
2
+ declare function $$render<TGroupsDef extends GroupsDef>(): {
3
+ props: CollisionGroupsProps<TGroupsDef>;
4
+ exports: {};
5
+ bindings: "";
6
+ slots: {};
7
+ events: {};
8
+ };
2
9
  declare class __sveltets_Render<TGroupsDef extends GroupsDef> {
3
- props(): CollisionGroupsProps<TGroupsDef>;
4
- events(): {};
5
- slots(): {};
10
+ props(): ReturnType<typeof $$render<TGroupsDef>>['props'];
11
+ events(): ReturnType<typeof $$render<TGroupsDef>>['events'];
12
+ slots(): ReturnType<typeof $$render<TGroupsDef>>['slots'];
6
13
  bindings(): "";
7
14
  exports(): {};
8
15
  }
@@ -1,4 +1,4 @@
1
- import { type Snippet } from 'svelte';
1
+ import type { Snippet } from 'svelte';
2
2
  type N = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15;
3
3
  export type Groups = N[];
4
4
  export type MembershipsAndFilter = N[];
@@ -1 +1 @@
1
- import {} from 'svelte';
1
+ export {};
@@ -1,21 +1,31 @@
1
- <script lang="ts">import { T, useTask } from '@threlte/core';
2
- import { onDestroy } from 'svelte';
3
- import { BufferAttribute, BufferGeometry, LineSegments } from 'three';
4
- import { useRapier } from '../../hooks/useRapier';
5
- let { ref = $bindable(new LineSegments()), ...props } = $props();
6
- const { world, debug } = useRapier();
7
- const geometry = new BufferGeometry();
8
- debug.set(true);
9
- useTask(() => {
10
- const buffers = world.debugRender();
11
- const vertices = new BufferAttribute(buffers.vertices, 3);
12
- const colors = new BufferAttribute(buffers.colors, 4);
13
- geometry.setAttribute('position', vertices);
14
- geometry.setAttribute('color', colors);
15
- });
16
- onDestroy(() => {
17
- debug.set(false);
18
- });
1
+ <script lang="ts">
2
+ import { T, useTask } from '@threlte/core'
3
+ import { onDestroy } from 'svelte'
4
+ import { BufferAttribute, BufferGeometry, LineSegments } from 'three'
5
+ import { useRapier } from '../../hooks/useRapier.js'
6
+ import type { DebugProps } from './types.js'
7
+
8
+ let { ref = $bindable(new LineSegments()), ...props }: DebugProps = $props()
9
+
10
+ const { world, debug } = useRapier()
11
+
12
+ const geometry = new BufferGeometry()
13
+
14
+ debug.set(true)
15
+
16
+ useTask(() => {
17
+ const buffers = world.debugRender()
18
+
19
+ const vertices = new BufferAttribute(buffers.vertices, 3)
20
+ const colors = new BufferAttribute(buffers.colors, 4)
21
+
22
+ geometry.setAttribute('position', vertices)
23
+ geometry.setAttribute('color', colors)
24
+ })
25
+
26
+ onDestroy(() => {
27
+ debug.set(false)
28
+ })
19
29
  </script>
20
30
 
21
31
  <T
@@ -1,3 +1,4 @@
1
- import type { DebugProps } from './types';
1
+ import type { DebugProps } from './types.js';
2
2
  declare const Debug: import("svelte").Component<DebugProps, {}, "ref">;
3
+ type Debug = ReturnType<typeof Debug>;
3
4
  export default Debug;