gaesup-world 0.0.663 → 0.0.692

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 (253) hide show
  1. package/README.md +75 -2
  2. package/dist/gaesup/animation/actions.d.ts +4 -3
  3. package/dist/gaesup/animation/actions.js +26 -13
  4. package/dist/gaesup/animation/passiveActions.d.ts +9 -0
  5. package/dist/gaesup/animation/passiveActions.js +16 -0
  6. package/dist/gaesup/camera/cameraCollisionDetecter.d.ts +2 -2
  7. package/dist/gaesup/camera/index.d.ts +2 -2
  8. package/dist/gaesup/component/index.d.ts +5 -5
  9. package/dist/gaesup/component/index.js +11 -5
  10. package/dist/gaesup/component/mode/Airplane.d.ts +5 -0
  11. package/dist/gaesup/component/mode/Airplane.js +8 -0
  12. package/dist/gaesup/component/mode/Character.d.ts +5 -0
  13. package/dist/gaesup/component/mode/Character.js +8 -0
  14. package/dist/gaesup/component/mode/Vehicle.d.ts +5 -0
  15. package/dist/gaesup/component/mode/Vehicle.js +8 -0
  16. package/dist/gaesup/component/mode/index.d.ts +3 -0
  17. package/dist/gaesup/component/mode/index.js +3 -0
  18. package/dist/gaesup/component/passive/Airplane.d.ts +5 -0
  19. package/dist/gaesup/component/passive/Airplane.js +8 -0
  20. package/dist/gaesup/component/passive/Vehicle.d.ts +5 -0
  21. package/dist/gaesup/component/passive/Vehicle.js +8 -0
  22. package/dist/gaesup/component/passive/index.d.ts +3 -0
  23. package/dist/gaesup/component/passive/index.js +3 -0
  24. package/dist/gaesup/component/passive/passiveCharacter/index.d.ts +2 -0
  25. package/dist/gaesup/component/passive/passiveCharacter/index.js +20 -0
  26. package/dist/gaesup/component/passive/passiveCharacter/innerGltf.d.ts +3 -0
  27. package/dist/gaesup/component/passive/passiveCharacter/innerGltf.js +24 -0
  28. package/dist/gaesup/component/passive/passiveCharacter/outerGroup.d.ts +4 -0
  29. package/dist/gaesup/component/passive/passiveCharacter/outerGroup.js +8 -0
  30. package/dist/gaesup/component/passive/passiveCharacter/rigidbody.d.ts +5 -0
  31. package/dist/gaesup/component/passive/passiveCharacter/rigidbody.js +7 -0
  32. package/dist/gaesup/component/passive/type.d.ts +11 -0
  33. package/dist/gaesup/component/ref/airplane/collider.d.ts +6 -0
  34. package/dist/gaesup/component/ref/airplane/collider.js +22 -0
  35. package/dist/gaesup/component/ref/airplane/group.d.ts +6 -0
  36. package/dist/gaesup/component/ref/airplane/group.js +19 -0
  37. package/dist/gaesup/component/ref/airplane/index.d.ts +5 -0
  38. package/dist/gaesup/component/ref/airplane/index.js +10 -0
  39. package/dist/gaesup/component/{gltf/AirplaneGltf.js → ref/airplane/innerGltf.js} +1 -1
  40. package/dist/gaesup/component/ref/airplane/rigidbody.d.ts +7 -0
  41. package/dist/gaesup/component/ref/airplane/rigidbody.js +22 -0
  42. package/dist/gaesup/component/ref/character/collider.d.ts +6 -0
  43. package/dist/gaesup/component/ref/character/collider.js +24 -0
  44. package/dist/gaesup/component/ref/character/group.d.ts +6 -0
  45. package/dist/gaesup/{tools/reducer.js → component/ref/character/group.js} +6 -13
  46. package/dist/gaesup/component/ref/character/index.d.ts +6 -0
  47. package/dist/gaesup/component/ref/character/index.js +13 -0
  48. package/dist/gaesup/component/{gltf/CharacterGltf.d.ts → ref/character/innerGltf.d.ts} +3 -6
  49. package/dist/gaesup/component/{gltf/CharacterGltf.js → ref/character/innerGltf.js} +19 -20
  50. package/dist/gaesup/component/ref/character/outerGroup.d.ts +4 -0
  51. package/dist/gaesup/component/ref/character/outerGroup.js +8 -0
  52. package/dist/gaesup/component/ref/character/rigidbody.d.ts +7 -0
  53. package/dist/gaesup/component/ref/character/rigidbody.js +22 -0
  54. package/dist/gaesup/component/ref/character/slopeRay.d.ts +6 -0
  55. package/dist/gaesup/component/ref/character/slopeRay.js +10 -0
  56. package/dist/gaesup/component/ref/vehicle/collider.d.ts +3 -0
  57. package/dist/gaesup/component/ref/vehicle/collider.js +9 -0
  58. package/dist/gaesup/component/ref/vehicle/group.d.ts +6 -0
  59. package/dist/gaesup/component/ref/vehicle/group.js +19 -0
  60. package/dist/gaesup/component/ref/vehicle/index.d.ts +5 -0
  61. package/dist/gaesup/component/ref/vehicle/index.js +14 -0
  62. package/dist/gaesup/component/{gltf/VehicleGltf.js → ref/vehicle/innerGltf.js} +1 -1
  63. package/dist/gaesup/component/ref/vehicle/rigidbody.d.ts +7 -0
  64. package/dist/gaesup/component/ref/vehicle/rigidbody.js +22 -0
  65. package/dist/gaesup/component/ref/vehicle/wheel.d.ts +11 -0
  66. package/dist/gaesup/component/ref/vehicle/wheel.js +12 -0
  67. package/dist/gaesup/component/ref/vehicle/wheels.d.ts +4 -0
  68. package/dist/gaesup/component/{gltf/WheelJoint.js → ref/vehicle/wheels.js} +8 -7
  69. package/dist/gaesup/controller/context/index.d.ts +36 -9
  70. package/dist/gaesup/controller/context/index.js +36 -8
  71. package/dist/gaesup/controller/context/reducer.d.ts +10 -8
  72. package/dist/gaesup/controller/context/type.d.ts +51 -32
  73. package/dist/gaesup/controller/debug/airplane.d.ts +71 -0
  74. package/dist/gaesup/controller/debug/airplane.js +71 -0
  75. package/dist/gaesup/controller/debug/cameraOption.d.ts +27 -0
  76. package/dist/gaesup/controller/debug/cameraOption.js +27 -0
  77. package/dist/gaesup/controller/debug/character.d.ts +27 -0
  78. package/dist/gaesup/controller/debug/character.js +27 -0
  79. package/dist/gaesup/controller/debug/index.d.ts +6 -0
  80. package/dist/gaesup/controller/debug/index.js +100 -0
  81. package/dist/gaesup/controller/debug/orthographicCamera.d.ts +17 -0
  82. package/dist/gaesup/controller/debug/orthographicCamera.js +17 -0
  83. package/dist/gaesup/controller/debug/perspectiveCamera.d.ts +12 -0
  84. package/dist/gaesup/controller/debug/perspectiveCamera.js +12 -0
  85. package/dist/gaesup/controller/debug/vehicle.d.ts +27 -0
  86. package/dist/gaesup/controller/debug/vehicle.js +27 -0
  87. package/dist/gaesup/controller/index.js +47 -32
  88. package/dist/gaesup/controller/initialize/callback/index.d.ts +2 -0
  89. package/dist/gaesup/controller/initialize/callback/index.js +57 -0
  90. package/dist/gaesup/{initial → controller/initialize}/callback/type.d.ts +4 -11
  91. package/dist/gaesup/controller/initialize/index.d.ts +27 -0
  92. package/dist/gaesup/{initial/controller → controller/initialize}/index.js +8 -42
  93. package/dist/gaesup/controller/type.d.ts +22 -54
  94. package/dist/gaesup/gaesupProps/index.js +4 -6
  95. package/dist/gaesup/hooks/index.d.ts +1 -0
  96. package/dist/gaesup/hooks/index.js +1 -0
  97. package/dist/gaesup/hooks/useGaesupController/index.d.ts +6 -0
  98. package/dist/gaesup/hooks/useGaesupController/index.js +12 -0
  99. package/dist/gaesup/index.d.ts +3 -3
  100. package/dist/gaesup/index.js +3 -3
  101. package/dist/gaesup/mutation/character/index.d.ts +2 -0
  102. package/dist/gaesup/mutation/character/index.js +8 -0
  103. package/dist/gaesup/mutation/character/rotation.d.ts +2 -0
  104. package/dist/gaesup/mutation/character/rotation.js +5 -0
  105. package/dist/gaesup/mutation/character/stabilizing.d.ts +2 -0
  106. package/dist/gaesup/mutation/character/stabilizing.js +4 -0
  107. package/dist/gaesup/mutation/character/transition.d.ts +2 -0
  108. package/dist/gaesup/mutation/character/transition.js +4 -0
  109. package/dist/gaesup/mutation/index.d.ts +2 -0
  110. package/dist/gaesup/mutation/index.js +22 -0
  111. package/dist/gaesup/mutation/type.d.ts +18 -0
  112. package/dist/gaesup/mutation/type.js +1 -0
  113. package/dist/gaesup/physics/airplane/damping.js +3 -2
  114. package/dist/gaesup/physics/airplane/direction.js +2 -2
  115. package/dist/gaesup/physics/airplane/gravity.js +3 -2
  116. package/dist/gaesup/physics/character/accelaration.js +1 -1
  117. package/dist/gaesup/physics/character/damping.js +2 -2
  118. package/dist/gaesup/physics/character/jump.js +1 -2
  119. package/dist/gaesup/physics/character/turn.js +1 -2
  120. package/dist/gaesup/physics/index.d.ts +2 -2
  121. package/dist/gaesup/physics/index.js +9 -2
  122. package/dist/gaesup/physics/type.d.ts +8 -7
  123. package/dist/gaesup/physics/vehicle/damping.js +3 -3
  124. package/dist/gaesup/physics/vehicle/impulse.js +4 -6
  125. package/dist/gaesup/tools/gameboy/GameBoyButton.d.ts +3 -1
  126. package/dist/gaesup/tools/gameboy/GameBoyButton.js +3 -5
  127. package/dist/gaesup/tools/gameboy/index.d.ts +2 -1
  128. package/dist/gaesup/tools/gameboy/index.js +8 -6
  129. package/dist/gaesup/tools/gameboy/style.css.d.ts +0 -1
  130. package/dist/gaesup/tools/gameboy/style.css.js +3 -15
  131. package/dist/gaesup/tools/gameboy/type.d.ts +2 -5
  132. package/dist/gaesup/tools/gamepad/GamePadButton.d.ts +3 -1
  133. package/dist/gaesup/tools/gamepad/GamePadButton.js +4 -5
  134. package/dist/gaesup/tools/gamepad/index.d.ts +2 -1
  135. package/dist/gaesup/tools/gamepad/index.js +9 -9
  136. package/dist/gaesup/tools/gamepad/style.css.js +1 -1
  137. package/dist/gaesup/tools/gamepad/type.d.ts +4 -6
  138. package/dist/gaesup/tools/index.d.ts +5 -2
  139. package/dist/gaesup/tools/index.js +5 -42
  140. package/dist/gaesup/tools/joystick/default.d.ts +0 -4
  141. package/dist/gaesup/tools/joystick/default.js +0 -4
  142. package/dist/gaesup/tools/joystick/index.d.ts +2 -2
  143. package/dist/gaesup/tools/joystick/index.js +48 -29
  144. package/dist/gaesup/tools/joystick/style.css.d.ts +0 -1
  145. package/dist/gaesup/tools/joystick/style.css.js +0 -15
  146. package/dist/gaesup/tools/joystick/type.d.ts +2 -7
  147. package/dist/gaesup/tools/keyBoardToolTip/default.d.ts +0 -1
  148. package/dist/gaesup/tools/keyBoardToolTip/default.js +0 -1
  149. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +2 -1
  150. package/dist/gaesup/tools/keyBoardToolTip/index.js +18 -14
  151. package/dist/gaesup/tools/keyBoardToolTip/style.css.d.ts +0 -1
  152. package/dist/gaesup/tools/keyBoardToolTip/style.css.js +1 -21
  153. package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +8 -5
  154. package/dist/gaesup/tools/minimap/default.d.ts +4 -3
  155. package/dist/gaesup/tools/minimap/default.js +4 -3
  156. package/dist/gaesup/tools/minimap/index.d.ts +2 -1
  157. package/dist/gaesup/tools/minimap/index.js +49 -41
  158. package/dist/gaesup/tools/minimap/style.css.d.ts +32 -0
  159. package/dist/gaesup/tools/minimap/style.css.js +99 -19
  160. package/dist/gaesup/tools/minimap/type.d.ts +7 -11
  161. package/dist/gaesup/tools/type.d.ts +2 -26
  162. package/dist/gaesup/utils/context.d.ts +2 -0
  163. package/dist/gaesup/utils/context.js +3 -0
  164. package/dist/gaesup/utils/debug.d.ts +29 -0
  165. package/dist/gaesup/utils/debug.js +36 -0
  166. package/dist/gaesup/utils/gltf.d.ts +7 -0
  167. package/dist/gaesup/utils/gltf.js +10 -0
  168. package/dist/gaesup/utils/type.d.ts +5 -0
  169. package/dist/gaesup/utils/type.js +1 -0
  170. package/dist/gaesup/utils/vector.d.ts +1 -0
  171. package/dist/gaesup/utils/vector.js +3 -0
  172. package/dist/gaesup/world/context/index.d.ts +5 -4
  173. package/dist/gaesup/world/context/index.js +2 -2
  174. package/dist/gaesup/world/context/reducer.d.ts +8 -8
  175. package/dist/gaesup/world/context/reducer.js +0 -3
  176. package/dist/gaesup/world/context/type.d.ts +5 -13
  177. package/dist/gaesup/world/debug/index.d.ts +2 -0
  178. package/dist/gaesup/world/debug/index.js +27 -0
  179. package/dist/gaesup/world/debug/mode.d.ts +10 -0
  180. package/dist/gaesup/world/debug/mode.js +10 -0
  181. package/dist/gaesup/world/index.d.ts +2 -2
  182. package/dist/gaesup/world/index.js +1 -1
  183. package/dist/gaesup/world/initalize/collider/airplane.js +24 -0
  184. package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/character.js +10 -13
  185. package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/gltf.d.ts +1 -1
  186. package/dist/gaesup/world/initalize/collider/gltf.js +54 -0
  187. package/dist/gaesup/world/initalize/collider/index.d.ts +2 -0
  188. package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/index.js +2 -1
  189. package/dist/gaesup/world/initalize/collider/vehicle.js +55 -0
  190. package/dist/gaesup/world/initalize/index.d.ts +33 -0
  191. package/dist/gaesup/{initial/gaesupWorld → world/initalize}/index.js +6 -4
  192. package/dist/gaesup/world/initalize/type.d.ts +13 -0
  193. package/dist/gaesup/world/initalize/type.js +1 -0
  194. package/dist/gaesup/world/type.d.ts +17 -7
  195. package/dist/index.d.ts +2 -1
  196. package/dist/index.js +2 -1
  197. package/dist/styles/index.d.ts +2 -0
  198. package/dist/styles/index.js +2 -0
  199. package/dist/styles/sprinkles/color.css.d.ts +21 -21
  200. package/dist/styles/sprinkles/index.css.d.ts +368 -1
  201. package/dist/styles/sprinkles/margin.css.d.ts +30 -30
  202. package/dist/styles/sprinkles/padding.css.d.ts +30 -30
  203. package/package.json +7 -4
  204. package/dist/gaesup/component/Airplane.d.ts +0 -5
  205. package/dist/gaesup/component/Airplane.js +0 -14
  206. package/dist/gaesup/component/Character.d.ts +0 -5
  207. package/dist/gaesup/component/Character.js +0 -13
  208. package/dist/gaesup/component/Vehicle.d.ts +0 -5
  209. package/dist/gaesup/component/Vehicle.js +0 -15
  210. package/dist/gaesup/component/gltf/WheelJoint.d.ts +0 -4
  211. package/dist/gaesup/component/gltf/index.d.ts +0 -4
  212. package/dist/gaesup/component/gltf/index.js +0 -4
  213. package/dist/gaesup/component/ref/airplane.d.ts +0 -16
  214. package/dist/gaesup/component/ref/airplane.js +0 -46
  215. package/dist/gaesup/component/ref/character.d.ts +0 -20
  216. package/dist/gaesup/component/ref/character.js +0 -56
  217. package/dist/gaesup/component/ref/index.d.ts +0 -3
  218. package/dist/gaesup/component/ref/index.js +0 -3
  219. package/dist/gaesup/component/ref/vehicle.d.ts +0 -24
  220. package/dist/gaesup/component/ref/vehicle.js +0 -41
  221. package/dist/gaesup/component/setInit.d.ts +0 -3
  222. package/dist/gaesup/component/setInit.js +0 -10
  223. package/dist/gaesup/initial/callback/index.d.ts +0 -2
  224. package/dist/gaesup/initial/callback/index.js +0 -51
  225. package/dist/gaesup/initial/controller/index.d.ts +0 -29
  226. package/dist/gaesup/initial/controller/initDebug.d.ts +0 -24
  227. package/dist/gaesup/initial/controller/initDebug.js +0 -110
  228. package/dist/gaesup/initial/gaesupWorld/collider/airplane.js +0 -25
  229. package/dist/gaesup/initial/gaesupWorld/collider/gltf.js +0 -71
  230. package/dist/gaesup/initial/gaesupWorld/collider/index.d.ts +0 -6
  231. package/dist/gaesup/initial/gaesupWorld/collider/vehicle.js +0 -40
  232. package/dist/gaesup/initial/gaesupWorld/index.d.ts +0 -33
  233. package/dist/gaesup/initial/gaesupWorld/type.d.ts +0 -28
  234. package/dist/gaesup/initial/index.d.ts +0 -3
  235. package/dist/gaesup/initial/index.js +0 -3
  236. package/dist/gaesup/tools/context.d.ts +0 -4
  237. package/dist/gaesup/tools/context.js +0 -3
  238. package/dist/gaesup/tools/gameboy/default.d.ts +0 -3
  239. package/dist/gaesup/tools/gameboy/default.js +0 -3
  240. package/dist/gaesup/tools/reducer.d.ts +0 -11
  241. package/dist/gaesup/tools/style.css.d.ts +0 -3
  242. package/dist/gaesup/tools/style.css.js +0 -31
  243. package/dist/gaesup/utils/constant.d.ts +0 -1
  244. package/dist/gaesup/utils/constant.js +0 -1
  245. /package/dist/gaesup/component/{gltf → passive}/type.js +0 -0
  246. /package/dist/gaesup/component/{gltf/AirplaneGltf.d.ts → ref/airplane/innerGltf.d.ts} +0 -0
  247. /package/dist/gaesup/component/{gltf/VehicleGltf.d.ts → ref/vehicle/innerGltf.d.ts} +0 -0
  248. /package/dist/gaesup/component/{gltf/type.d.ts → type.d.ts} +0 -0
  249. /package/dist/gaesup/{initial/callback → component}/type.js +0 -0
  250. /package/dist/gaesup/{initial/gaesupWorld → controller/initialize/callback}/type.js +0 -0
  251. /package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/airplane.d.ts +0 -0
  252. /package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/character.d.ts +0 -0
  253. /package/dist/gaesup/{initial/gaesupWorld → world/initalize}/collider/vehicle.d.ts +0 -0
