gaesup-world 0.0.6 → 0.0.7

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 (605) hide show
  1. package/README.md +177 -28
  2. package/dist/gaesup/animation/actions.d.ts +25 -0
  3. package/dist/gaesup/animation/actions.js +126 -0
  4. package/dist/gaesup/animation/index.d.ts +1 -0
  5. package/dist/gaesup/animation/index.js +1 -0
  6. package/dist/gaesup/animation/passiveActions.d.ts +9 -0
  7. package/dist/gaesup/animation/passiveActions.js +16 -0
  8. package/dist/gaesup/camera/cameraCollisionDetecter.d.ts +4 -0
  9. package/dist/{src/gaesup → gaesup}/camera/control/normal.js +1 -1
  10. package/dist/{src/gaesup → gaesup}/camera/index.d.ts +2 -2
  11. package/dist/gaesup/component/active/airplane/collider.d.ts +6 -0
  12. package/dist/gaesup/component/active/airplane/collider.js +22 -0
  13. package/dist/gaesup/component/active/airplane/index.d.ts +5 -0
  14. package/dist/gaesup/component/active/airplane/index.js +11 -0
  15. package/dist/gaesup/component/active/character/collider.d.ts +6 -0
  16. package/dist/gaesup/component/active/character/collider.js +24 -0
  17. package/dist/gaesup/component/active/character/index.d.ts +5 -0
  18. package/dist/gaesup/component/active/character/index.js +16 -0
  19. package/dist/gaesup/component/active/common/InnerGroupRef.d.ts +10 -0
  20. package/dist/gaesup/component/active/common/InnerGroupRef.js +32 -0
  21. package/dist/gaesup/component/active/common/OuterGroupRef.d.ts +6 -0
  22. package/dist/{src/gaesup/tools/reducer.js → gaesup/component/active/common/OuterGroupRef.js} +6 -13
  23. package/dist/gaesup/component/active/common/RigidbodyRef.d.ts +7 -0
  24. package/dist/gaesup/component/active/common/RigidbodyRef.js +22 -0
  25. package/dist/gaesup/component/active/common/WrapperRef.d.ts +12 -0
  26. package/dist/gaesup/component/active/common/WrapperRef.js +9 -0
  27. package/dist/gaesup/component/active/common/slopeRayRef.d.ts +6 -0
  28. package/dist/gaesup/component/active/common/slopeRayRef.js +10 -0
  29. package/dist/gaesup/component/active/vehicle/collider.d.ts +3 -0
  30. package/dist/gaesup/component/active/vehicle/collider.js +9 -0
  31. package/dist/gaesup/component/active/vehicle/index.d.ts +5 -0
  32. package/dist/gaesup/component/active/vehicle/index.js +12 -0
  33. package/dist/gaesup/component/active/vehicle/wheel.d.ts +12 -0
  34. package/dist/gaesup/component/active/vehicle/wheel.js +13 -0
  35. package/dist/gaesup/component/active/vehicle/wheels.d.ts +7 -0
  36. package/dist/gaesup/component/active/vehicle/wheels.js +22 -0
  37. package/dist/gaesup/component/index.d.ts +7 -0
  38. package/dist/gaesup/component/index.js +20 -0
  39. package/dist/gaesup/component/passive/airplane/collider.d.ts +6 -0
  40. package/dist/gaesup/component/passive/airplane/collider.js +8 -0
  41. package/dist/gaesup/component/passive/airplane/index.d.ts +4 -0
  42. package/dist/gaesup/component/passive/airplane/index.js +25 -0
  43. package/dist/gaesup/component/passive/character/collider.d.ts +6 -0
  44. package/dist/gaesup/component/passive/character/collider.js +7 -0
  45. package/dist/gaesup/component/passive/character/index.d.ts +4 -0
  46. package/dist/gaesup/component/passive/character/index.js +25 -0
  47. package/dist/gaesup/component/passive/common/InnerGroupRef.d.ts +8 -0
  48. package/dist/gaesup/component/passive/common/InnerGroupRef.js +27 -0
  49. package/dist/gaesup/component/passive/common/OuterGroupRef.d.ts +4 -0
  50. package/dist/gaesup/component/passive/common/OuterGroupRef.js +6 -0
  51. package/dist/gaesup/component/passive/common/PassiveWrapperRef.d.ts +10 -0
  52. package/dist/gaesup/component/passive/common/PassiveWrapperRef.js +8 -0
  53. package/dist/gaesup/component/passive/common/RigidbodyRef.d.ts +5 -0
  54. package/dist/gaesup/component/passive/common/RigidbodyRef.js +7 -0
  55. package/dist/gaesup/component/passive/type.d.ts +30 -0
  56. package/dist/gaesup/component/passive/vehicle/collider.d.ts +7 -0
  57. package/dist/gaesup/component/passive/vehicle/collider.js +8 -0
  58. package/dist/gaesup/component/passive/vehicle/index.d.ts +4 -0
  59. package/dist/gaesup/component/passive/vehicle/index.js +26 -0
  60. package/dist/gaesup/component/passive/vehicle/wheel.d.ts +16 -0
  61. package/dist/gaesup/component/passive/vehicle/wheel.js +10 -0
  62. package/dist/gaesup/component/passive/vehicle/wheels.d.ts +11 -0
  63. package/dist/gaesup/component/passive/vehicle/wheels.js +27 -0
  64. package/dist/gaesup/component/type.d.ts +18 -0
  65. package/dist/gaesup/controller/context/index.d.ts +67 -0
  66. package/dist/{src/gaesup → gaesup}/controller/context/index.js +36 -8
  67. package/dist/gaesup/controller/context/reducer.d.ts +16 -0
  68. package/dist/gaesup/controller/context/type.d.ts +71 -0
  69. package/dist/gaesup/controller/debug/airplane.d.ts +71 -0
  70. package/dist/gaesup/controller/debug/airplane.js +71 -0
  71. package/dist/gaesup/controller/debug/cameraOption.d.ts +27 -0
  72. package/dist/gaesup/controller/debug/cameraOption.js +27 -0
  73. package/dist/gaesup/controller/debug/character.d.ts +27 -0
  74. package/dist/gaesup/controller/debug/character.js +27 -0
  75. package/dist/gaesup/controller/debug/index.d.ts +6 -0
  76. package/dist/gaesup/controller/debug/index.js +100 -0
  77. package/dist/gaesup/controller/debug/orthographicCamera.d.ts +17 -0
  78. package/dist/gaesup/controller/debug/orthographicCamera.js +17 -0
  79. package/dist/gaesup/controller/debug/perspectiveCamera.d.ts +12 -0
  80. package/dist/gaesup/controller/debug/perspectiveCamera.js +12 -0
  81. package/dist/gaesup/controller/debug/vehicle.d.ts +27 -0
  82. package/dist/gaesup/controller/debug/vehicle.js +27 -0
  83. package/dist/{src/gaesup → gaesup}/controller/index.d.ts +1 -1
  84. package/dist/{src/gaesup → gaesup}/controller/index.js +45 -34
  85. package/dist/gaesup/controller/initialize/callback/index.d.ts +2 -0
  86. package/dist/gaesup/controller/initialize/callback/index.js +57 -0
  87. package/dist/{src/gaesup/initial → gaesup/controller/initialize}/callback/type.d.ts +4 -11
  88. package/dist/gaesup/controller/initialize/index.d.ts +27 -0
  89. package/dist/{src/gaesup/initial/controller → gaesup/controller/initialize}/index.js +8 -42
  90. package/dist/{src/gaesup → gaesup}/controller/type.d.ts +23 -56
  91. package/dist/{src/gaesup → gaesup}/gaesupProps/index.d.ts +1 -1
  92. package/dist/{src/gaesup → gaesup}/gaesupProps/index.js +5 -7
  93. package/dist/gaesup/hooks/index.d.ts +1 -0
  94. package/dist/gaesup/hooks/index.js +1 -0
  95. package/dist/gaesup/hooks/useGaesupController/index.d.ts +12 -0
  96. package/dist/gaesup/hooks/useGaesupController/index.js +18 -0
  97. package/dist/gaesup/index.d.ts +8 -0
  98. package/dist/gaesup/index.js +8 -0
  99. package/dist/gaesup/mutation/airplane/index.d.ts +2 -0
  100. package/dist/gaesup/mutation/airplane/index.js +6 -0
  101. package/dist/gaesup/mutation/airplane/rotation.d.ts +2 -0
  102. package/dist/gaesup/mutation/airplane/rotation.js +9 -0
  103. package/dist/gaesup/mutation/character/index.d.ts +2 -0
  104. package/dist/gaesup/mutation/character/index.js +8 -0
  105. package/dist/gaesup/mutation/character/rotation.d.ts +2 -0
  106. package/dist/gaesup/mutation/character/rotation.js +5 -0
  107. package/dist/gaesup/mutation/common/stabilizing.d.ts +2 -0
  108. package/dist/gaesup/mutation/common/stabilizing.js +4 -0
  109. package/dist/gaesup/mutation/common/transition.d.ts +2 -0
  110. package/dist/gaesup/mutation/common/transition.js +4 -0
  111. package/dist/gaesup/mutation/index.d.ts +7 -0
  112. package/dist/gaesup/mutation/index.js +35 -0
  113. package/dist/gaesup/mutation/type.d.ts +21 -0
  114. package/dist/gaesup/mutation/vehicle/index.d.ts +2 -0
  115. package/dist/gaesup/mutation/vehicle/index.js +6 -0
  116. package/dist/gaesup/mutation/vehicle/rotation.d.ts +2 -0
  117. package/dist/gaesup/mutation/vehicle/rotation.js +5 -0
  118. package/dist/gaesup/physics/airplane/damping.js +5 -0
  119. package/dist/{src/gaesup → gaesup}/physics/airplane/direction.js +3 -2
  120. package/dist/{src/gaesup → gaesup}/physics/airplane/gravity.js +3 -2
  121. package/dist/{src/gaesup → gaesup}/physics/airplane/impulse.js +1 -1
  122. package/dist/{src/gaesup → gaesup}/physics/character/accelaration.js +1 -1
  123. package/dist/gaesup/physics/character/damping.js +4 -0
  124. package/dist/{src/gaesup → gaesup}/physics/character/direction.js +8 -9
  125. package/dist/{src/gaesup → gaesup}/physics/character/impulse.js +1 -1
  126. package/dist/{src/gaesup → gaesup}/physics/character/jump.js +2 -3
  127. package/dist/gaesup/physics/character/turn.js +9 -0
  128. package/dist/gaesup/physics/index.d.ts +2 -0
  129. package/dist/{src/gaesup → gaesup}/physics/index.js +9 -2
  130. package/dist/{src/gaesup → gaesup}/physics/type.d.ts +8 -7
  131. package/dist/gaesup/physics/vehicle/damping.js +6 -0
  132. package/dist/{src/gaesup → gaesup}/physics/vehicle/impulse.js +4 -6
  133. package/dist/gaesup/tools/gameboy/GameBoyButton.d.ts +9 -0
  134. package/dist/{src/gaesup → gaesup}/tools/gameboy/GameBoyButton.js +3 -5
  135. package/dist/{src/gaesup → gaesup}/tools/gameboy/index.d.ts +2 -1
  136. package/dist/gaesup/tools/gameboy/index.js +23 -0
  137. package/dist/{src/gaesup → gaesup}/tools/gameboy/style.css.d.ts +0 -1
  138. package/dist/{src/gaesup → gaesup}/tools/gameboy/style.css.js +4 -15
  139. package/dist/gaesup/tools/gameboy/type.d.ts +4 -0
  140. package/dist/gaesup/tools/gamepad/GamePadButton.d.ts +6 -0
  141. package/dist/{src/gaesup → gaesup}/tools/gamepad/GamePadButton.js +4 -5
  142. package/dist/gaesup/tools/gamepad/index.d.ts +2 -0
  143. package/dist/gaesup/tools/gamepad/index.js +30 -0
  144. package/dist/{src/gaesup → gaesup}/tools/gamepad/style.css.js +1 -1
  145. package/dist/gaesup/tools/gamepad/type.d.ts +6 -0
  146. package/dist/gaesup/tools/index.d.ts +5 -0
  147. package/dist/gaesup/tools/index.js +5 -0
  148. package/dist/{src/gaesup → gaesup}/tools/joystick/default.d.ts +0 -4
  149. package/dist/{src/gaesup → gaesup}/tools/joystick/default.js +0 -4
  150. package/dist/gaesup/tools/joystick/index.d.ts +2 -0
  151. package/dist/gaesup/tools/joystick/index.js +169 -0
  152. package/dist/{src/gaesup → gaesup}/tools/joystick/style.css.d.ts +0 -1
  153. package/dist/{src/gaesup → gaesup}/tools/joystick/style.css.js +5 -18
  154. package/dist/{src/gaesup → gaesup}/tools/joystick/type.d.ts +2 -7
  155. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/default.d.ts +0 -1
  156. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/default.js +0 -1
  157. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +2 -0
  158. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/index.js +7 -14
  159. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/style.css.d.ts +0 -1
  160. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/style.css.js +1 -21
  161. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/type.d.ts +8 -5
  162. package/dist/{src/gaesup → gaesup}/tools/minimap/default.d.ts +4 -3
  163. package/dist/{src/gaesup → gaesup}/tools/minimap/default.js +4 -3
  164. package/dist/gaesup/tools/minimap/index.d.ts +2 -0
  165. package/dist/gaesup/tools/minimap/index.js +66 -0
  166. package/dist/gaesup/tools/minimap/style.css.d.ts +41 -0
  167. package/dist/{src/gaesup → gaesup}/tools/minimap/style.css.js +99 -19
  168. package/dist/gaesup/tools/minimap/type.d.ts +20 -0
  169. package/dist/gaesup/tools/type.d.ts +2 -0
  170. package/dist/gaesup/utils/context.d.ts +2 -0
  171. package/dist/gaesup/utils/context.js +3 -0
  172. package/dist/gaesup/utils/debug.d.ts +29 -0
  173. package/dist/gaesup/utils/debug.js +36 -0
  174. package/dist/gaesup/utils/gltf.d.ts +7 -0
  175. package/dist/gaesup/utils/gltf.js +10 -0
  176. package/dist/gaesup/utils/type.d.ts +5 -0
  177. package/dist/{src/gaesup → gaesup}/utils/vector.d.ts +1 -0
  178. package/dist/{src/gaesup → gaesup}/utils/vector.js +3 -0
  179. package/dist/gaesup/world/context/index.d.ts +6 -0
  180. package/dist/{src/gaesup → gaesup}/world/context/index.js +28 -9
  181. package/dist/{src/gaesup → gaesup}/world/context/reducer.d.ts +10 -8
  182. package/dist/{src/gaesup → gaesup}/world/context/reducer.js +0 -3
  183. package/dist/{src/gaesup → gaesup}/world/context/type.d.ts +24 -19
  184. package/dist/gaesup/world/debug/index.d.ts +2 -0
  185. package/dist/gaesup/world/debug/index.js +27 -0
  186. package/dist/gaesup/world/debug/mode.d.ts +10 -0
  187. package/dist/gaesup/world/debug/mode.js +10 -0
  188. package/dist/gaesup/world/index.d.ts +2 -0
  189. package/dist/{src/gaesup → gaesup}/world/index.js +2 -2
  190. package/dist/gaesup/world/initalize/collider/airplane.js +24 -0
  191. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/character.js +10 -13
  192. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/gltf.d.ts +1 -1
  193. package/dist/gaesup/world/initalize/collider/gltf.js +54 -0
  194. package/dist/gaesup/world/initalize/collider/index.d.ts +2 -0
  195. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/index.js +2 -1
  196. package/dist/gaesup/world/initalize/collider/vehicle.js +55 -0
  197. package/dist/gaesup/world/initalize/index.d.ts +35 -0
  198. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/index.js +9 -4
  199. package/dist/gaesup/world/initalize/type.d.ts +13 -0
  200. package/dist/gaesup/world/type.d.ts +19 -0
  201. package/dist/gaesup/world/type.js +1 -0
  202. package/dist/index.d.ts +2 -0
  203. package/dist/index.js +2 -0
  204. package/dist/styles/global.css.d.ts +1 -0
  205. package/dist/styles/index.d.ts +2 -0
  206. package/dist/styles/index.js +2 -0
  207. package/dist/styles/sprinkles/index.css.d.ts +368 -0
  208. package/index.ts +7 -0
  209. package/package.json +10 -22
  210. package/dist/examples/select/App.d.ts +0 -2
  211. package/dist/examples/select/App.js +0 -6
  212. package/dist/examples/select/global.css.js +0 -71
  213. package/dist/examples/select/main.d.ts +0 -1
  214. package/dist/examples/select/main.js +0 -6
  215. package/dist/examples/select/platform/ControlledInput.d.ts +0 -1
  216. package/dist/examples/select/platform/ControlledInput.js +0 -40
  217. package/dist/examples/select/platform/DynamicPlatforms.d.ts +0 -8
  218. package/dist/examples/select/platform/DynamicPlatforms.js +0 -48
  219. package/dist/examples/select/platform/FloatMove.d.ts +0 -14
  220. package/dist/examples/select/platform/FloatMove.js +0 -60
  221. package/dist/examples/select/platform/Floor.d.ts +0 -1
  222. package/dist/examples/select/platform/Floor.js +0 -7
  223. package/dist/examples/select/platform/RigidObjects.d.ts +0 -1
  224. package/dist/examples/select/platform/RigidObjects.js +0 -7
  225. package/dist/examples/select/platform/RoughPlane.d.ts +0 -1
  226. package/dist/examples/select/platform/RoughPlane.js +0 -20
  227. package/dist/examples/select/platform/Slopes.d.ts +0 -1
  228. package/dist/examples/select/platform/Slopes.js +0 -27
  229. package/dist/examples/select/platform/style.css.d.ts +0 -1
  230. package/dist/examples/select/platform/style.css.js +0 -11
  231. package/dist/examples/select/src/index.d.ts +0 -5
  232. package/dist/examples/select/src/index.js +0 -139
  233. package/dist/examples/select/src/keyboardMap/character.d.ts +0 -8
  234. package/dist/examples/select/src/keyboardMap/character.js +0 -18
  235. package/dist/examples/select/src/keyboardMap/vehicle.d.ts +0 -4
  236. package/dist/examples/select/src/keyboardMap/vehicle.js +0 -8
  237. package/dist/examples/select/src/style.css.d.ts +0 -35
  238. package/dist/examples/select/src/style.css.js +0 -81
  239. package/dist/src/gaesup/animation/actions.d.ts +0 -8
  240. package/dist/src/gaesup/animation/actions.js +0 -100
  241. package/dist/src/gaesup/animation/index.d.ts +0 -1
  242. package/dist/src/gaesup/animation/index.js +0 -1
  243. package/dist/src/gaesup/camera/cameraCollisionDetecter.d.ts +0 -4
  244. package/dist/src/gaesup/component/Airplane.d.ts +0 -5
  245. package/dist/src/gaesup/component/Airplane.js +0 -14
  246. package/dist/src/gaesup/component/Character.d.ts +0 -5
  247. package/dist/src/gaesup/component/Character.js +0 -13
  248. package/dist/src/gaesup/component/Vehicle.d.ts +0 -5
  249. package/dist/src/gaesup/component/Vehicle.js +0 -15
  250. package/dist/src/gaesup/component/gltf/AirplaneGltf.d.ts +0 -2
  251. package/dist/src/gaesup/component/gltf/AirplaneGltf.js +0 -13
  252. package/dist/src/gaesup/component/gltf/CharacterGltf.d.ts +0 -14
  253. package/dist/src/gaesup/component/gltf/CharacterGltf.js +0 -46
  254. package/dist/src/gaesup/component/gltf/VehicleGltf.d.ts +0 -2
  255. package/dist/src/gaesup/component/gltf/VehicleGltf.js +0 -13
  256. package/dist/src/gaesup/component/gltf/WheelJoint.d.ts +0 -4
  257. package/dist/src/gaesup/component/gltf/WheelJoint.js +0 -21
  258. package/dist/src/gaesup/component/gltf/index.d.ts +0 -4
  259. package/dist/src/gaesup/component/gltf/index.js +0 -4
  260. package/dist/src/gaesup/component/gltf/type.d.ts +0 -10
  261. package/dist/src/gaesup/component/index.d.ts +0 -5
  262. package/dist/src/gaesup/component/index.js +0 -5
  263. package/dist/src/gaesup/component/ref/airplane.d.ts +0 -16
  264. package/dist/src/gaesup/component/ref/airplane.js +0 -46
  265. package/dist/src/gaesup/component/ref/character.d.ts +0 -20
  266. package/dist/src/gaesup/component/ref/character.js +0 -56
  267. package/dist/src/gaesup/component/ref/index.d.ts +0 -3
  268. package/dist/src/gaesup/component/ref/index.js +0 -3
  269. package/dist/src/gaesup/component/ref/vehicle.d.ts +0 -24
  270. package/dist/src/gaesup/component/ref/vehicle.js +0 -41
  271. package/dist/src/gaesup/component/setInit.d.ts +0 -3
  272. package/dist/src/gaesup/component/setInit.js +0 -10
  273. package/dist/src/gaesup/controller/context/index.d.ts +0 -40
  274. package/dist/src/gaesup/controller/context/reducer.d.ts +0 -14
  275. package/dist/src/gaesup/controller/context/type.d.ts +0 -52
  276. package/dist/src/gaesup/index.d.ts +0 -8
  277. package/dist/src/gaesup/index.js +0 -8
  278. package/dist/src/gaesup/initial/callback/index.d.ts +0 -2
  279. package/dist/src/gaesup/initial/callback/index.js +0 -51
  280. package/dist/src/gaesup/initial/controller/index.d.ts +0 -29
  281. package/dist/src/gaesup/initial/controller/initDebug.d.ts +0 -24
  282. package/dist/src/gaesup/initial/controller/initDebug.js +0 -110
  283. package/dist/src/gaesup/initial/gaesupWorld/collider/airplane.js +0 -25
  284. package/dist/src/gaesup/initial/gaesupWorld/collider/gltf.js +0 -71
  285. package/dist/src/gaesup/initial/gaesupWorld/collider/index.d.ts +0 -6
  286. package/dist/src/gaesup/initial/gaesupWorld/collider/vehicle.js +0 -40
  287. package/dist/src/gaesup/initial/gaesupWorld/index.d.ts +0 -33
  288. package/dist/src/gaesup/initial/gaesupWorld/type.d.ts +0 -28
  289. package/dist/src/gaesup/initial/index.d.ts +0 -3
  290. package/dist/src/gaesup/initial/index.js +0 -3
  291. package/dist/src/gaesup/physics/airplane/damping.js +0 -4
  292. package/dist/src/gaesup/physics/character/damping.js +0 -4
  293. package/dist/src/gaesup/physics/character/turn.js +0 -6
  294. package/dist/src/gaesup/physics/index.d.ts +0 -2
  295. package/dist/src/gaesup/physics/vehicle/damping.js +0 -6
  296. package/dist/src/gaesup/tools/context.d.ts +0 -4
  297. package/dist/src/gaesup/tools/context.js +0 -3
  298. package/dist/src/gaesup/tools/gameboy/GameBoyButton.d.ts +0 -7
  299. package/dist/src/gaesup/tools/gameboy/default.d.ts +0 -3
  300. package/dist/src/gaesup/tools/gameboy/default.js +0 -3
  301. package/dist/src/gaesup/tools/gameboy/index.js +0 -21
  302. package/dist/src/gaesup/tools/gameboy/type.d.ts +0 -7
  303. package/dist/src/gaesup/tools/gamepad/GamePadButton.d.ts +0 -4
  304. package/dist/src/gaesup/tools/gamepad/index.d.ts +0 -1
  305. package/dist/src/gaesup/tools/gamepad/index.js +0 -30
  306. package/dist/src/gaesup/tools/gamepad/type.d.ts +0 -8
  307. package/dist/src/gaesup/tools/index.d.ts +0 -2
  308. package/dist/src/gaesup/tools/index.js +0 -44
  309. package/dist/src/gaesup/tools/joystick/index.d.ts +0 -2
  310. package/dist/src/gaesup/tools/joystick/index.js +0 -138
  311. package/dist/src/gaesup/tools/keyBoardToolTip/index.d.ts +0 -1
  312. package/dist/src/gaesup/tools/minimap/index.d.ts +0 -1
  313. package/dist/src/gaesup/tools/minimap/index.js +0 -57
  314. package/dist/src/gaesup/tools/minimap/style.css.d.ts +0 -9
  315. package/dist/src/gaesup/tools/minimap/type.d.ts +0 -24
  316. package/dist/src/gaesup/tools/reducer.d.ts +0 -11
  317. package/dist/src/gaesup/tools/style.css.d.ts +0 -3
  318. package/dist/src/gaesup/tools/style.css.js +0 -31
  319. package/dist/src/gaesup/tools/type.d.ts +0 -26
  320. package/dist/src/gaesup/utils/constant.d.ts +0 -1
  321. package/dist/src/gaesup/utils/constant.js +0 -1
  322. package/dist/src/gaesup/world/context/index.d.ts +0 -5
  323. package/dist/src/gaesup/world/index.d.ts +0 -2
  324. package/dist/src/gaesup/world/type.d.ts +0 -9
  325. package/dist/src/index.d.ts +0 -1
  326. package/dist/src/index.js +0 -1
  327. package/dist/src/styles/sprinkles/index.css.d.ts +0 -1
  328. package/index.html +0 -14
  329. package/src/gaesup/animation/actions.ts +0 -123
  330. package/src/gaesup/animation/index.ts +0 -1
  331. package/src/gaesup/camera/cameraCollisionDetecter.tsx +0 -53
  332. package/src/gaesup/camera/control/map.ts +0 -10
  333. package/src/gaesup/camera/control/normal.ts +0 -16
  334. package/src/gaesup/camera/control/orbit.ts +0 -31
  335. package/src/gaesup/camera/index.tsx +0 -102
  336. package/src/gaesup/camera/type.ts +0 -17
  337. package/src/gaesup/component/Airplane.tsx +0 -52
  338. package/src/gaesup/component/Character.tsx +0 -58
  339. package/src/gaesup/component/Vehicle.tsx +0 -43
  340. package/src/gaesup/component/gltf/AirplaneGltf.tsx +0 -31
  341. package/src/gaesup/component/gltf/CharacterGltf.tsx +0 -96
  342. package/src/gaesup/component/gltf/VehicleGltf.tsx +0 -31
  343. package/src/gaesup/component/gltf/WheelJoint.tsx +0 -39
  344. package/src/gaesup/component/gltf/index.ts +0 -4
  345. package/src/gaesup/component/gltf/type.ts +0 -7
  346. package/src/gaesup/component/index.ts +0 -5
  347. package/src/gaesup/component/ref/airplane.tsx +0 -97
  348. package/src/gaesup/component/ref/character.tsx +0 -137
  349. package/src/gaesup/component/ref/index.ts +0 -3
  350. package/src/gaesup/component/ref/vehicle.tsx +0 -122
  351. package/src/gaesup/component/setInit.ts +0 -14
  352. package/src/gaesup/controller/context/index.ts +0 -53
  353. package/src/gaesup/controller/context/reducer.ts +0 -18
  354. package/src/gaesup/controller/context/type.ts +0 -63
  355. package/src/gaesup/controller/index.tsx +0 -123
  356. package/src/gaesup/controller/type.ts +0 -149
  357. package/src/gaesup/gaesupProps/index.tsx +0 -66
  358. package/src/gaesup/index.ts +0 -8
  359. package/src/gaesup/initial/callback/index.ts +0 -73
  360. package/src/gaesup/initial/callback/type.ts +0 -47
  361. package/src/gaesup/initial/controller/index.ts +0 -157
  362. package/src/gaesup/initial/controller/initDebug.ts +0 -102
  363. package/src/gaesup/initial/gaesupWorld/collider/airplane.ts +0 -26
  364. package/src/gaesup/initial/gaesupWorld/collider/character.ts +0 -32
  365. package/src/gaesup/initial/gaesupWorld/collider/gltf.ts +0 -92
  366. package/src/gaesup/initial/gaesupWorld/collider/index.ts +0 -26
  367. package/src/gaesup/initial/gaesupWorld/collider/vehicle.ts +0 -43
  368. package/src/gaesup/initial/gaesupWorld/index.ts +0 -84
  369. package/src/gaesup/initial/gaesupWorld/type.ts +0 -38
  370. package/src/gaesup/initial/index.ts +0 -3
  371. package/src/gaesup/physics/airplane/currentSetting.ts +0 -20
  372. package/src/gaesup/physics/airplane/damping.ts +0 -6
  373. package/src/gaesup/physics/airplane/direction.ts +0 -79
  374. package/src/gaesup/physics/airplane/gravity.ts +0 -11
  375. package/src/gaesup/physics/airplane/impulse.ts +0 -28
  376. package/src/gaesup/physics/airplane/index.tsx +0 -16
  377. package/src/gaesup/physics/airplane/turn.ts +0 -11
  378. package/src/gaesup/physics/character/accelaration.ts +0 -14
  379. package/src/gaesup/physics/character/currentSetting.ts +0 -20
  380. package/src/gaesup/physics/character/damping.ts +0 -6
  381. package/src/gaesup/physics/character/direction.ts +0 -104
  382. package/src/gaesup/physics/character/impulse.ts +0 -24
  383. package/src/gaesup/physics/character/index.tsx +0 -20
  384. package/src/gaesup/physics/character/jump.ts +0 -21
  385. package/src/gaesup/physics/character/stabilizing.ts +0 -6
  386. package/src/gaesup/physics/character/turn.ts +0 -17
  387. package/src/gaesup/physics/check/ground.ts +0 -19
  388. package/src/gaesup/physics/check/index.ts +0 -12
  389. package/src/gaesup/physics/check/moving.ts +0 -20
  390. package/src/gaesup/physics/check/rotate.ts +0 -13
  391. package/src/gaesup/physics/check/slope.ts +0 -50
  392. package/src/gaesup/physics/index.ts +0 -50
  393. package/src/gaesup/physics/type.ts +0 -29
  394. package/src/gaesup/physics/vehicle/currentSetting.ts +0 -20
  395. package/src/gaesup/physics/vehicle/damping.ts +0 -12
  396. package/src/gaesup/physics/vehicle/direction.ts +0 -48
  397. package/src/gaesup/physics/vehicle/impulse.ts +0 -39
  398. package/src/gaesup/physics/vehicle/index.tsx +0 -14
  399. package/src/gaesup/physics/vehicle/turn.ts +0 -11
  400. package/src/gaesup/styles.css.ts +0 -26
  401. package/src/gaesup/tools/context.ts +0 -6
  402. package/src/gaesup/tools/gameboy/GameBoyButton.tsx +0 -47
  403. package/src/gaesup/tools/gameboy/default.ts +0 -3
  404. package/src/gaesup/tools/gameboy/index.tsx +0 -37
  405. package/src/gaesup/tools/gameboy/style.css.ts +0 -96
  406. package/src/gaesup/tools/gameboy/type.ts +0 -8
  407. package/src/gaesup/tools/gamepad/GamePadButton.tsx +0 -49
  408. package/src/gaesup/tools/gamepad/default.ts +0 -3
  409. package/src/gaesup/tools/gamepad/index.tsx +0 -53
  410. package/src/gaesup/tools/gamepad/style.css.ts +0 -71
  411. package/src/gaesup/tools/gamepad/type.ts +0 -9
  412. package/src/gaesup/tools/index.tsx +0 -82
  413. package/src/gaesup/tools/joystick/default.ts +0 -76
  414. package/src/gaesup/tools/joystick/index.tsx +0 -200
  415. package/src/gaesup/tools/joystick/style.css.ts +0 -49
  416. package/src/gaesup/tools/joystick/type.ts +0 -32
  417. package/src/gaesup/tools/jumpPoint/index.tsx +0 -28
  418. package/src/gaesup/tools/jumpPoint/style.css.ts +0 -34
  419. package/src/gaesup/tools/keyBoardToolTip/constant.ts +0 -128
  420. package/src/gaesup/tools/keyBoardToolTip/default.ts +0 -14
  421. package/src/gaesup/tools/keyBoardToolTip/index.tsx +0 -92
  422. package/src/gaesup/tools/keyBoardToolTip/style.css.ts +0 -49
  423. package/src/gaesup/tools/keyBoardToolTip/type.ts +0 -37
  424. package/src/gaesup/tools/minimap/default.ts +0 -9
  425. package/src/gaesup/tools/minimap/index.tsx +0 -78
  426. package/src/gaesup/tools/minimap/style.css.ts +0 -144
  427. package/src/gaesup/tools/minimap/type.ts +0 -27
  428. package/src/gaesup/tools/pushKey/index.ts +0 -26
  429. package/src/gaesup/tools/reducer.ts +0 -21
  430. package/src/gaesup/tools/style.css.ts +0 -34
  431. package/src/gaesup/tools/type.ts +0 -26
  432. package/src/gaesup/utils/constant.ts +0 -1
  433. package/src/gaesup/utils/index.ts +0 -3
  434. package/src/gaesup/utils/ray.ts +0 -23
  435. package/src/gaesup/utils/ref.ts +0 -17
  436. package/src/gaesup/utils/vector.ts +0 -40
  437. package/src/gaesup/world/context/index.ts +0 -133
  438. package/src/gaesup/world/context/reducer.ts +0 -21
  439. package/src/gaesup/world/context/type.ts +0 -139
  440. package/src/gaesup/world/index.tsx +0 -14
  441. package/src/gaesup/world/type.ts +0 -10
  442. package/src/index.ts +0 -1
  443. package/src/styles/constants/boxshadow.css.ts +0 -10
  444. package/src/styles/constants/constant.css.ts +0 -81
  445. package/src/styles/constants/direction.css.ts +0 -168
  446. package/src/styles/constants/flex.css.ts +0 -68
  447. package/src/styles/constants/gradient.css.ts +0 -10
  448. package/src/styles/constants/grid.css.ts +0 -37
  449. package/src/styles/constants/palette.css.ts +0 -91
  450. package/src/styles/constants/translate.css.ts +0 -129
  451. package/src/styles/global.css.ts +0 -91
  452. package/src/styles/recipe/base.css.ts +0 -31
  453. package/src/styles/recipe/button.css.ts +0 -109
  454. package/src/styles/recipe/index.css.ts +0 -134
  455. package/src/styles/recipe/input.css.ts +0 -33
  456. package/src/styles/sprinkles/color.css.ts +0 -62
  457. package/src/styles/sprinkles/direction.css.ts +0 -26
  458. package/src/styles/sprinkles/display.css.ts +0 -25
  459. package/src/styles/sprinkles/fontSize.css.ts +0 -25
  460. package/src/styles/sprinkles/grid.css.ts +0 -28
  461. package/src/styles/sprinkles/index.css.ts +0 -22
  462. package/src/styles/sprinkles/margin.css.ts +0 -30
  463. package/src/styles/sprinkles/padding.css.ts +0 -30
  464. package/src/styles/sprinkles/position.css.ts +0 -14
  465. package/src/styles/sprinkles/size.css.ts +0 -23
  466. package/src/styles/theme.css.ts +0 -98
  467. package/tsconfig.json +0 -22
  468. package/tsconfig.node.json +0 -10
  469. package/vite.config.ts +0 -9
  470. package/dist/{src/gaesup → gaesup}/camera/cameraCollisionDetecter.js +0 -0
  471. package/dist/{src/gaesup → gaesup}/camera/control/map.d.ts +0 -0
  472. package/dist/{src/gaesup → gaesup}/camera/control/map.js +0 -0
  473. package/dist/{src/gaesup → gaesup}/camera/control/normal.d.ts +0 -0
  474. package/dist/{src/gaesup → gaesup}/camera/control/orbit.d.ts +0 -0
  475. package/dist/{src/gaesup → gaesup}/camera/control/orbit.js +0 -0
  476. package/dist/{src/gaesup → gaesup}/camera/index.js +0 -0
  477. package/dist/{src/gaesup → gaesup}/camera/type.d.ts +0 -0
  478. package/dist/{src/gaesup → gaesup}/camera/type.js +0 -0
  479. package/dist/{src/gaesup/component/gltf → gaesup/component/passive}/type.js +0 -0
  480. package/dist/{src/gaesup/controller/context → gaesup/component}/type.js +0 -0
  481. package/dist/{src/gaesup → gaesup}/controller/context/reducer.js +0 -0
  482. package/dist/{src/gaesup/controller → gaesup/controller/context}/type.js +0 -0
  483. package/dist/{src/gaesup/initial → gaesup/controller/initialize}/callback/type.js +0 -0
  484. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/controller}/type.js +0 -0
  485. package/dist/{src/gaesup/physics → gaesup/mutation}/type.js +0 -0
  486. package/dist/{src/gaesup → gaesup}/physics/airplane/currentSetting.d.ts +0 -0
  487. package/dist/{src/gaesup → gaesup}/physics/airplane/currentSetting.js +0 -0
  488. package/dist/{src/gaesup → gaesup}/physics/airplane/damping.d.ts +0 -0
  489. package/dist/{src/gaesup → gaesup}/physics/airplane/direction.d.ts +0 -0
  490. package/dist/{src/gaesup → gaesup}/physics/airplane/gravity.d.ts +0 -0
  491. package/dist/{src/gaesup → gaesup}/physics/airplane/impulse.d.ts +0 -0
  492. package/dist/{src/gaesup → gaesup}/physics/airplane/index.d.ts +0 -0
  493. package/dist/{src/gaesup → gaesup}/physics/airplane/index.js +0 -0
  494. package/dist/{src/gaesup → gaesup}/physics/airplane/turn.d.ts +0 -0
  495. package/dist/{src/gaesup → gaesup}/physics/airplane/turn.js +0 -0
  496. package/dist/{src/gaesup → gaesup}/physics/character/accelaration.d.ts +0 -0
  497. package/dist/{src/gaesup → gaesup}/physics/character/currentSetting.d.ts +0 -0
  498. package/dist/{src/gaesup → gaesup}/physics/character/currentSetting.js +0 -0
  499. package/dist/{src/gaesup → gaesup}/physics/character/damping.d.ts +0 -0
  500. package/dist/{src/gaesup → gaesup}/physics/character/direction.d.ts +0 -0
  501. package/dist/{src/gaesup → gaesup}/physics/character/impulse.d.ts +0 -0
  502. package/dist/{src/gaesup → gaesup}/physics/character/index.d.ts +0 -0
  503. package/dist/{src/gaesup → gaesup}/physics/character/index.js +0 -0
  504. package/dist/{src/gaesup → gaesup}/physics/character/jump.d.ts +0 -0
  505. package/dist/{src/gaesup → gaesup}/physics/character/stabilizing.d.ts +0 -0
  506. package/dist/{src/gaesup → gaesup}/physics/character/stabilizing.js +0 -0
  507. package/dist/{src/gaesup → gaesup}/physics/character/turn.d.ts +0 -0
  508. package/dist/{src/gaesup → gaesup}/physics/check/ground.d.ts +0 -0
  509. package/dist/{src/gaesup → gaesup}/physics/check/ground.js +0 -0
  510. package/dist/{src/gaesup → gaesup}/physics/check/index.d.ts +0 -0
  511. package/dist/{src/gaesup → gaesup}/physics/check/index.js +0 -0
  512. package/dist/{src/gaesup → gaesup}/physics/check/moving.d.ts +0 -0
  513. package/dist/{src/gaesup → gaesup}/physics/check/moving.js +0 -0
  514. package/dist/{src/gaesup → gaesup}/physics/check/rotate.d.ts +0 -0
  515. package/dist/{src/gaesup → gaesup}/physics/check/rotate.js +0 -0
  516. package/dist/{src/gaesup → gaesup}/physics/check/slope.d.ts +0 -0
  517. package/dist/{src/gaesup → gaesup}/physics/check/slope.js +0 -0
  518. package/dist/{src/gaesup/tools/gameboy → gaesup/physics}/type.js +0 -0
  519. package/dist/{src/gaesup → gaesup}/physics/vehicle/currentSetting.d.ts +0 -0
  520. package/dist/{src/gaesup → gaesup}/physics/vehicle/currentSetting.js +0 -0
  521. package/dist/{src/gaesup → gaesup}/physics/vehicle/damping.d.ts +0 -0
  522. package/dist/{src/gaesup → gaesup}/physics/vehicle/direction.d.ts +0 -0
  523. package/dist/{src/gaesup → gaesup}/physics/vehicle/direction.js +0 -0
  524. package/dist/{src/gaesup → gaesup}/physics/vehicle/impulse.d.ts +0 -0
  525. package/dist/{src/gaesup → gaesup}/physics/vehicle/index.d.ts +0 -0
  526. package/dist/{src/gaesup → gaesup}/physics/vehicle/index.js +0 -0
  527. package/dist/{src/gaesup → gaesup}/physics/vehicle/turn.d.ts +0 -0
  528. package/dist/{src/gaesup → gaesup}/physics/vehicle/turn.js +0 -0
  529. package/dist/{src/gaesup → gaesup}/styles.css.d.ts +0 -0
  530. package/dist/{src/gaesup → gaesup}/styles.css.js +0 -0
  531. package/dist/{src/gaesup/tools/gamepad → gaesup/tools/gameboy}/type.js +0 -0
  532. package/dist/{src/gaesup → gaesup}/tools/gamepad/default.d.ts +0 -0
  533. package/dist/{src/gaesup → gaesup}/tools/gamepad/default.js +0 -0
  534. package/dist/{src/gaesup → gaesup}/tools/gamepad/style.css.d.ts +0 -0
  535. package/dist/{src/gaesup/tools/joystick → gaesup/tools/gamepad}/type.js +0 -0
  536. package/dist/{src/gaesup/tools/keyBoardToolTip → gaesup/tools/joystick}/type.js +0 -0
  537. package/dist/{src/gaesup → gaesup}/tools/jumpPoint/index.d.ts +0 -0
  538. package/dist/{src/gaesup → gaesup}/tools/jumpPoint/index.js +0 -0
  539. package/dist/{src/gaesup → gaesup}/tools/jumpPoint/style.css.d.ts +0 -0
  540. package/dist/{src/gaesup → gaesup}/tools/jumpPoint/style.css.js +0 -0
  541. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/constant.d.ts +0 -0
  542. package/dist/{src/gaesup → gaesup}/tools/keyBoardToolTip/constant.js +0 -0
  543. package/dist/{src/gaesup/tools/minimap → gaesup/tools/keyBoardToolTip}/type.js +0 -0
  544. package/dist/{src/gaesup/tools → gaesup/tools/minimap}/type.js +0 -0
  545. package/dist/{src/gaesup → gaesup}/tools/pushKey/index.d.ts +0 -0
  546. package/dist/{src/gaesup → gaesup}/tools/pushKey/index.js +0 -0
  547. package/dist/{src/gaesup/world/context → gaesup/tools}/type.js +0 -0
  548. package/dist/{src/gaesup → gaesup}/utils/index.d.ts +0 -0
  549. package/dist/{src/gaesup → gaesup}/utils/index.js +0 -0
  550. package/dist/{src/gaesup → gaesup}/utils/ray.d.ts +0 -0
  551. package/dist/{src/gaesup → gaesup}/utils/ray.js +0 -0
  552. package/dist/{src/gaesup → gaesup}/utils/ref.d.ts +0 -0
  553. package/dist/{src/gaesup → gaesup}/utils/ref.js +0 -0
  554. package/dist/{src/gaesup/world → gaesup/utils}/type.js +0 -0
  555. package/dist/{examples/select/global.css.d.ts → gaesup/world/context/type.js} +0 -0
  556. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/airplane.d.ts +0 -0
  557. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/character.d.ts +0 -0
  558. package/dist/{src/gaesup/initial/gaesupWorld → gaesup/world/initalize}/collider/vehicle.d.ts +0 -0
  559. package/dist/{src/styles/global.css.d.ts → gaesup/world/initalize/type.js} +0 -0
  560. package/dist/{src/styles → styles}/constants/boxshadow.css.d.ts +0 -0
  561. package/dist/{src/styles → styles}/constants/boxshadow.css.js +0 -0
  562. package/dist/{src/styles → styles}/constants/constant.css.d.ts +0 -0
  563. package/dist/{src/styles → styles}/constants/constant.css.js +0 -0
  564. package/dist/{src/styles → styles}/constants/direction.css.d.ts +0 -0
  565. package/dist/{src/styles → styles}/constants/direction.css.js +0 -0
  566. package/dist/{src/styles → styles}/constants/flex.css.d.ts +0 -0
  567. package/dist/{src/styles → styles}/constants/flex.css.js +0 -0
  568. package/dist/{src/styles → styles}/constants/gradient.css.d.ts +0 -0
  569. package/dist/{src/styles → styles}/constants/gradient.css.js +0 -0
  570. package/dist/{src/styles → styles}/constants/grid.css.d.ts +0 -0
  571. package/dist/{src/styles → styles}/constants/grid.css.js +0 -0
  572. package/dist/{src/styles → styles}/constants/palette.css.d.ts +0 -0
  573. package/dist/{src/styles → styles}/constants/palette.css.js +0 -0
  574. package/dist/{src/styles → styles}/constants/translate.css.d.ts +0 -0
  575. package/dist/{src/styles → styles}/constants/translate.css.js +0 -0
  576. package/dist/{src/styles → styles}/global.css.js +0 -0
  577. package/dist/{src/styles → styles}/recipe/base.css.d.ts +0 -0
  578. package/dist/{src/styles → styles}/recipe/base.css.js +0 -0
  579. package/dist/{src/styles → styles}/recipe/button.css.d.ts +0 -0
  580. package/dist/{src/styles → styles}/recipe/button.css.js +0 -0
  581. package/dist/{src/styles → styles}/recipe/index.css.d.ts +0 -0
  582. package/dist/{src/styles → styles}/recipe/index.css.js +0 -0
  583. package/dist/{src/styles → styles}/recipe/input.css.d.ts +0 -0
  584. package/dist/{src/styles → styles}/recipe/input.css.js +0 -0
  585. package/dist/{src/styles → styles}/sprinkles/color.css.d.ts +14 -14
  586. package/dist/{src/styles → styles}/sprinkles/color.css.js +0 -0
  587. package/dist/{src/styles → styles}/sprinkles/direction.css.d.ts +24 -24
  588. package/dist/{src/styles → styles}/sprinkles/direction.css.js +0 -0
  589. package/dist/{src/styles → styles}/sprinkles/display.css.d.ts +2 -2
  590. package/dist/{src/styles → styles}/sprinkles/display.css.js +0 -0
  591. package/dist/{src/styles → styles}/sprinkles/fontSize.css.d.ts +12 -12
  592. package/dist/{src/styles → styles}/sprinkles/fontSize.css.js +0 -0
  593. package/dist/{src/styles → styles}/sprinkles/grid.css.d.ts +0 -0
  594. package/dist/{src/styles → styles}/sprinkles/grid.css.js +0 -0
  595. package/dist/{src/styles → styles}/sprinkles/index.css.js +0 -0
  596. package/dist/{src/styles → styles}/sprinkles/margin.css.d.ts +55 -55
  597. package/dist/{src/styles → styles}/sprinkles/margin.css.js +0 -0
  598. package/dist/{src/styles → styles}/sprinkles/padding.css.d.ts +55 -55
  599. /package/dist/{src/styles → styles}/sprinkles/padding.css.js +0 -0
  600. /package/dist/{src/styles → styles}/sprinkles/position.css.d.ts +0 -0
  601. /package/dist/{src/styles → styles}/sprinkles/position.css.js +0 -0
  602. /package/dist/{src/styles → styles}/sprinkles/size.css.d.ts +0 -0
  603. /package/dist/{src/styles → styles}/sprinkles/size.css.js +0 -0
  604. /package/dist/{src/styles → styles}/theme.css.d.ts +0 -0
  605. /package/dist/{src/styles → styles}/theme.css.js +0 -0
