gaesup-world 0.2.36 → 0.2.37

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 (225) hide show
  1. package/dist/gaesup/animation/actions.d.ts +44 -0
  2. package/dist/gaesup/animation/actions.js +103 -0
  3. package/dist/gaesup/camera/control/normal.d.ts +4 -0
  4. package/dist/gaesup/camera/control/normal.js +18 -0
  5. package/dist/gaesup/camera/control/orbit.d.ts +4 -0
  6. package/dist/gaesup/camera/control/orbit.js +22 -0
  7. package/dist/gaesup/camera/detector/index.d.ts +2 -0
  8. package/dist/gaesup/camera/detector/index.js +25 -0
  9. package/dist/gaesup/camera/index.d.ts +8 -0
  10. package/dist/gaesup/camera/index.js +110 -0
  11. package/dist/gaesup/camera/type.d.ts +13 -0
  12. package/dist/gaesup/camera/type.js +1 -0
  13. package/dist/gaesup/component/active/airplane/index.d.ts +11 -0
  14. package/dist/gaesup/component/active/airplane/index.js +6 -0
  15. package/dist/gaesup/component/active/character/index.d.ts +7 -0
  16. package/dist/gaesup/component/active/character/index.js +34 -0
  17. package/dist/gaesup/component/active/vehicle/index.d.ts +12 -0
  18. package/dist/gaesup/component/active/vehicle/index.js +31 -0
  19. package/dist/gaesup/component/index.d.ts +7 -0
  20. package/dist/gaesup/component/index.js +19 -0
  21. package/dist/gaesup/component/inner/airplane/index.d.ts +2 -0
  22. package/dist/gaesup/component/inner/airplane/index.js +16 -0
  23. package/dist/gaesup/component/inner/character/index.d.ts +25 -0
  24. package/dist/gaesup/component/inner/character/index.js +28 -0
  25. package/dist/gaesup/component/inner/common/InnerGroupRef.d.ts +10 -0
  26. package/dist/gaesup/component/inner/common/InnerGroupRef.js +29 -0
  27. package/dist/gaesup/component/inner/common/OuterGroupRef.d.ts +4 -0
  28. package/dist/gaesup/component/inner/common/OuterGroupRef.js +6 -0
  29. package/dist/gaesup/component/inner/common/RigidbodyRef.d.ts +12 -0
  30. package/dist/gaesup/component/inner/common/RigidbodyRef.js +7 -0
  31. package/dist/gaesup/component/inner/common/setGroundRay.d.ts +9 -0
  32. package/dist/gaesup/component/inner/common/setGroundRay.js +14 -0
  33. package/dist/gaesup/component/inner/common/type.d.ts +20 -0
  34. package/dist/gaesup/component/inner/common/type.js +1 -0
  35. package/dist/gaesup/component/inner/rider/index.d.ts +11 -0
  36. package/dist/gaesup/component/inner/rider/index.js +31 -0
  37. package/dist/gaesup/component/inner/vehicle/collider.d.ts +10 -0
  38. package/dist/gaesup/component/inner/vehicle/collider.js +19 -0
  39. package/dist/gaesup/component/inner/vehicle/index.d.ts +2 -0
  40. package/dist/gaesup/component/inner/vehicle/index.js +17 -0
  41. package/dist/gaesup/component/inner/vehicle/wheels.d.ts +7 -0
  42. package/dist/gaesup/component/inner/vehicle/wheels.js +64 -0
  43. package/dist/gaesup/component/passive/airplane/index.d.ts +13 -0
  44. package/dist/gaesup/component/passive/airplane/index.js +40 -0
  45. package/dist/gaesup/component/passive/character/index.d.ts +10 -0
  46. package/dist/gaesup/component/passive/character/index.js +46 -0
  47. package/dist/gaesup/component/passive/type.d.ts +20 -0
  48. package/dist/gaesup/component/passive/type.js +1 -0
  49. package/dist/gaesup/component/passive/vehicle/index.d.ts +13 -0
  50. package/dist/gaesup/component/passive/vehicle/index.js +17 -0
  51. package/dist/gaesup/component/type.d.ts +17 -0
  52. package/dist/gaesup/component/type.js +1 -0
  53. package/dist/gaesup/controller/context/index.d.ts +49 -0
  54. package/dist/gaesup/controller/context/index.js +59 -0
  55. package/dist/gaesup/controller/context/reducer.d.ts +12 -0
  56. package/dist/gaesup/controller/context/reducer.js +21 -0
  57. package/dist/gaesup/controller/context/type.d.ts +38 -0
  58. package/dist/gaesup/controller/context/type.js +1 -0
  59. package/dist/gaesup/controller/debug/airplane.d.ts +71 -0
  60. package/dist/gaesup/controller/debug/airplane.js +71 -0
  61. package/dist/gaesup/controller/debug/character.d.ts +27 -0
  62. package/dist/gaesup/controller/debug/character.js +27 -0
  63. package/dist/gaesup/controller/debug/index.d.ts +6 -0
  64. package/dist/gaesup/controller/debug/index.js +49 -0
  65. package/dist/gaesup/controller/debug/vehicle.d.ts +27 -0
  66. package/dist/gaesup/controller/debug/vehicle.js +27 -0
  67. package/dist/gaesup/controller/index.d.ts +3 -0
  68. package/dist/gaesup/controller/index.js +75 -0
  69. package/dist/gaesup/controller/initialize/callback/index.d.ts +2 -0
  70. package/dist/gaesup/controller/initialize/callback/index.js +62 -0
  71. package/dist/gaesup/controller/initialize/callback/type.d.ts +27 -0
  72. package/dist/gaesup/controller/initialize/callback/type.js +1 -0
  73. package/dist/gaesup/controller/initialize/index.d.ts +10 -0
  74. package/dist/gaesup/controller/initialize/index.js +75 -0
  75. package/dist/gaesup/controller/style.css +48 -0
  76. package/dist/gaesup/controller/type.d.ts +85 -0
  77. package/dist/gaesup/controller/type.js +1 -0
  78. package/dist/gaesup/gaesupProps/index.d.ts +7 -0
  79. package/dist/gaesup/gaesupProps/index.js +46 -0
  80. package/dist/gaesup/hooks/useGaesupAnimation/index.d.ts +10 -0
  81. package/dist/gaesup/hooks/useGaesupAnimation/index.js +95 -0
  82. package/dist/gaesup/hooks/useGaesupController/index.d.ts +10 -0
  83. package/dist/gaesup/hooks/useGaesupController/index.js +14 -0
  84. package/dist/gaesup/hooks/useGaesupGltf/index.d.ts +25 -0
  85. package/dist/gaesup/hooks/useGaesupGltf/index.js +73 -0
  86. package/dist/gaesup/hooks/useJoyStick/index.d.ts +39 -0
  87. package/dist/gaesup/hooks/useJoyStick/index.js +61 -0
  88. package/dist/gaesup/hooks/usePushKey/index.d.ts +3 -0
  89. package/dist/gaesup/hooks/usePushKey/index.js +29 -0
  90. package/dist/gaesup/hooks/useRideable/index.d.ts +28 -0
  91. package/dist/gaesup/hooks/useRideable/index.js +199 -0
  92. package/dist/gaesup/hooks/useTeleport/index.d.ts +3 -0
  93. package/dist/gaesup/hooks/useTeleport/index.js +12 -0
  94. package/dist/gaesup/physics/airplane/damping.d.ts +2 -0
  95. package/dist/gaesup/physics/airplane/damping.js +5 -0
  96. package/dist/gaesup/physics/airplane/direction.d.ts +2 -0
  97. package/dist/gaesup/physics/airplane/direction.js +65 -0
  98. package/dist/gaesup/physics/airplane/gravity.d.ts +14 -0
  99. package/dist/gaesup/physics/airplane/gravity.js +18 -0
  100. package/dist/gaesup/physics/airplane/impulse.d.ts +16 -0
  101. package/dist/gaesup/physics/airplane/impulse.js +31 -0
  102. package/dist/gaesup/physics/airplane/index.d.ts +2 -0
  103. package/dist/gaesup/physics/airplane/index.js +14 -0
  104. package/dist/gaesup/physics/airplane/innerCalc.d.ts +2 -0
  105. package/dist/gaesup/physics/airplane/innerCalc.js +27 -0
  106. package/dist/gaesup/physics/airplane/landing.d.ts +2 -0
  107. package/dist/gaesup/physics/airplane/landing.js +29 -0
  108. package/dist/gaesup/physics/character/direction.d.ts +23 -0
  109. package/dist/gaesup/physics/character/direction.js +55 -0
  110. package/dist/gaesup/physics/character/impulse.d.ts +2 -0
  111. package/dist/gaesup/physics/character/impulse.js +43 -0
  112. package/dist/gaesup/physics/character/index.d.ts +2 -0
  113. package/dist/gaesup/physics/character/index.js +8 -0
  114. package/dist/gaesup/physics/character/innerCalc.d.ts +2 -0
  115. package/dist/gaesup/physics/character/innerCalc.js +31 -0
  116. package/dist/gaesup/physics/check/ground.d.ts +2 -0
  117. package/dist/gaesup/physics/check/ground.js +15 -0
  118. package/dist/gaesup/physics/check/index.d.ts +2 -0
  119. package/dist/gaesup/physics/check/index.js +12 -0
  120. package/dist/gaesup/physics/check/moving.d.ts +2 -0
  121. package/dist/gaesup/physics/check/moving.js +16 -0
  122. package/dist/gaesup/physics/check/push.d.ts +2 -0
  123. package/dist/gaesup/physics/check/push.js +6 -0
  124. package/dist/gaesup/physics/check/riding.d.ts +2 -0
  125. package/dist/gaesup/physics/check/riding.js +7 -0
  126. package/dist/gaesup/physics/check/rotate.d.ts +2 -0
  127. package/dist/gaesup/physics/check/rotate.js +8 -0
  128. package/dist/gaesup/physics/index.d.ts +2 -0
  129. package/dist/gaesup/physics/index.js +58 -0
  130. package/dist/gaesup/physics/type.d.ts +36 -0
  131. package/dist/gaesup/physics/type.js +1 -0
  132. package/dist/gaesup/physics/vehicle/damping.d.ts +2 -0
  133. package/dist/gaesup/physics/vehicle/damping.js +6 -0
  134. package/dist/gaesup/physics/vehicle/direction.d.ts +4 -0
  135. package/dist/gaesup/physics/vehicle/direction.js +30 -0
  136. package/dist/gaesup/physics/vehicle/impulse.d.ts +16 -0
  137. package/dist/gaesup/physics/vehicle/impulse.js +40 -0
  138. package/dist/gaesup/physics/vehicle/index.d.ts +2 -0
  139. package/dist/gaesup/physics/vehicle/index.js +12 -0
  140. package/dist/gaesup/physics/vehicle/innerCalc.d.ts +2 -0
  141. package/dist/gaesup/physics/vehicle/innerCalc.js +24 -0
  142. package/dist/gaesup/physics/vehicle/landing.d.ts +2 -0
  143. package/dist/gaesup/physics/vehicle/landing.js +29 -0
  144. package/dist/gaesup/tools/gameBoy/GameBoyButton.d.ts +9 -0
  145. package/dist/gaesup/tools/gameBoy/GameBoyButton.js +16 -0
  146. package/dist/gaesup/tools/gameBoy/index.d.ts +8 -0
  147. package/dist/gaesup/tools/gameBoy/index.js +22 -0
  148. package/dist/gaesup/tools/gameBoy/style.css +92 -0
  149. package/dist/gaesup/tools/gameBoy/type.d.ts +4 -0
  150. package/dist/gaesup/tools/gameBoy/type.js +1 -0
  151. package/dist/gaesup/tools/gamePad/GamePadButton.d.ts +8 -0
  152. package/dist/gaesup/tools/gamePad/GamePadButton.js +21 -0
  153. package/dist/gaesup/tools/gamePad/index.d.ts +6 -0
  154. package/dist/gaesup/tools/gamePad/index.js +32 -0
  155. package/dist/gaesup/tools/gamePad/style.css +62 -0
  156. package/dist/gaesup/tools/gamePad/type.d.ts +6 -0
  157. package/dist/gaesup/tools/gamePad/type.js +1 -0
  158. package/dist/gaesup/tools/joyStick/index.d.ts +6 -0
  159. package/dist/gaesup/tools/joyStick/index.js +169 -0
  160. package/dist/gaesup/tools/joyStick/style.css +38 -0
  161. package/dist/gaesup/tools/joyStick/type.d.ts +19 -0
  162. package/dist/gaesup/tools/joyStick/type.js +1 -0
  163. package/dist/gaesup/tools/jumpPortal/index.d.ts +16 -0
  164. package/dist/gaesup/tools/jumpPortal/index.js +18 -0
  165. package/dist/gaesup/tools/jumpPortal/style.css +16 -0
  166. package/dist/gaesup/tools/keyBoardToolTip/constant.d.ts +402 -0
  167. package/dist/gaesup/tools/keyBoardToolTip/constant.js +122 -0
  168. package/dist/gaesup/tools/keyBoardToolTip/default.d.ts +10 -0
  169. package/dist/gaesup/tools/keyBoardToolTip/default.js +12 -0
  170. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +3 -0
  171. package/dist/gaesup/tools/keyBoardToolTip/index.js +70 -0
  172. package/dist/gaesup/tools/keyBoardToolTip/style.css +24 -0
  173. package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +37 -0
  174. package/dist/gaesup/tools/keyBoardToolTip/type.js +1 -0
  175. package/dist/gaesup/tools/miniMap/default.d.ts +9 -0
  176. package/dist/gaesup/tools/miniMap/default.js +9 -0
  177. package/dist/gaesup/tools/miniMap/index.d.ts +3 -0
  178. package/dist/gaesup/tools/miniMap/index.js +72 -0
  179. package/dist/gaesup/tools/miniMap/style.css +228 -0
  180. package/dist/gaesup/tools/miniMap/type.d.ts +25 -0
  181. package/dist/gaesup/tools/miniMap/type.js +1 -0
  182. package/dist/gaesup/tools/rideable/index.d.ts +3 -0
  183. package/dist/gaesup/tools/rideable/index.js +79 -0
  184. package/dist/gaesup/tools/rideable/style.css +16 -0
  185. package/dist/gaesup/tools/type.d.ts +2 -0
  186. package/dist/gaesup/tools/type.js +1 -0
  187. package/dist/gaesup/tools/zoomButton/index.d.ts +18 -0
  188. package/dist/gaesup/tools/zoomButton/index.js +146 -0
  189. package/dist/gaesup/tools/zoomButton/style.css +16 -0
  190. package/dist/gaesup/utils/context.d.ts +2 -0
  191. package/dist/gaesup/utils/context.js +3 -0
  192. package/dist/gaesup/utils/debug.d.ts +29 -0
  193. package/dist/gaesup/utils/debug.js +36 -0
  194. package/dist/gaesup/utils/index.d.ts +3 -0
  195. package/dist/gaesup/utils/index.js +3 -0
  196. package/dist/gaesup/utils/ray.d.ts +7 -0
  197. package/dist/gaesup/utils/ray.js +6 -0
  198. package/dist/gaesup/utils/ref.d.ts +2 -0
  199. package/dist/gaesup/utils/ref.js +16 -0
  200. package/dist/gaesup/utils/type.d.ts +5 -0
  201. package/dist/gaesup/utils/type.js +1 -0
  202. package/dist/gaesup/utils/vector.d.ts +10 -0
  203. package/dist/gaesup/utils/vector.js +33 -0
  204. package/dist/gaesup/world/context/index.d.ts +6 -0
  205. package/dist/gaesup/world/context/index.js +117 -0
  206. package/dist/gaesup/world/context/reducer.d.ts +29 -0
  207. package/dist/gaesup/world/context/reducer.js +21 -0
  208. package/dist/gaesup/world/context/type.d.ts +169 -0
  209. package/dist/gaesup/world/context/type.js +1 -0
  210. package/dist/gaesup/world/debug/cameraOption.d.ts +47 -0
  211. package/dist/gaesup/world/debug/cameraOption.js +47 -0
  212. package/dist/gaesup/world/debug/index.d.ts +6 -0
  213. package/dist/gaesup/world/debug/index.js +32 -0
  214. package/dist/gaesup/world/debug/mode.d.ts +10 -0
  215. package/dist/gaesup/world/debug/mode.js +10 -0
  216. package/dist/gaesup/world/index.d.ts +3 -0
  217. package/dist/gaesup/world/index.js +10 -0
  218. package/dist/gaesup/world/initalize/index.d.ts +35 -0
  219. package/dist/gaesup/world/initalize/index.js +62 -0
  220. package/dist/gaesup/world/style.css +13 -0
  221. package/dist/gaesup/world/type.d.ts +19 -0
  222. package/dist/gaesup/world/type.js +1 -0
  223. package/dist/index.d.ts +23 -0
  224. package/dist/index.js +23 -0
  225. package/package.json +2 -1