package/README.md CHANGED
@@ -1,9 +1,13 @@
1
1
  # Gaesup World
2
2
 
3
+ [![Version](https://img.shields.io/npm/v/gaesup-world?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
4
+ [![Downloads](https://img.shields.io/npm/dt/gaesup-world.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
5
+
3
6
  Web 3D Character Controller and World Platform Library
4
7
 
5
- [![Version](https://img.shields.io/npm/v/gaesup-world?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/zustand)
6
- [![Downloads](https://img.shields.io/npm/dt/gaesup-world.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
8
+ [![main](https://github.com/jigglypop/gaesup-world/blob/master/image/main_image.png)](https://codesandbox.io/p/github/jigglypop/gaesup-world-examples/master?workspaceId=e8ae627a-af61-415e-aa21-1fe5af422c86)
9
+
10
+ > click and watch code sandbox example!
7
11
 
8
12
  ---
9
13
 
@@ -11,6 +15,59 @@ Web 3D Character Controller and World Platform Library
11
15
 
12
16
  Gaesup World is a library that uses @react/three-fiber, @react/three-drei, and rapier to provide control tools for characters, airplanes, cars, and more in a web 3D environment. This controller is designed to easily manage character movement, animation, and interaction. It allows for easy manipulation of characters or vehicles in a virtual world, and is also equipped with utilities like minimaps and joysticks.
13
17
 
18
+ ## How to start
19
+
20
+ ```tsx
21
+ "use client";
22
+
23
+ import { Environment, KeyboardControls } from "@react-three/drei";
24
+ import { Canvas } from "@react-three/fiber";
25
+ import { Physics, RigidBody } from "@react-three/rapier";
26
+
27
+ import { GaesupController, GaesupWorld } from "gaesup-world";
28
+
29
+ export const keyboardMap = [
30
+ { name: "forward", keys: ["ArrowUp", "KeyW"] },
31
+ { name: "backward", keys: ["ArrowDown", "KeyS"] },
32
+ { name: "leftward", keys: ["ArrowLeft", "KeyA"] },
33
+ { name: "rightward", keys: ["ArrowRight", "KeyD"] },
34
+ { name: "space", keys: ["Space"] },
35
+ { name: "shift", keys: ["Shift"] },
36
+ { name: "keyZ", keys: ["KeyZ"] },
37
+ ];
38
+
39
+ export default function App() {
40
+ const CHARACTER_URL = "./gaesupyee.glb";
41
+
42
+ return (
43
+ <GaesupWorld
44
+ url={{
45
+ characterUrl: CHARACTER_URL,
46
+ }}
47
+ >
48
+ <Canvas shadows style={{ width: "100dvw", height: "100dvh" }}>
49
+ <Environment background preset="sunset" blur={0.8} />
50
+ <Physics>
51
+ <KeyboardControls map={keyboardMap}>
52
+ <GaesupController
53
+ groupProps={{
54
+ rotation: [0, Math.PI, 0],
55
+ }}
56
+ />
57
+ </KeyboardControls>
58
+ <RigidBody type="fixed">
59
+ <mesh receiveShadow position={[0, 0, 0]}>
60
+ <boxGeometry args={[300, 5, 300]} />
61
+ <meshStandardMaterial />
62
+ </mesh>
63
+ </RigidBody>
64
+ </Physics>
65
+ </Canvas>
66
+ </GaesupWorld>
67
+ );
68
+ }
69
+ ```
70
+
14
71
  ### Features
15
72
 
16
73
  - 3D character control based on React Three Fiber.
@@ -125,3 +182,19 @@ This is the airplane control in Gaesup World. Characters can board the airplane.
125
182
  ## Tools
126
183
 
127
184
  #### [Tools](#tools)
185
+
186
+ #### [joystick](#joystick)
187
+
188
+ #### [keyboardtooltip](#keyboard tooltip)
189
+
190
+ #### [minimap](#minimap)
191
+
192
+ #### [gameboy](#gameboy)
193
+
194
+ ## joystick
195
+
196
+ ## keyboard tooltip
197
+
198
+ ## minimap
199
+
200
+ ## gameboy
@@ -1,8 +1,9 @@
1
- import { RefObject } from "react";
1
+ /// <reference types="react" />
2
2
  import { groundRayType } from "../controller/type";
3
3
  export type playActionsType = {
4
- outerGroupRef: RefObject<THREE.Group>;
5
4
  groundRay: groundRayType;
6
5
  isRider?: boolean;
7
6
  };
8
- export default function playActions({ outerGroupRef, groundRay, isRider, }: playActionsType): void;
7
+ export default function playActions({ groundRay, isRider }: playActionsType): {
8
+ animationRef: import("react").MutableRefObject<import("three").Object3D<import("three").Object3DEventMap>>;
9
+ };
@@ -14,12 +14,12 @@ import { useFrame } from "@react-three/fiber";
14
14
  import { useContext, useEffect } from "react";
15
15
  import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../world/context";
16
16
  export default function playActions(_a) {
17
- var outerGroupRef = _a.outerGroupRef, groundRay = _a.groundRay, isRider = _a.isRider;
17
+ var groundRay = _a.groundRay, isRider = _a.isRider;
18
18
  var _b = useContext(GaesupWorldContext), characterGltf = _b.characterGltf, characterAnimations = _b.animations;
19
19
  var dispatch = useContext(GaesupWorldDispatchContext);
20
20
  var animations = characterGltf.animations;
21
21
  var control = useKeyboardControls()[1]();
22
- var actions = useAnimations(animations, outerGroupRef).actions;
22
+ var _c = useAnimations(animations), actions = _c.actions, animationRef = _c.ref;
23
23
  useEffect(function () {
24
24
  characterAnimations.keyControl = control;
25
25
  dispatch({
@@ -29,7 +29,7 @@ export default function playActions(_a) {
29
29
  },
30
30
  });
31
31
  }, [control]);
32
- var playAnimation = function (tag) {
32
+ var play = function (tag) {
33
33
  characterAnimations.current = tag;
34
34
  dispatch({
35
35
  type: "update",
@@ -50,13 +50,14 @@ export default function playActions(_a) {
50
50
  },
51
51
  });
52
52
  };
53
- var resetAni = function () { return playAnimation("idle"); };
54
- var playIdle = function () { return playAnimation("idle"); };
55
- var playWalk = function () { return playAnimation("walk"); };
56
- var playRun = function () { return playAnimation("run"); };
57
- var playJump = function () { return playAnimation("jump"); };
58
- var playFall = function () { return playAnimation("fall"); };
59
- var playRide = function () { return playAnimation("ride"); };
53
+ var resetAni = function () { return play("idle"); };
54
+ var playIdle = function () { return play("idle"); };
55
+ var playWalk = function () { return play("walk"); };
56
+ var playRun = function () { return play("run"); };
57
+ var playJump = function () { return play("jump"); };
58
+ var playFall = function () { return play("fall"); };
59
+ var playRide = function () { return play("ride"); };
60
+ var playLanding = function () { return play("land"); };
60
61
  useEffect(function () {
61
62
  return function () {
62
63
  resetAni();
@@ -64,15 +65,14 @@ export default function playActions(_a) {
64
65
  }, []);
65
66
  useEffect(function () {
66
67
  var _a;
67
- // Play animation
68
68
  var action = (_a = actions[characterAnimations.current]) === null || _a === void 0 ? void 0 : _a.reset().fadeIn(0.2).play();
69
69
  setAnimationName(actions);
70
70
  return function () {
71
71
  action === null || action === void 0 ? void 0 : action.fadeOut(0.2);
72
72
  };
73
73
  }, [characterAnimations.current]);
74
- var _c = useContext(GaesupWorldContext), states = _c.states, activeState = _c.activeState;
75
- var isNotMoving = states.isNotMoving, isMoving = states.isMoving, isJumping = states.isJumping, isRunning = states.isRunning, isAnimationOuter = states.isAnimationOuter;
74
+ var _d = useContext(GaesupWorldContext), states = _d.states, activeState = _d.activeState;
75
+ var isNotMoving = states.isNotMoving, isMoving = states.isMoving, isJumping = states.isJumping, isRunning = states.isRunning, isAnimationOuter = states.isAnimationOuter, isOnTheGround = states.isOnTheGround;
76
76
  useFrame(function () {
77
77
  if (isRider) {
78
78
  playRide();
@@ -91,10 +91,23 @@ export default function playActions(_a) {
91
91
  else if (isMoving) {
92
92
  playWalk();
93
93
  }
94
+ if (groundRay.hit) {
95
+ if (!isJumping && !isOnTheGround) {
96
+ if (groundRay.hit.toi < 5) {
97
+ playLanding();
98
+ }
99
+ else {
100
+ playFall();
101
+ }
102
+ }
103
+ }
94
104
  if (groundRay.hit === null && activeState.velocity.y < 0) {
95
105
  playFall();
96
106
  }
97
107
  }
98
108
  }
99
109
  });
110
+ return {
111
+ animationRef: animationRef,
112
+ };
100
113
  }
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { AnimationClip } from "three";
3
+ export type playPassiveActionsType = {
4
+ current: string;
5
+ animations: AnimationClip[];
6
+ };
7
+ export default function playPassiveActions({ current, animations, }: playPassiveActionsType): {
8
+ animationRef: import("react").MutableRefObject<import("three").Object3D<import("three").Object3DEventMap>>;
9
+ };
@@ -0,0 +1,16 @@
1
+ import { useAnimations } from "@react-three/drei";
2
+ import { useEffect } from "react";
3
+ export default function playPassiveActions(_a) {
4
+ var current = _a.current, animations = _a.animations;
5
+ var _b = useAnimations(animations), actions = _b.actions, animationRef = _b.ref;
6
+ useEffect(function () {
7
+ var _a;
8
+ var action = (_a = actions[current]) === null || _a === void 0 ? void 0 : _a.reset().fadeIn(0.2).play();
9
+ return function () {
10
+ action === null || action === void 0 ? void 0 : action.fadeOut(0.2);
11
+ };
12
+ }, [current]);
13
+ return {
14
+ animationRef: animationRef,
15
+ };
16
+ }
@@ -1,4 +1,4 @@
1
- import { propType } from "../controller/type";
2
- export default function cameraCollisionDetector(prop: propType): {
1
+ import { controllerInnerType } from "../controller/type";
2
+ export default function cameraCollisionDetector(prop: controllerInnerType): {
3
3
  checkCollision: (delta: number) => void;
4
4
  };
@@ -1,7 +1,7 @@
1
- import { propType, refsType } from "../controller/type";
1
+ import { controllerInnerType, refsType } from "../controller/type";
2
2
  export default function Camera({ refs, prop, control, }: {
3
3
  refs: refsType;
4
- prop: propType;
4
+ prop: controllerInnerType;
5
5
  control: {
6
6
  [key: string]: boolean;
7
7
  };
@@ -1,5 +1,5 @@
1
- export { Airplane } from "./Airplane";
2
- export { Character } from "./Character";
3
- export { Vehicle } from "./Vehicle";
4
- export * from "./gltf";
5
- export * as setInit from "./setInit";
1
+ import { controllerInnerType, refsType } from "../controller/type";
2
+ export declare function GaesupComponent({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,11 @@
1
- export { Airplane } from "./Airplane";
2
- export { Character } from "./Character";
3
- export { Vehicle } from "./Vehicle";
4
- export * from "./gltf";
5
- export * as setInit from "./setInit";
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { GaesupWorldContext } from "../world/context";
4
+ import { Airplane } from "./mode/Airplane";
5
+ import { Character } from "./mode/Character";
6
+ import { Vehicle } from "./mode/Vehicle";
7
+ export function GaesupComponent(_a) {
8
+ var props = _a.props, refs = _a.refs;
9
+ var mode = useContext(GaesupWorldContext).mode;
10
+ return (_jsxs(_Fragment, { children: [mode.type === "character" && _jsx(Character, { props: props, refs: refs }), mode.type === "vehicle" && _jsx(Vehicle, { props: props, refs: refs }), mode.type === "airplane" && _jsx(Airplane, { props: props, refs: refs })] }));
11
+ }
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../controller/type";
2
+ export declare function Airplane({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import calculation from "../../physics";
3
+ import { AirplaneRef } from "../ref/airplane";
4
+ export function Airplane(_a) {
5
+ var props = _a.props, refs = _a.refs;
6
+ calculation(props);
7
+ return _jsx(AirplaneRef, { props: props, refs: refs });
8
+ }
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../controller/type";
2
+ export declare function Character({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import calculation from "../../physics";
3
+ import { CharacterRef } from "../ref/character";
4
+ export function Character(_a) {
5
+ var props = _a.props, refs = _a.refs;
6
+ calculation(props);
7
+ return _jsx(CharacterRef, { props: props, refs: refs, isPassive: false });
8
+ }
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../controller/type";
2
+ export declare function Vehicle({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import calculation from "../../physics";
3
+ import { VehicleRef } from "../ref/vehicle";
4
+ export function Vehicle(_a) {
5
+ var props = _a.props, refs = _a.refs;
6
+ calculation(props);
7
+ return _jsx(VehicleRef, { props: props, refs: refs });
8
+ }
@@ -0,0 +1,3 @@
1
+ export { Airplane } from "./Airplane";
2
+ export { Character } from "./Character";
3
+ export { Vehicle } from "./Vehicle";
@@ -0,0 +1,3 @@
1
+ export { Airplane } from "./Airplane";
2
+ export { Character } from "./Character";
3
+ export { Vehicle } from "./Vehicle";
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../controller/type";
2
+ export declare function Airplane({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import calculation from "../../physics";
3
+ import { AirplaneRef } from "../ref/airplane";
4
+ export function Airplane(_a) {
5
+ var props = _a.props, refs = _a.refs;
6
+ calculation(props);
7
+ return _jsx(AirplaneRef, { props: props, refs: refs });
8
+ }
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../controller/type";
2
+ export declare function Vehicle({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import calculation from "../../physics";
3
+ import { VehicleRef } from "../ref/vehicle";
4
+ export function Vehicle(_a) {
5
+ var props = _a.props, refs = _a.refs;
6
+ calculation(props);
7
+ return _jsx(VehicleRef, { props: props, refs: refs });
8
+ }
@@ -0,0 +1,3 @@
1
+ export { Airplane } from "./Airplane";
2
+ export { Vehicle } from "./Vehicle";
3
+ export { PassiveCharacter } from "./passiveCharacter";
@@ -0,0 +1,3 @@
1
+ export { Airplane } from "./Airplane";
2
+ export { Vehicle } from "./Vehicle";
3
+ export { PassiveCharacter } from "./passiveCharacter";
@@ -0,0 +1,2 @@
1
+ import { passiveCharacterType } from "../type";
2
+ export declare function PassiveCharacter({ mode, state, url, current, }: passiveCharacterType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useRef } from "react";
3
+ import mutation from "../../../mutation";
4
+ import { PassiveCharacterInnerGroupRef } from "./innerGltf";
5
+ import { PassiveCharacterOuterGroup } from "./outerGroup";
6
+ import { PassiveCharacterRigidBody } from "./rigidbody";
7
+ export function PassiveCharacter(_a) {
8
+ var mode = _a.mode, state = _a.state, url = _a.url, current = _a.current;
9
+ var passiveCharacterRef = useRef(null);
10
+ var passiveCharacterOuterRef = useRef(null);
11
+ var passiveRigidBodyRef = useRef(null);
12
+ mutation({
13
+ outerGroupRef: passiveCharacterOuterRef,
14
+ rigidBodyRef: passiveRigidBodyRef,
15
+ state: state,
16
+ mode: mode,
17
+ delta: 0.9,
18
+ });
19
+ return (_jsx(PassiveCharacterRigidBody, { ref: passiveRigidBodyRef, children: _jsx(PassiveCharacterOuterGroup, { ref: passiveCharacterOuterRef, children: _jsx(PassiveCharacterInnerGroupRef, { url: url, current: current, ref: passiveCharacterRef }) }) }));
20
+ }
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { passiveCharacterInnerType } from "../type";
3
+ export declare const PassiveCharacterInnerGroupRef: import("react").ForwardRefExoticComponent<passiveCharacterInnerType & import("react").RefAttributes<import("three").Group<import("three").Object3DEventMap>>>;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { forwardRef, useMemo } from "react";
3
+ import { useGraph, useLoader } from "@react-three/fiber";
4
+ import { SkeletonUtils } from "three-stdlib";
5
+ import { GLTFLoader } from "three/examples/jsm/loaders/GLTFLoader";
6
+ import playPassiveActions from "../../../animation/passiveActions";
7
+ export var PassiveCharacterInnerGroupRef = forwardRef(function (_a, ref) {
8
+ var url = _a.url, current = _a.current;
9
+ var _b = useLoader(GLTFLoader, url), materials = _b.materials, scene = _b.scene, animations = _b.animations;
10
+ var clone = useMemo(function () { return SkeletonUtils.clone(scene); }, [scene]);
11
+ var nodes = useGraph(clone).nodes;
12
+ var animationRef = playPassiveActions({
13
+ current: current,
14
+ animations: animations,
15
+ }).animationRef;
16
+ return (_jsx(_Fragment, { children: nodes && materials && (_jsxs("group", { receiveShadow: true, castShadow: true, ref: ref, children: [Object.values(nodes).find(function (node) { return node.type === "Object3D"; }) && (_jsx("primitive", { object: Object.values(nodes).find(function (node) { return node.type === "Object3D"; }), visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
17
+ if (nodes[name].type === "SkinnedMesh") {
18
+ return (_jsx("skinnedMesh", { castShadow: true, receiveShadow: true, material: materials[name], geometry: nodes[name].geometry, skeleton: nodes[name].skeleton }, key));
19
+ }
20
+ else if (nodes[name].type === "Mesh") {
21
+ return (_jsx("mesh", { castShadow: true, receiveShadow: true, material: materials[name], geometry: nodes[name].geometry }, key));
22
+ }
23
+ })] })) }));
24
+ });
@@ -0,0 +1,4 @@
1
+ import { ReactNode } from "react";
2
+ export declare const PassiveCharacterOuterGroup: import("react").ForwardRefExoticComponent<{
3
+ children: ReactNode;
4
+ } & import("react").RefAttributes<import("three").Group<import("three").Object3DEventMap>>>;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { forwardRef, useContext } from "react";
3
+ import { GaesupWorldContext } from "../../../world/context";
4
+ export var PassiveCharacterOuterGroup = forwardRef(function (_a, ref) {
5
+ var children = _a.children;
6
+ var mode = useContext(GaesupWorldContext).mode;
7
+ return (_jsx("group", { ref: ref, userData: { intangible: true }, visible: mode.type === "character", children: children }));
8
+ });
@@ -0,0 +1,5 @@
1
+ import { RapierRigidBody } from "@react-three/rapier";
2
+ import { ReactNode } from "react";
3
+ export declare const PassiveCharacterRigidBody: import("react").ForwardRefExoticComponent<{
4
+ children: ReactNode;
5
+ } & import("react").RefAttributes<RapierRigidBody>>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { RigidBody } from "@react-three/rapier";
3
+ import { forwardRef } from "react";
4
+ export var PassiveCharacterRigidBody = forwardRef(function (_a, ref) {
5
+ var children = _a.children;
6
+ return (_jsx(RigidBody, { colliders: false, canSleep: false, ref: ref, children: children }));
7
+ });
@@ -0,0 +1,11 @@
1
+ import { activeStateType, modeType } from "../../world/context/type";
2
+ export type passiveCharacterType = {
3
+ mode: modeType;
4
+ state: activeStateType;
5
+ current: string;
6
+ url: string;
7
+ };
8
+ export type passiveCharacterInnerType = {
9
+ current: string;
10
+ url: string;
11
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { Collider } from "@dimforge/rapier3d-compat";
3
+ import { controllerInnerType } from "../../../controller/type";
4
+ export declare const AirplaneCollider: import("react").ForwardRefExoticComponent<{
5
+ prop: controllerInnerType;
6
+ } & import("react").RefAttributes<Collider>>;
@@ -0,0 +1,22 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CuboidCollider, useRapier } from "@react-three/rapier";
3
+ import { forwardRef, useContext } from "react";
4
+ import { getRayHit, useForwardRef } from "../../../utils";
5
+ import { GaesupWorldContext } from "../../../world/context";
6
+ export var AirplaneCollider = forwardRef(function (_a, ref) {
7
+ var _b;
8
+ var prop = _a.prop;
9
+ var collider = useContext(GaesupWorldContext).airplaneCollider;
10
+ var airplaneSizeX = collider.airplaneSizeX, airplaneSizeY = collider.airplaneSizeY, airplaneSizeZ = collider.airplaneSizeZ;
11
+ var colliderRef = useForwardRef(ref);
12
+ var rapier = useRapier().rapier;
13
+ var groundRay = prop.groundRay;
14
+ groundRay.length = airplaneSizeY * 5 + 2;
15
+ groundRay.rayCast = new rapier.Ray(groundRay.origin, groundRay.dir);
16
+ groundRay.hit = getRayHit({
17
+ ray: groundRay,
18
+ ref: colliderRef,
19
+ });
20
+ groundRay.parent = (_b = groundRay.hit) === null || _b === void 0 ? void 0 : _b.collider.parent();
21
+ return (_jsx(CuboidCollider, { ref: ref, args: [airplaneSizeX / 2, airplaneSizeY / 2, airplaneSizeZ / 2], position: [0, airplaneSizeY / 2, 0] }));
22
+ });
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ import { controllerType } from "../../../controller/type";
3
+ export declare const AirplaneGroup: import("react").ForwardRefExoticComponent<{
4
+ props: controllerType;
5
+ children: ReactNode;
6
+ } & import("react").RefAttributes<import("three").Group<import("three").Object3DEventMap>>>;
@@ -0,0 +1,19 @@
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 { forwardRef, useContext } from "react";
14
+ import { GaesupWorldContext } from "../../../world/context";
15
+ export var AirplaneGroup = forwardRef(function (_a, ref) {
16
+ var props = _a.props, children = _a.children;
17
+ var mode = useContext(GaesupWorldContext).mode;
18
+ return (_jsx("group", __assign({ ref: ref, userData: { intangible: true } }, props.airplane, { visible: mode.type === "airplane", children: children })));
19
+ });
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../../controller/type";
2
+ export declare function AirplaneRef({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CharacterInnerGroupRef } from "../character/innerGltf";
3
+ import { AirplaneCollider } from "./collider";
4
+ import { AirplaneGroup } from "./group";
5
+ import { AirplaneInnerGroupRef } from "./innerGltf";
6
+ import { AirplaneRigidBody } from "./rigidbody";
7
+ export function AirplaneRef(_a) {
8
+ var props = _a.props, refs = _a.refs;
9
+ return (_jsx(AirplaneGroup, { ref: refs.outerGroupRef, props: props, children: _jsxs(AirplaneRigidBody, { ref: refs.rigidBodyRef, props: props, children: [_jsx(AirplaneCollider, { prop: props, ref: refs.capsuleColliderRef }), props.isRider && (_jsx(CharacterInnerGroupRef, { props: props, groundRay: props.groundRay, refs: refs, ref: refs.characterInnerRef })), _jsx(AirplaneInnerGroupRef, { ref: refs.innerGroupRef })] }) }));
10
+ }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { forwardRef, useContext } from "react";
3
- import { GaesupWorldContext } from "../../world/context";
3
+ import { GaesupWorldContext } from "../../../world/context";
4
4
  export var AirplaneInnerGroupRef = forwardRef(function (_, ref) {
5
5
  var gltf = useContext(GaesupWorldContext).airplaneGltf;
6
6
  var materials = gltf.materials, nodes = gltf.nodes;
@@ -0,0 +1,7 @@
1
+ import { RapierRigidBody } from "@react-three/rapier";
2
+ import { ReactNode } from "react";
3
+ import { controllerInnerType } from "../../../controller/type";
4
+ export declare const AirplaneRigidBody: import("react").ForwardRefExoticComponent<{
5
+ props: controllerInnerType;
6
+ children: ReactNode;
7
+ } & import("react").RefAttributes<RapierRigidBody>>;
@@ -0,0 +1,22 @@
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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { RigidBody } from "@react-three/rapier";
14
+ import { forwardRef } from "react";
15
+ export var AirplaneRigidBody = forwardRef(function (_a, ref) {
16
+ var props = _a.props, children = _a.children;
17
+ return (_jsxs(RigidBody, __assign({ colliders: false, ref: ref }, props.rigidBodyProps, { children: [props.debug && (_jsx("mesh", { visible: props.debug, children: _jsx("arrowHelper", { args: [
18
+ props.groundRay.dir,
19
+ props.groundRay.origin,
20
+ props.groundRay.length,
21
+ ] }) })), children] })));
22
+ });
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { Collider } from "@dimforge/rapier3d-compat";
3
+ import { controllerInnerType } from "../../../controller/type";
4
+ export declare const CharacterCapsuleCollider: import("react").ForwardRefExoticComponent<{
5
+ props: controllerInnerType;
6
+ } & import("react").RefAttributes<Collider>>;