package/README.md CHANGED
@@ -1,51 +1,200 @@
1
1
  # Gaesup World
2
2
 
3
- Web 3D Character Controller and World Platform Library
4
-
5
- [![npm (tag)](https://img.shields.io/npm/v/leva?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/leva)
6
-
7
- @react-three/fiber
8
- @react-three/drei
9
- three @types/three
10
- @react-three/rapier
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)
11
5
 
12
- Gaesup World는 @react/three-fiber, @react/three-drei, rapier 를 사용하여 웹 3D 환경에서 캐릭터, 비행기, 자동자 등의 컨트롤 도구를 제공하는 라이브러리입니다.
6
+ Web 3D Character Controller and World Platform Library
13
7
 
14
- 이 컨트롤러는 캐릭터의 움직임, 애니메이션, 상호작용을 쉽게 관리할 수 있도록 설계되었습니다. 가상의 세계에서 캐릭터를 움직이거나 탈것을 쉽게 활용할 수 있고, 미니맵이나 조이스틱 등의 유틸 등도 설계되어 있습니다
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!
11
+
12
+ ---
13
+
14
+ ## introduction
15
+
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.
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
+ ```
15
70
 
16
- ## 특징
71
+ ### Features
17
72
 
18
- - React Three Fiber를 기반으로 하는 3D 캐릭터 컨트롤
19
- - 간단한 API를 통한 캐릭터 움직임 및 애니메이션 제어
20
- - 확장 가능한 구조로 다양한 커스터마이징 지원
21
- - 가벼운 라이브러리로 빠른 로딩 및 성능 최적화
73
+ - 3D character control based on React Three Fiber.
74
+ - Simple API for controlling character movement and animation.
75
+ - Extensible structure for various customizations.
76
+ - Lightweight library for fast loading and performance optimization.
22
77
 
23
- ## 설치 방법
78
+ ### Installation
24
79
 
25
80
  ```bash
26
81
  npm install @react-three/fiber @react-three/drei three @types/three @react-three/rapier gaesup-world
27
82
  ```
28
83
 
29
- 또는
84
+ Or
30
85
 
31
86
  ```bash
32
87
  yarn add @react-three/fiber @react-three/drei three @types/three @react-three/rapier gaesup-world
33
88
  ```
34
89
 
35
- ## 문서
90
+ ### Documentation
91
+
92
+ it is detailed usage methods and API documentation
93
+
94
+ - [how to contribute](#how-to-contribute)
95
+
96
+ ### How to Contribute
97
+
98
+ If you would like to contribute to this project, please follow these steps:
99
+
100
+ 1. Fork the project.
101
+ 2. Create a new Feature branch (`git checkout -b feature/AmazingFeature`).
102
+ 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`).
103
+ 4. Push to the branch (`git push origin feature/AmazingFeature`).
104
+ 5. Create a Pull Request.
105
+
106
+ ### License
107
+
108
+ This project is distributed under the MIT License.
109
+
110
+ ---
111
+
112
+ ## Controller
113
+
114
+ #### [Controller](#controller)
115
+
116
+ - [Character](#character)
117
+ - [Vehicle](#vehicle)
118
+ - [Airplane](#airplane)
119
+
120
+ ## Character
121
+
122
+ This is the character control in Gaesup World.
123
+
124
+ - Possible Camera Types
125
+
126
+ | Name | Camera | Control | Info |
127
+ | ------ | ------------------- | ------------- | --------------------------------------------------------------------------------------------- |
128
+ | Normal | Perspective Camera | Orbit Control | Positioned parallel to the Z-axis from the character's location and not affected by rotation. |
129
+ | Orbit | Perspective Camera | Orbit Control | Moves with the character and rotates according to the character's direction. |
130
+ | Map | Orthographic Camera | Map Control | A top-down control view. |
131
+
132
+ - Controller Tools
133
+
134
+ | Name | Info |
135
+ | -------- | ----------------------------------------------------------------------- |
136
+ | Keyboard | A standard keyboard tool. You can see where on the keyboard is clicked. |
137
+ | Joystick | A joystick implementation tool. It works on mobile devices. |
138
+ | Gameboy | A Gameboy implementation tool. It works on mobile devices. |
139
+
140
+ ## Vehicle
141
+
142
+ This is the vehicle control in Gaesup World. Characters can board the vehicle.
143
+
144
+ - Possible Camera Types
145
+
146
+ | Name | Camera | Control | Info |
147
+ | ------ | ------------------- | ------------- | --------------------------------------------------------------------------------------------- |
148
+ | Normal | Perspective Camera | Orbit Control | Positioned parallel to the Z-axis from the character's location and not affected by rotation. |
149
+ | Orbit | Perspective Camera | Orbit Control | Moves with the character and rotates according to the character's direction. |
150
+ | Map | Orthographic Camera | Map Control | A top-down control view. |
151
+
152
+ - Controller Tools
153
+
154
+ | Name | Info |
155
+ | -------- | ----------------------------------------------------------------------- |
156
+ | Keyboard | A standard keyboard tool. You can see where on the keyboard is clicked. |
157
+ | Joystick | A joystick implementation tool. It works on mobile devices. |
158
+ | Gameboy | A Gameboy implementation tool. It works on mobile devices. |
159
+
160
+ ## Airplane
161
+
162
+ This is the airplane control in Gaesup World. Characters can board the airplane.
163
+
164
+ - Possible Camera Types
165
+
166
+ | Name | Camera | Control | Info |
167
+ | ------ | ------------------- | ------------- | --------------------------------------------------------------------------------------------- |
168
+ | Normal | Perspective Camera | Orbit Control | Positioned parallel to the Z-axis from the character's location and not affected by rotation. |
169
+ | Orbit | Perspective Camera | Orbit Control | Moves with the character and rotates according to the character's direction. |
170
+ | Map | Orthographic Camera | Map Control | A top-down control view. |
171
+
172
+ - Controller Tools
173
+
174
+ | Name | Info |
175
+ | -------- | ----------------------------------------------------------------------- |
176
+ | Keyboard | A standard keyboard tool. You can see where on the keyboard is clicked. |
177
+ | Joystick | A joystick implementation tool. It works on mobile devices. |
178
+ | Gameboy | A Gameboy implementation tool. It works on mobile devices. |
179
+
180
+ ---
181
+
182
+ ## Tools
183
+
184
+ #### [Tools](#tools)
185
+
186
+ #### [joystick](#joystick)
187
+
188
+ #### [keyboardtooltip](#keyboard tooltip)
36
189
 
37
- 더 자세한 사용 방법 및 API 문서는 [여기](#)를 참조하세요.
190
+ #### [minimap](#minimap)
38
191
 
39
- ## 기여 방법
192
+ #### [gameboy](#gameboy)
40
193
 
41
- 이 프로젝트에 기여하고 싶으시다면, 다음 단계를 따라주세요:
194
+ ## joystick
42
195
 
43
- 1. 프로젝트를 Fork합니다.
44
- 2. 새로운 Feature 브랜치를 생성합니다 (`git checkout -b feature/AmazingFeature`).
45
- 3. 변경사항을 Commit합니다 (`git commit -m 'Add some AmazingFeature'`).
46
- 4. 브랜치에 Push합니다 (`git push origin feature/AmazingFeature`).
47
- 5. Pull Request를 생성합니다.
196
+ ## keyboard tooltip
48
197
 
49
- ## 라이센스
198
+ ## minimap
50
199
 
51
- 이 프로젝트는 [MIT 라이센스](LICENSE) 하에 배포됩니다.
200
+ ## gameboy
@@ -0,0 +1,25 @@
1
+ import { Ref } from "react";
2
+ import { Object3D, Object3DEventMap } from "three";
3
+ import { animationTagType, groundRayType } from "../controller/type";
4
+ export type playActionsType = {
5
+ groundRay: groundRayType;
6
+ };
7
+ export type actionsType = {
8
+ [x: string]: THREE.AnimationAction | null;
9
+ };
10
+ export type playResultType = {
11
+ actions: actionsType;
12
+ ref: Ref<Object3D<Object3DEventMap>>;
13
+ };
14
+ export declare function usePlayActions(): {
15
+ resultRef: {
16
+ character: playResultType;
17
+ vehicle: playResultType;
18
+ airplane: playResultType;
19
+ };
20
+ play: (tag: keyof animationTagType) => void;
21
+ setAnimationName: (actions: actionsType) => void;
22
+ };
23
+ export default function playCharacterActions({ groundRay }: playActionsType): {
24
+ ref: Ref<Object3D<Object3DEventMap>>;
25
+ };
@@ -0,0 +1,126 @@
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, useKeyboardControls } from "@react-three/drei";
13
+ import { useFrame } from "@react-three/fiber";
14
+ import { useContext, useEffect } from "react";
15
+ import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../world/context";
16
+ export function usePlayActions() {
17
+ var _a = useContext(GaesupWorldContext), characterGltf = _a.characterGltf, vehicleGltf = _a.vehicleGltf, airplaneGltf = _a.airplaneGltf, animations = _a.animations;
18
+ var characterAnimations = characterGltf.animations;
19
+ var characterResult = useAnimations(characterAnimations);
20
+ var vehicleAnimations = vehicleGltf.animations;
21
+ var vehicleResult = useAnimations(vehicleAnimations);
22
+ var airplaneAnimations = airplaneGltf.animations;
23
+ var airplaneResult = useAnimations(airplaneAnimations);
24
+ var dispatch = useContext(GaesupWorldDispatchContext);
25
+ var play = function (tag) {
26
+ animations.current = tag;
27
+ dispatch({
28
+ type: "update",
29
+ payload: {
30
+ animations: __assign({}, animations),
31
+ },
32
+ });
33
+ };
34
+ var setAnimationName = function (actions) {
35
+ animations.animationNames = Object.assign(animations.animationNames, Object.keys(actions).reduce(function (acc, cur) {
36
+ var _a;
37
+ return __assign(__assign({}, acc), (_a = {}, _a[cur] = cur, _a));
38
+ }, {}));
39
+ dispatch({
40
+ type: "update",
41
+ payload: {
42
+ animations: __assign({}, animations),
43
+ },
44
+ });
45
+ };
46
+ var resultRef = {
47
+ character: characterResult,
48
+ vehicle: vehicleResult,
49
+ airplane: airplaneResult,
50
+ };
51
+ return { resultRef: resultRef, play: play, setAnimationName: setAnimationName };
52
+ }
53
+ export default function playCharacterActions(_a) {
54
+ var groundRay = _a.groundRay;
55
+ var _b = usePlayActions(), _c = _b.resultRef.character, actions = _c.actions, ref = _c.ref, play = _b.play, setAnimationName = _b.setAnimationName;
56
+ var _d = useContext(GaesupWorldContext), states = _d.states, activeState = _d.activeState, animations = _d.animations, mode = _d.mode;
57
+ var isNotMoving = states.isNotMoving, isMoving = states.isMoving, isJumping = states.isJumping, isRunning = states.isRunning, isAnimationOuter = states.isAnimationOuter, isOnTheGround = states.isOnTheGround;
58
+ var dispatch = useContext(GaesupWorldDispatchContext);
59
+ var control = useKeyboardControls()[1]();
60
+ var resetAni = function () { return play("idle"); };
61
+ var playIdle = function () { return play("idle"); };
62
+ var playWalk = function () { return play("walk"); };
63
+ var playRun = function () { return play("run"); };
64
+ var playJump = function () { return play("jump"); };
65
+ var playFall = function () { return play("fall"); };
66
+ var playRide = function () { return play("ride"); };
67
+ var playLanding = function () { return play("land"); };
68
+ useEffect(function () {
69
+ return function () {
70
+ resetAni();
71
+ };
72
+ }, []);
73
+ useEffect(function () {
74
+ animations.keyControl = control;
75
+ dispatch({
76
+ type: "update",
77
+ payload: {
78
+ animations: __assign({}, animations),
79
+ },
80
+ });
81
+ }, [control]);
82
+ useEffect(function () {
83
+ var _a;
84
+ if (mode.type === "character") {
85
+ var action_1 = (_a = actions[animations.current]) === null || _a === void 0 ? void 0 : _a.reset().fadeIn(0.2).play();
86
+ setAnimationName(actions);
87
+ return function () {
88
+ action_1 === null || action_1 === void 0 ? void 0 : action_1.fadeOut(0.2);
89
+ };
90
+ }
91
+ }, [animations.current, mode.type]);
92
+ useFrame(function () {
93
+ if (mode.type === "character") {
94
+ if (!isAnimationOuter) {
95
+ if (isJumping) {
96
+ playJump();
97
+ }
98
+ else if (isNotMoving) {
99
+ playIdle();
100
+ }
101
+ else if (isRunning) {
102
+ playRun();
103
+ }
104
+ else if (isMoving) {
105
+ playWalk();
106
+ }
107
+ if (groundRay.hit) {
108
+ if (!isJumping && !isOnTheGround) {
109
+ if (groundRay.hit.toi < 5) {
110
+ playLanding();
111
+ }
112
+ else {
113
+ playFall();
114
+ }
115
+ }
116
+ }
117
+ if (groundRay.hit === null && activeState.velocity.y < 0) {
118
+ playFall();
119
+ }
120
+ }
121
+ }
122
+ });
123
+ return {
124
+ ref: ref,
125
+ };
126
+ }
@@ -0,0 +1 @@
1
+ export * as playActions from "./actions";
@@ -0,0 +1 @@
1
+ export * as playActions from "./actions";
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ import { controllerInnerType } from "../controller/type";
2
+ export default function cameraCollisionDetector(prop: controllerInnerType): {
3
+ checkCollision: (delta: number) => void;
4
+ };
@@ -3,7 +3,7 @@ export default function normal(prop) {
3
3
  var state = prop.state, perspectiveCamera = prop.controllerContext.perspectiveCamera, activeState = prop.worldContext.activeState;
4
4
  var cameraPosition = activeState.position
5
5
  .clone()
6
- .add(V3(perspectiveCamera.XZDistance, perspectiveCamera.YDistance, 0));
6
+ .add(V3(0, perspectiveCamera.YDistance, perspectiveCamera.XZDistance));
7
7
  state.camera.position.lerp(cameraPosition, 1);
8
8
  state.camera.lookAt(activeState.position.clone());
9
9
  }
@@ -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
  };
@@ -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
+ props: 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 props = _a.props;
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 = props.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,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,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import { GaesupWorldContext } from "../../../world/context";
4
+ import { InnerGroupRef } from "../common/InnerGroupRef";
5
+ import { WrapperRef } from "../common/WrapperRef";
6
+ import { AirplaneCollider } from "./collider";
7
+ export function AirplaneRef(_a) {
8
+ var props = _a.props, refs = _a.refs;
9
+ var _b = useContext(GaesupWorldContext), characterGltf = _b.characterGltf, airplaneGltf = _b.airplaneGltf;
10
+ return (_jsxs(WrapperRef, { props: props, refs: refs, gltf: airplaneGltf, children: [props.isRider && (_jsx(InnerGroupRef, { props: props, gltf: characterGltf, ref: refs.characterInnerRef })), _jsx(AirplaneCollider, { props: props })] }));
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 CharacterCapsuleCollider: import("react").ForwardRefExoticComponent<{
5
+ props: controllerInnerType;
6
+ } & import("react").RefAttributes<Collider>>;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { CapsuleCollider, 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 CharacterCapsuleCollider = forwardRef(function (_a, ref) {
7
+ var _b;
8
+ var props = _a.props;
9
+ var collider = useContext(GaesupWorldContext).characterCollider;
10
+ var colliderRef = useForwardRef(ref);
11
+ var rapier = useRapier().rapier;
12
+ var groundRay = props.groundRay, slopeRay = props.slopeRay;
13
+ groundRay.length = collider.radius + 2;
14
+ groundRay.rayCast = new rapier.Ray(groundRay.origin, groundRay.dir);
15
+ groundRay.hit = getRayHit({
16
+ ray: groundRay,
17
+ ref: colliderRef,
18
+ });
19
+ groundRay.parent = (_b = groundRay.hit) === null || _b === void 0 ? void 0 : _b.collider.parent();
20
+ slopeRay.rayCast = new rapier.Ray(slopeRay.origin, slopeRay.dir);
21
+ slopeRay.length = collider.radius + 3;
22
+ slopeRay.rayCast = new rapier.Ray(slopeRay.origin, slopeRay.dir);
23
+ return (_jsx(CapsuleCollider, { ref: ref, args: [collider.height, collider.radius], position: [0, collider.height + collider.radius, 0] }));
24
+ });
@@ -0,0 +1,5 @@
1
+ import { controllerInnerType, refsType } from "../../../controller/type";
2
+ export declare function CharacterRef({ props, refs, }: {
3
+ props: controllerInnerType;
4
+ refs: refsType;
5
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useContext } from "react";
3
+ import initCallback from "../../../controller/initialize/callback";
4
+ import { GaesupWorldContext } from "../../../world/context";
5
+ import { CharacterCapsuleCollider } from "./collider";
6
+ import playCharacterActions from "../../../animation/actions";
7
+ import { WrapperRef } from "../common/WrapperRef";
8
+ export function CharacterRef(_a) {
9
+ var props = _a.props, refs = _a.refs;
10
+ initCallback(props);
11
+ var _b = useContext(GaesupWorldContext), characterGltf = _b.characterGltf, characterCollider = _b.characterCollider, vehicleCollider = _b.vehicleCollider;
12
+ var ref = playCharacterActions({
13
+ groundRay: props.groundRay,
14
+ }).ref;
15
+ return (_jsx(WrapperRef, { props: props, refs: refs, gltf: characterGltf, animationRef: ref, children: _jsx(CharacterCapsuleCollider, { props: props, ref: refs.capsuleColliderRef }) }));
16
+ }
@@ -0,0 +1,10 @@
1
+ import { Ref } from "react";
2
+ import { controllerInnerType } from "../../../controller/type";
3
+ import * as THREE from "three";
4
+ import { GLTFResult } from "../../type";
5
+ export type InnerGroupRefType = {
6
+ props: controllerInnerType;
7
+ animationRef?: Ref<THREE.Object3D<THREE.Object3DEventMap>>;
8
+ gltf: GLTFResult;
9
+ };
10
+ export declare const InnerGroupRef: import("react").ForwardRefExoticComponent<InnerGroupRefType & import("react").RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
@@ -0,0 +1,32 @@
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 { forwardRef, useMemo } from "react";
14
+ import { useGraph } from "@react-three/fiber";
15
+ import * as THREE from "three";
16
+ import { SkeletonUtils } from "three-stdlib";
17
+ export var InnerGroupRef = forwardRef(function (_a, ref) {
18
+ var props = _a.props, animationRef = _a.animationRef, gltf = _a.gltf;
19
+ var scene = gltf.scene;
20
+ var clone = useMemo(function () { return SkeletonUtils.clone(scene); }, [scene]);
21
+ var nodes = useGraph(clone).nodes;
22
+ var objectNode = Object.values(nodes).find(function (node) { return node.type === "Object3D"; });
23
+ return (_jsxs("group", __assign({ receiveShadow: true, castShadow: true }, props.groupProps, { ref: ref, children: [objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
24
+ var node = nodes[name];
25
+ if (node instanceof THREE.SkinnedMesh) {
26
+ return (_jsx("skinnedMesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry, skeleton: node.skeleton }, key));
27
+ }
28
+ else if (node instanceof THREE.Mesh) {
29
+ return (_jsx("mesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry }, key));
30
+ }
31
+ })] })));
32
+ });
@@ -0,0 +1,6 @@
1
+ import { ReactNode } from "react";
2
+ import { controllerType } from "../../../controller/type";
3
+ export declare const OuterGroupRef: import("react").ForwardRefExoticComponent<{
4
+ props: controllerType;
5
+ children: ReactNode;
6
+ } & import("react").RefAttributes<import("three").Group<import("three").Object3DEventMap>>>;
@@ -9,16 +9,9 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- export function gaesupToolsReducer(props, action) {
13
- switch (action.type) {
14
- case "init": {
15
- return __assign({}, props);
16
- }
17
- case "update": {
18
- return __assign(__assign({}, props), action.payload);
19
- }
20
- default: {
21
- throw Error("Unknown action: " + action.type);
22
- }
23
- }
24
- }
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { forwardRef } from "react";
14
+ export var OuterGroupRef = forwardRef(function (_a, ref) {
15
+ var props = _a.props, children = _a.children;
16
+ return (_jsx("group", __assign({ ref: ref, userData: { intangible: true } }, props.vehicle, { children: children })));
17
+ });
@@ -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 RigidBodyRef: import("react").ForwardRefExoticComponent<{
5
+ props: controllerInnerType;
6
+ children: ReactNode;
7
+ } & import("react").RefAttributes<RapierRigidBody>>;