@@ -0,0 +1,44 @@
1
+ import { Ref } from "react";
2
+ import { AnimationAction, AnimationClip, AnimationMixer, Object3D, Object3DEventMap } from "three";
3
+ import { groundRayType } from "../controller/type";
4
+ export type Api<T extends AnimationClip> = {
5
+ ref: React.MutableRefObject<Object3D | undefined | null>;
6
+ clips: AnimationClip[];
7
+ mixer: AnimationMixer;
8
+ names: T["name"][];
9
+ actions: {
10
+ [key in T["name"]]: AnimationAction | null;
11
+ };
12
+ };
13
+ export type playActionsType = {
14
+ type: "character" | "vehicle" | "airplane";
15
+ animationResult: Api<AnimationClip>;
16
+ currentAnimation?: string;
17
+ };
18
+ export type subscribeActionsType = {
19
+ type: "character" | "vehicle" | "airplane";
20
+ groundRay: groundRayType;
21
+ animations: AnimationClip[];
22
+ };
23
+ export type actionsType = {
24
+ [x: string]: THREE.AnimationAction | null;
25
+ };
26
+ export type playResultType = {
27
+ actions: actionsType;
28
+ ref: Ref<Object3D<Object3DEventMap>>;
29
+ };
30
+ export declare function subscribeActions({ type, groundRay, animations, }: subscribeActionsType): {
31
+ animationResult: {
32
+ ref: import("react").MutableRefObject<Object3D<Object3DEventMap>>;
33
+ clips: AnimationClip[];
34
+ mixer: AnimationMixer;
35
+ names: string[];
36
+ actions: {
37
+ [x: string]: AnimationAction;
38
+ };
39
+ };
40
+ };
41
+ export default function playActions({ type, animationResult, currentAnimation, }: playActionsType): {
42
+ animationRef: import("react").MutableRefObject<Object3D<Object3DEventMap>>;
43
+ currentAnimation: string;
44
+ };
@@ -0,0 +1,103 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { useAnimations } from "@react-three/drei";
13
+ import { useFrame } from "@react-three/fiber";
14
+ import { useContext, useEffect } from "react";
15
+ import { useGaesupAnimation } from "../hooks/useGaesupAnimation";
16
+ import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../world/context";
17
+ export function subscribeActions(_a) {
18
+ var type = _a.type, groundRay = _a.groundRay, animations = _a.animations;
19
+ var _b = useContext(GaesupWorldContext), states = _b.states, activeState = _b.activeState;
20
+ var subscribeAll = useGaesupAnimation({ type: type }).subscribeAll;
21
+ var animationResult = useAnimations(animations);
22
+ // 초기 기본 애니메이션 등록
23
+ useEffect(function () {
24
+ subscribeAll([
25
+ {
26
+ tag: "walk",
27
+ condition: function () { return !states.isRunning && states.isMoving; },
28
+ action: function () { },
29
+ animationName: "walk",
30
+ key: "walk",
31
+ },
32
+ {
33
+ tag: "run",
34
+ condition: function () { return states.isRunning; },
35
+ action: function () { },
36
+ animationName: "run",
37
+ key: "run",
38
+ },
39
+ {
40
+ tag: "jump",
41
+ condition: function () { return states.isJumping; },
42
+ action: function () { },
43
+ animationName: "jump",
44
+ key: "jump",
45
+ },
46
+ {
47
+ tag: "fall",
48
+ condition: function () { return groundRay.hit === null && activeState.velocity.y < 0; },
49
+ action: function () { },
50
+ animationName: "fall",
51
+ key: "fall",
52
+ },
53
+ {
54
+ tag: "ride",
55
+ condition: function () { return states.isPush["keyR"]; },
56
+ action: function () { },
57
+ animationName: "ride",
58
+ key: "ride",
59
+ },
60
+ ]);
61
+ }, []);
62
+ return {
63
+ animationResult: animationResult,
64
+ };
65
+ }
66
+ export default function playActions(_a) {
67
+ var _b;
68
+ var type = _a.type, animationResult = _a.animationResult, currentAnimation = _a.currentAnimation;
69
+ var _c = useContext(GaesupWorldContext), mode = _c.mode, animationState = _c.animationState;
70
+ var dispatch = useContext(GaesupWorldDispatchContext);
71
+ var _d = useGaesupAnimation({ type: type }), notify = _d.notify, store = _d.store;
72
+ var actions = animationResult.actions, ref = animationResult.ref;
73
+ var play = function (tag) {
74
+ animationState[type].current = tag;
75
+ var currentAnimation = store[tag];
76
+ if (currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.action) {
77
+ currentAnimation.action();
78
+ }
79
+ dispatch({
80
+ type: "update",
81
+ payload: {
82
+ animationState: __assign({}, animationState),
83
+ },
84
+ });
85
+ };
86
+ useEffect(function () {
87
+ var _a;
88
+ var action = (_a = actions[currentAnimation || animationState[type].current]) === null || _a === void 0 ? void 0 : _a.reset().fadeIn(0.2).play();
89
+ return function () {
90
+ action === null || action === void 0 ? void 0 : action.fadeOut(0.2);
91
+ };
92
+ }, [currentAnimation, mode.type]);
93
+ useFrame(function () {
94
+ if (!currentAnimation) {
95
+ var tag = notify();
96
+ play(tag);
97
+ }
98
+ });
99
+ return {
100
+ animationRef: ref,
101
+ currentAnimation: (_b = animationState === null || animationState === void 0 ? void 0 : animationState[type]) === null || _b === void 0 ? void 0 : _b.current,
102
+ };
103
+ }
@@ -0,0 +1,4 @@
1
+ import { cameraPropType } from "../../physics/type";
2
+ import { activeStateType, cameraOptionType } from "../../world/context/type";
3
+ export declare const makeNormalCameraPosition: (activeState: activeStateType, cameraOption: cameraOptionType) => import("three").Vector3;
4
+ export default function normal(prop: cameraPropType): void;
@@ -0,0 +1,18 @@
1
+ import { V3 } from "../../utils/vector";
2
+ export var makeNormalCameraPosition = function (activeState, cameraOption) {
3
+ var YDistance = cameraOption.YDistance, ZDistance = cameraOption.ZDistance;
4
+ var cameraPosition = activeState.position
5
+ .clone()
6
+ .add(V3(0, YDistance, ZDistance));
7
+ return cameraPosition;
8
+ };
9
+ export default function normal(prop) {
10
+ var state = prop.state, _a = prop.worldContext, activeState = _a.activeState, cameraOption = _a.cameraOption;
11
+ if (!state || !state.camera)
12
+ return;
13
+ var cameraPosition = activeState.position
14
+ .clone()
15
+ .add(V3(0, cameraOption.YDistance, cameraOption.ZDistance));
16
+ state.camera.position.lerp(cameraPosition, 1);
17
+ state.camera.lookAt(activeState.position.clone());
18
+ }
@@ -0,0 +1,4 @@
1
+ import { cameraPropType } from "../../physics/type";
2
+ import { activeStateType, cameraOptionType } from "../../world/context/type";
3
+ export declare const makeOrbitCameraPosition: (activeState: activeStateType, cameraOption: cameraOptionType) => import("three").Vector3;
4
+ export default function orbit(prop: cameraPropType): void;
@@ -0,0 +1,22 @@
1
+ import { quat } from "@react-three/rapier";
2
+ import { V3 } from "../../utils/vector";
3
+ export var makeOrbitCameraPosition = function (activeState, cameraOption) {
4
+ var XDistance = cameraOption.XDistance, YDistance = cameraOption.YDistance, ZDistance = cameraOption.ZDistance;
5
+ var cameraPosition = activeState.position.clone().add(V3(Math.sin(activeState.euler.y), 1, Math.cos(activeState.euler.y))
6
+ .normalize()
7
+ .clone()
8
+ .multiply(V3(-XDistance, YDistance, -ZDistance)));
9
+ return cameraPosition;
10
+ };
11
+ export default function orbit(prop) {
12
+ var state = prop.state, _a = prop.worldContext, activeState = _a.activeState, cameraOption = _a.cameraOption;
13
+ if (!state || !state.camera)
14
+ return;
15
+ var cameraPosition = makeOrbitCameraPosition(activeState, cameraOption);
16
+ state.camera.position.lerp(cameraPosition, 1);
17
+ state.camera.quaternion.copy(activeState.quat
18
+ .clone()
19
+ .multiply(quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)));
20
+ state.camera.rotation.copy(activeState.euler);
21
+ state.camera.lookAt(activeState.position.clone());
22
+ }
@@ -0,0 +1,2 @@
1
+ import { cameraPropType } from "../../physics/type";
2
+ export default function detector(cameraProp: cameraPropType): void;
@@ -0,0 +1,25 @@
1
+ import * as THREE from "three";
2
+ export default function detector(cameraProp) {
3
+ var cameraRay = cameraProp.cameraRay, intersectObjectMap = cameraProp.intersectObjectMap;
4
+ var intersects = cameraRay.rayCast.intersectObjects(Object.values(intersectObjectMap));
5
+ var intersectId = {};
6
+ intersects.map(function (_a) {
7
+ var object = _a.object;
8
+ if (object instanceof THREE.Mesh) {
9
+ intersectId[object.uuid] = true;
10
+ }
11
+ });
12
+ Object.values(intersectObjectMap).map(function (mesh) {
13
+ if (mesh instanceof THREE.Mesh && mesh.material instanceof THREE.Material) {
14
+ var material = mesh.material;
15
+ if (intersectId[mesh.uuid]) {
16
+ material.opacity = 0.2;
17
+ material.transparent = true;
18
+ }
19
+ else {
20
+ material.opacity = 1;
21
+ material.transparent = false;
22
+ }
23
+ }
24
+ });
25
+ }
@@ -0,0 +1,8 @@
1
+ import { controllerInnerType, refsType } from "../controller/type";
2
+ export default function Camera({ refs, prop, control, }: {
3
+ refs: refsType;
4
+ prop: controllerInnerType;
5
+ control: {
6
+ [key: string]: boolean;
7
+ };
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,110 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { CameraControls } from "@react-three/drei";
14
+ import { useFrame, useThree } from "@react-three/fiber";
15
+ import { vec3 } from "@react-three/rapier";
16
+ import { useContext, useEffect, useMemo, useRef } from "react";
17
+ import * as THREE from "three";
18
+ import { GaesupControllerContext } from "../controller/context";
19
+ import { GaesupWorldContext } from "../world/context";
20
+ import normal from "./control/normal";
21
+ import orbit from "./control/orbit";
22
+ import detector from "./detector";
23
+ export default function Camera(_a) {
24
+ var refs = _a.refs, prop = _a.prop, control = _a.control;
25
+ var worldContext = useContext(GaesupWorldContext);
26
+ var controllerContext = useContext(GaesupControllerContext);
27
+ var mode = worldContext.mode, cameraOption = worldContext.cameraOption;
28
+ var rigidBodyRef = refs.rigidBodyRef, outerGroupRef = refs.outerGroupRef;
29
+ var _b = useThree(), scene = _b.scene, camera = _b.camera;
30
+ var cameraRef = useRef();
31
+ var intersectObjectMap = useMemo(function () { return ({}); }, []);
32
+ var cameraProp = __assign(__assign({}, prop), { control: control, controllerContext: controllerContext, worldContext: worldContext, intersectObjectMap: intersectObjectMap });
33
+ var getMeshs = function (object) {
34
+ if (object.userData && object.userData.intangible)
35
+ return;
36
+ if (object instanceof THREE.Mesh &&
37
+ object.geometry.type !== "InstancedBufferGeometry") {
38
+ intersectObjectMap[object.uuid] = object;
39
+ }
40
+ object.children.forEach(function (child) {
41
+ getMeshs(child);
42
+ });
43
+ };
44
+ useEffect(function () {
45
+ scene.children.forEach(function (child) { return getMeshs(child); });
46
+ }, []);
47
+ var position = useMemo(function () { return camera.position; }, []);
48
+ var dir = useMemo(function () { return vec3(); }, []);
49
+ cameraProp.cameraRay.rayCast = new THREE.Raycaster(cameraProp.cameraRay.origin, cameraProp.cameraRay.dir, 0, -cameraOption.maxDistance);
50
+ useEffect(function () {
51
+ cameraProp.cameraRay.origin.copy(position);
52
+ cameraProp.cameraRay.dir.copy(camera.getWorldDirection(dir));
53
+ }, [cameraProp]);
54
+ useFrame(function (state, delta) {
55
+ if (!rigidBodyRef ||
56
+ !rigidBodyRef.current ||
57
+ !outerGroupRef ||
58
+ !outerGroupRef.current)
59
+ return;
60
+ cameraProp.delta = delta;
61
+ cameraProp.state = state;
62
+ if (!worldContext.block.camera) {
63
+ if (mode.control === "orbit") {
64
+ orbit(cameraProp);
65
+ }
66
+ else if (mode.control === "normal") {
67
+ normal(cameraProp);
68
+ }
69
+ detector(cameraProp);
70
+ }
71
+ });
72
+ // // moveTo 함수 정의
73
+ // worldContext.moveTo = async (
74
+ // position: THREE.Vector3,
75
+ // target: THREE.Vector3
76
+ // ) => {
77
+ // camera.position.copy(position);
78
+ // if (mode.control === "orbit") {
79
+ // await Promise.all([
80
+ // cameraRef.current.setPosition(position.x, position.y, position.z, true),
81
+ //
82
+ // camera.rotation.copy(worldContext.activeState.euler),
83
+ // cameraRef.current.setLookAt(
84
+ // position.x,
85
+ // position.y,
86
+ // position.z,
87
+ // target.x,
88
+ // target.y,
89
+ // target.z,
90
+ // true
91
+ // ),
92
+ // ]);
93
+ // } else if (mode.control === "normal") {
94
+ // await Promise.all([
95
+ // cameraRef.current.setPosition(0, position.y, position.z, true),
96
+ // camera.rotation.copy(worldContext.activeState.euler),
97
+ // cameraRef.current.setLookAt(
98
+ // 0,
99
+ // position.y,
100
+ // position.z,
101
+ // target.x,
102
+ // target.y,
103
+ // target.z,
104
+ // true
105
+ // ),
106
+ // ]);
107
+ // }
108
+ // };
109
+ return _jsx(CameraControls, { ref: cameraRef });
110
+ }
@@ -0,0 +1,13 @@
1
+ export type cameraRayType = {
2
+ origin: THREE.Vector3;
3
+ hit: THREE.Raycaster;
4
+ rayCast: THREE.Raycaster | null;
5
+ length: number;
6
+ dir: THREE.Vector3;
7
+ position: THREE.Vector3;
8
+ intersects: THREE.Intersection<THREE.Mesh>[];
9
+ detected: THREE.Intersection<THREE.Mesh>[];
10
+ intersectObjectMap: {
11
+ [uuid: string]: THREE.Mesh;
12
+ };
13
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from "react";
2
+ import { refsType } from "../../../controller/type";
3
+ import { urlsType } from "../../../world/context/type";
4
+ export declare function AirplaneRef({ children, enableRiding, isRiderOn, offset, refs, urls, }: {
5
+ children: ReactNode;
6
+ enableRiding?: boolean;
7
+ isRiderOn?: boolean;
8
+ offset?: THREE.Vector3;
9
+ refs: refsType;
10
+ urls: urlsType;
11
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { AirplaneInnerRef } from "../../inner/airplane";
3
+ export function AirplaneRef(_a) {
4
+ var children = _a.children, enableRiding = _a.enableRiding, isRiderOn = _a.isRiderOn, offset = _a.offset, refs = _a.refs, urls = _a.urls;
5
+ return (_jsx(AirplaneInnerRef, { refs: refs, urls: urls, isRiderOn: isRiderOn, enableRiding: enableRiding, offset: offset, children: children }));
6
+ }
@@ -0,0 +1,7 @@
1
+ import { controllerInnerType, refsType } from "../../../controller/type";
2
+ import { urlsType } from "../../../world/context/type";
3
+ export declare function CharacterRef({ props, refs, urls, }: {
4
+ props: controllerInnerType;
5
+ refs: refsType;
6
+ urls: urlsType;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,34 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { vec3 } from "@react-three/rapier";
3
+ import playActions, { subscribeActions } from "../../../animation/actions";
4
+ import initCallback from "../../../controller/initialize/callback";
5
+ import { useGltfAndSize } from "../../../hooks/useGaesupGltf";
6
+ import { CharacterInnerRef, calcCharacterColliderProps, } from "../../inner/character";
7
+ import { setGroundRay } from "../../inner/common/setGroundRay";
8
+ export function CharacterRef(_a) {
9
+ var props = _a.props, refs = _a.refs, urls = _a.urls;
10
+ initCallback(props, "character");
11
+ var colliderRef = refs.colliderRef;
12
+ var _b = useGltfAndSize({ url: urls.characterUrl }), size = _b.size, gltf = _b.gltf;
13
+ var collider = calcCharacterColliderProps(size);
14
+ props.groundRay.offset = vec3({
15
+ x: 0,
16
+ y: (collider === null || collider === void 0 ? void 0 : collider.halfHeight) ? -(collider === null || collider === void 0 ? void 0 : collider.halfHeight) : -1,
17
+ z: 0,
18
+ });
19
+ setGroundRay({
20
+ groundRay: props.groundRay,
21
+ length: (collider === null || collider === void 0 ? void 0 : collider.radius) || 0 + 2,
22
+ colliderRef: colliderRef,
23
+ });
24
+ var animationResult = subscribeActions({
25
+ type: "character",
26
+ groundRay: props.groundRay,
27
+ animations: gltf.animations,
28
+ }).animationResult;
29
+ var _c = playActions({
30
+ type: "character",
31
+ animationResult: animationResult,
32
+ }), animationRef = _c.animationRef, currentAnimation = _c.currentAnimation;
33
+ return (_jsx(CharacterInnerRef, { animationRef: animationRef, refs: refs, urls: urls, currentAnimation: currentAnimation, children: props.children }));
34
+ }
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from "react";
2
+ import { groundRayType, refsType } from "../../../controller/type";
3
+ import { urlsType } from "../../../world/context/type";
4
+ export declare function VehicleRef({ children, groundRay, enableRiding, isRiderOn, offset, refs, urls, }: {
5
+ children: ReactNode;
6
+ groundRay: groundRayType;
7
+ enableRiding?: boolean;
8
+ isRiderOn?: boolean;
9
+ offset?: THREE.Vector3;
10
+ refs: refsType;
11
+ urls: urlsType;
12
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { vec3 } from "@react-three/rapier";
3
+ import playActions, { subscribeActions } from "../../../animation/actions";
4
+ import { useGltfAndSize } from "../../../hooks/useGaesupGltf";
5
+ import { setGroundRay } from "../../inner/common/setGroundRay";
6
+ import { VehicleInnerRef } from "../../inner/vehicle";
7
+ export function VehicleRef(_a) {
8
+ var children = _a.children, groundRay = _a.groundRay, enableRiding = _a.enableRiding, isRiderOn = _a.isRiderOn, offset = _a.offset, refs = _a.refs, urls = _a.urls;
9
+ var colliderRef = refs.colliderRef;
10
+ var _b = useGltfAndSize({ url: urls.vehicleUrl }), size = _b.size, gltf = _b.gltf;
11
+ groundRay.offset = vec3({
12
+ x: 0,
13
+ y: size.y * 3,
14
+ z: 0,
15
+ });
16
+ setGroundRay({
17
+ groundRay: groundRay,
18
+ length: size.y * 3,
19
+ colliderRef: colliderRef,
20
+ });
21
+ var animationResult = subscribeActions({
22
+ type: "vehicle",
23
+ groundRay: groundRay,
24
+ animations: gltf.animations,
25
+ }).animationResult;
26
+ var _c = playActions({
27
+ type: "vehicle",
28
+ animationResult: animationResult,
29
+ }), animationRef = _c.animationRef, currentAnimation = _c.currentAnimation;
30
+ return (_jsx(VehicleInnerRef, { refs: refs, urls: urls, isRiderOn: isRiderOn, enableRiding: enableRiding, offset: offset, currentAnimation: currentAnimation, children: children }));
31
+ }
@@ -0,0 +1,7 @@
1
+ import { controllerInnerType, refsType } from "../controller/type";
2
+ import { urlsType } from "../world/context/type";
3
+ export declare function GaesupComponent({ props, refs, urls, }: {
4
+ props: controllerInnerType;
5
+ refs: refsType;
6
+ urls: urlsType;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { vec3 } from "@react-three/rapier";
3
+ import { useContext } from "react";
4
+ import calculation from "../physics";
5
+ import { GaesupWorldContext } from "../world/context";
6
+ import { AirplaneRef } from "./active/airplane";
7
+ import { CharacterRef } from "./active/character";
8
+ import { VehicleRef } from "./active/vehicle";
9
+ export function GaesupComponent(_a) {
10
+ var props = _a.props, refs = _a.refs, urls = _a.urls;
11
+ var _b = useContext(GaesupWorldContext), mode = _b.mode, states = _b.states, rideable = _b.rideable;
12
+ var enableRiding = states.enableRiding, isRiderOn = states.isRiderOn, rideableId = states.rideableId;
13
+ calculation(props);
14
+ return (_jsxs(_Fragment, { children: [mode.type === "character" && (_jsx(CharacterRef, { props: props, refs: refs, urls: urls })), mode.type === "vehicle" && (_jsx(VehicleRef, { groundRay: props.groundRay, refs: refs, urls: urls, enableRiding: enableRiding, isRiderOn: isRiderOn, offset: rideableId && rideable[rideableId]
15
+ ? rideable[rideableId].offset
16
+ : vec3(), children: props.children })), mode.type === "airplane" && (_jsx(AirplaneRef, { refs: refs, urls: urls, enableRiding: enableRiding, isRiderOn: isRiderOn, offset: rideableId && rideable[rideableId]
17
+ ? rideable[rideableId].offset
18
+ : vec3(), children: props.children }))] }));
19
+ }
@@ -0,0 +1,2 @@
1
+ import { refPropsType } from "../common/type";
2
+ export declare function AirplaneInnerRef({ children, refs, urls, isRiderOn, enableRiding, offset, name, position, rotation, userData, onCollisionEnter, }: refPropsType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CuboidCollider } from "@react-three/rapier";
3
+ import { useGltfAndSize } from "../../../hooks/useGaesupGltf";
4
+ import { InnerGroupRef } from "../common/InnerGroupRef";
5
+ import { OuterGroupRef } from "../common/OuterGroupRef";
6
+ import { RigidBodyRef } from "../common/RigidbodyRef";
7
+ import RiderRef from "../rider";
8
+ export function AirplaneInnerRef(_a) {
9
+ var children = _a.children, refs = _a.refs, urls = _a.urls, isRiderOn = _a.isRiderOn, enableRiding = _a.enableRiding, offset = _a.offset, name = _a.name, position = _a.position, rotation = _a.rotation, userData = _a.userData, onCollisionEnter = _a.onCollisionEnter;
10
+ var airplaneUrl = urls.airplaneUrl;
11
+ var rigidBodyRef = refs.rigidBodyRef, innerGroupRef = refs.innerGroupRef, outerGroupRef = refs.outerGroupRef;
12
+ var size = useGltfAndSize({
13
+ url: airplaneUrl,
14
+ }).size;
15
+ return (_jsx(OuterGroupRef, { ref: outerGroupRef, children: airplaneUrl && (_jsxs(RigidBodyRef, { ref: rigidBodyRef, name: name, position: position, rotation: rotation, userData: userData, onCollisionEnter: onCollisionEnter, children: [_jsx(CuboidCollider, { args: [size.x / 2, size.y / 2, size.z / 2], position: [0, size.y / 2, 0] }), children, _jsx(InnerGroupRef, { type: "airplane", url: airplaneUrl, currentAnimation: "idle", ref: innerGroupRef, children: enableRiding && isRiderOn && urls.characterUrl && (_jsx(RiderRef, { urls: urls, offset: offset })) })] })) }));
16
+ }
@@ -0,0 +1,25 @@
1
+ import { refsType } from "../../../controller/type";
2
+ import { ReactNode, Ref } from "react";
3
+ import { Object3D, Object3DEventMap } from "three";
4
+ import { urlsType } from "../../../world/context/type";
5
+ export declare const calcCharacterColliderProps: (characterSize: THREE.Vector3) => {
6
+ height: number;
7
+ halfHeight: number;
8
+ radius: number;
9
+ diameter: number;
10
+ };
11
+ export type characterColliderType = {
12
+ height: number;
13
+ halfHeight: number;
14
+ radius: number;
15
+ diameter: number;
16
+ };
17
+ export declare function CharacterInnerRef({ children, refs, urls, position, euler, currentAnimation, }: {
18
+ children: ReactNode;
19
+ refs: Partial<refsType>;
20
+ urls: urlsType;
21
+ position?: THREE.Vector3;
22
+ euler?: THREE.Euler;
23
+ animationRef?: Ref<Object3D<Object3DEventMap>>;
24
+ currentAnimation?: string;
25
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,28 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { CapsuleCollider } from "@react-three/rapier";
3
+ import { useGltfAndSize } from "../../../hooks/useGaesupGltf";
4
+ import { InnerGroupRef } from "../common/InnerGroupRef";
5
+ import { OuterGroupRef } from "../common/OuterGroupRef";
6
+ import { RigidBodyRef } from "../common/RigidbodyRef";
7
+ export var calcCharacterColliderProps = function (characterSize) {
8
+ if (!characterSize)
9
+ return null;
10
+ var heightPlusDiameter = characterSize.y / 2;
11
+ var diameter = Math.max(characterSize.x, characterSize.z);
12
+ var radius = diameter / 2;
13
+ var height = heightPlusDiameter - radius;
14
+ var halfHeight = height / 2;
15
+ return {
16
+ height: height,
17
+ halfHeight: halfHeight,
18
+ radius: radius,
19
+ diameter: diameter,
20
+ };
21
+ };
22
+ export function CharacterInnerRef(_a) {
23
+ var children = _a.children, refs = _a.refs, urls = _a.urls, position = _a.position, euler = _a.euler, currentAnimation = _a.currentAnimation;
24
+ var outerGroupRef = refs.outerGroupRef, rigidBodyRef = refs.rigidBodyRef, colliderRef = refs.colliderRef, innerGroupRef = refs.innerGroupRef;
25
+ var size = useGltfAndSize({ url: urls.characterUrl }).size;
26
+ var collider = calcCharacterColliderProps(size);
27
+ return (_jsx(_Fragment, { children: collider && (_jsxs(OuterGroupRef, { ref: outerGroupRef, children: [children, _jsxs(RigidBodyRef, { ref: rigidBodyRef, name: "character", position: position, rotation: euler, children: [_jsx(CapsuleCollider, { ref: colliderRef, args: [collider.height, collider.radius], position: [0, collider.height + collider.radius, 0] }), _jsx(InnerGroupRef, { type: "character", ref: innerGroupRef, url: urls.characterUrl, currentAnimation: currentAnimation })] })] })) }));
28
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import * as THREE from "three";
3
+ export type InnerGroupRefType = {
4
+ children?: React.ReactNode;
5
+ type: "character" | "vehicle" | "airplane";
6
+ currentAnimation: string;
7
+ url: string;
8
+ rotation?: THREE.Euler;
9
+ };
10
+ export declare const InnerGroupRef: import("react").ForwardRefExoticComponent<InnerGroupRefType & import("react").RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useGraph } from "@react-three/fiber";
3
+ import { Suspense, forwardRef, useMemo } from "react";
4
+ import * as THREE from "three";
5
+ import { SkeletonUtils } from "three-stdlib";
6
+ import { useAnimations, useGLTF } from "@react-three/drei";
7
+ import playActions from "../../../animation/actions";
8
+ export var InnerGroupRef = forwardRef(function (_a, ref) {
9
+ var children = _a.children, type = _a.type, currentAnimation = _a.currentAnimation, url = _a.url, rotation = _a.rotation;
10
+ var _b = useGLTF(url), scene = _b.scene, animations = _b.animations;
11
+ var animationResult = useAnimations(animations);
12
+ var animationRef = playActions({
13
+ type: type,
14
+ animationResult: animationResult,
15
+ currentAnimation: currentAnimation,
16
+ }).animationRef;
17
+ var clone = useMemo(function () { return SkeletonUtils.clone(scene); }, [scene]);
18
+ var nodes = useGraph(clone).nodes;
19
+ var objectNode = Object.values(nodes).find(function (node) { return node.type === "Object3D"; });
20
+ return (_jsx(Suspense, { fallback: null, children: _jsxs("group", { receiveShadow: true, castShadow: true, ref: ref, rotation: rotation, userData: { intangible: true }, children: [children, objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
21
+ var node = nodes[name];
22
+ if (node instanceof THREE.SkinnedMesh) {
23
+ return (_jsx("skinnedMesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry, skeleton: node.skeleton }, key));
24
+ }
25
+ else if (node instanceof THREE.Mesh) {
26
+ return (_jsx("mesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry }, key));
27
+ }
28
+ })] }) }));
29
+ });
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from "react";
2
+ export declare const OuterGroupRef: import("react").ForwardRefExoticComponent<{
3
+ children: ReactNode;
4
+ } & import("react").RefAttributes<import("three").Group<import("three").Object3DEventMap>>>;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef } from "react";
3
+ export var OuterGroupRef = forwardRef(function (_a, ref) {
4
+ var children = _a.children;
5
+ return (_jsx("group", { ref: ref, userData: { intangible: true }, children: children }));
6
+ });