gaesup-world 0.0.5 → 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 (537) 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/gaesup/camera/cameraCollisionDetecter.js +50 -0
  10. package/dist/gaesup/camera/control/map.js +5 -0
  11. package/dist/gaesup/camera/control/normal.js +9 -0
  12. package/dist/gaesup/camera/control/orbit.js +18 -0
  13. package/{src → dist}/gaesup/camera/index.d.ts +2 -2
  14. package/dist/gaesup/camera/index.js +69 -0
  15. package/dist/gaesup/component/active/airplane/collider.d.ts +6 -0
  16. package/dist/gaesup/component/active/airplane/collider.js +22 -0
  17. package/dist/gaesup/component/active/airplane/index.d.ts +5 -0
  18. package/dist/gaesup/component/active/airplane/index.js +11 -0
  19. package/dist/gaesup/component/active/character/collider.d.ts +6 -0
  20. package/dist/gaesup/component/active/character/collider.js +24 -0
  21. package/dist/gaesup/component/active/character/index.d.ts +5 -0
  22. package/dist/gaesup/component/active/character/index.js +16 -0
  23. package/dist/gaesup/component/active/common/InnerGroupRef.d.ts +10 -0
  24. package/dist/gaesup/component/active/common/InnerGroupRef.js +32 -0
  25. package/dist/gaesup/component/active/common/OuterGroupRef.d.ts +6 -0
  26. package/dist/gaesup/component/active/common/OuterGroupRef.js +17 -0
  27. package/dist/gaesup/component/active/common/RigidbodyRef.d.ts +7 -0
  28. package/dist/gaesup/component/active/common/RigidbodyRef.js +22 -0
  29. package/dist/gaesup/component/active/common/WrapperRef.d.ts +12 -0
  30. package/dist/gaesup/component/active/common/WrapperRef.js +9 -0
  31. package/dist/gaesup/component/active/common/slopeRayRef.d.ts +6 -0
  32. package/dist/gaesup/component/active/common/slopeRayRef.js +10 -0
  33. package/dist/gaesup/component/active/vehicle/collider.d.ts +3 -0
  34. package/dist/gaesup/component/active/vehicle/collider.js +9 -0
  35. package/dist/gaesup/component/active/vehicle/index.d.ts +5 -0
  36. package/dist/gaesup/component/active/vehicle/index.js +12 -0
  37. package/dist/gaesup/component/active/vehicle/wheel.d.ts +12 -0
  38. package/dist/gaesup/component/active/vehicle/wheel.js +13 -0
  39. package/dist/gaesup/component/active/vehicle/wheels.d.ts +7 -0
  40. package/dist/gaesup/component/active/vehicle/wheels.js +22 -0
  41. package/dist/gaesup/component/index.d.ts +7 -0
  42. package/dist/gaesup/component/index.js +20 -0
  43. package/dist/gaesup/component/passive/airplane/collider.d.ts +6 -0
  44. package/dist/gaesup/component/passive/airplane/collider.js +8 -0
  45. package/dist/gaesup/component/passive/airplane/index.d.ts +4 -0
  46. package/dist/gaesup/component/passive/airplane/index.js +25 -0
  47. package/dist/gaesup/component/passive/character/collider.d.ts +6 -0
  48. package/dist/gaesup/component/passive/character/collider.js +7 -0
  49. package/dist/gaesup/component/passive/character/index.d.ts +4 -0
  50. package/dist/gaesup/component/passive/character/index.js +25 -0
  51. package/dist/gaesup/component/passive/common/InnerGroupRef.d.ts +8 -0
  52. package/dist/gaesup/component/passive/common/InnerGroupRef.js +27 -0
  53. package/dist/gaesup/component/passive/common/OuterGroupRef.d.ts +4 -0
  54. package/dist/gaesup/component/passive/common/OuterGroupRef.js +6 -0
  55. package/dist/gaesup/component/passive/common/PassiveWrapperRef.d.ts +10 -0
  56. package/dist/gaesup/component/passive/common/PassiveWrapperRef.js +8 -0
  57. package/dist/gaesup/component/passive/common/RigidbodyRef.d.ts +5 -0
  58. package/dist/gaesup/component/passive/common/RigidbodyRef.js +7 -0
  59. package/dist/gaesup/component/passive/type.d.ts +30 -0
  60. package/dist/gaesup/component/passive/type.js +1 -0
  61. package/dist/gaesup/component/passive/vehicle/collider.d.ts +7 -0
  62. package/dist/gaesup/component/passive/vehicle/collider.js +8 -0
  63. package/dist/gaesup/component/passive/vehicle/index.d.ts +4 -0
  64. package/dist/gaesup/component/passive/vehicle/index.js +26 -0
  65. package/dist/gaesup/component/passive/vehicle/wheel.d.ts +16 -0
  66. package/dist/gaesup/component/passive/vehicle/wheel.js +10 -0
  67. package/dist/gaesup/component/passive/vehicle/wheels.d.ts +11 -0
  68. package/dist/gaesup/component/passive/vehicle/wheels.js +27 -0
  69. package/dist/gaesup/component/type.d.ts +18 -0
  70. package/dist/gaesup/component/type.js +1 -0
  71. package/dist/gaesup/controller/context/index.d.ts +67 -0
  72. package/dist/gaesup/controller/context/index.js +81 -0
  73. package/dist/gaesup/controller/context/reducer.d.ts +16 -0
  74. package/dist/gaesup/controller/context/reducer.js +21 -0
  75. package/dist/gaesup/controller/context/type.d.ts +71 -0
  76. package/dist/gaesup/controller/context/type.js +1 -0
  77. package/dist/gaesup/controller/debug/airplane.d.ts +71 -0
  78. package/dist/gaesup/controller/debug/airplane.js +71 -0
  79. package/dist/gaesup/controller/debug/cameraOption.d.ts +27 -0
  80. package/dist/gaesup/controller/debug/cameraOption.js +27 -0
  81. package/dist/gaesup/controller/debug/character.d.ts +27 -0
  82. package/dist/gaesup/controller/debug/character.js +27 -0
  83. package/dist/gaesup/controller/debug/index.d.ts +6 -0
  84. package/dist/gaesup/controller/debug/index.js +100 -0
  85. package/dist/gaesup/controller/debug/orthographicCamera.d.ts +17 -0
  86. package/dist/gaesup/controller/debug/orthographicCamera.js +17 -0
  87. package/dist/gaesup/controller/debug/perspectiveCamera.d.ts +12 -0
  88. package/dist/gaesup/controller/debug/perspectiveCamera.js +12 -0
  89. package/dist/gaesup/controller/debug/vehicle.d.ts +27 -0
  90. package/dist/gaesup/controller/debug/vehicle.js +27 -0
  91. package/{src → dist}/gaesup/controller/index.d.ts +1 -1
  92. package/dist/gaesup/controller/index.js +85 -0
  93. package/dist/gaesup/controller/initialize/callback/index.d.ts +2 -0
  94. package/dist/gaesup/controller/initialize/callback/index.js +57 -0
  95. package/{src/gaesup/initial → dist/gaesup/controller/initialize}/callback/type.d.ts +4 -11
  96. package/dist/gaesup/controller/initialize/callback/type.js +1 -0
  97. package/dist/gaesup/controller/initialize/index.d.ts +27 -0
  98. package/dist/gaesup/controller/initialize/index.js +92 -0
  99. package/{src → dist}/gaesup/controller/type.d.ts +23 -56
  100. package/dist/gaesup/controller/type.js +1 -0
  101. package/{src → dist}/gaesup/gaesupProps/index.d.ts +1 -1
  102. package/dist/gaesup/gaesupProps/index.js +65 -0
  103. package/dist/gaesup/hooks/index.d.ts +1 -0
  104. package/dist/gaesup/hooks/index.js +1 -0
  105. package/dist/gaesup/hooks/useGaesupController/index.d.ts +12 -0
  106. package/dist/gaesup/hooks/useGaesupController/index.js +18 -0
  107. package/dist/gaesup/index.d.ts +8 -0
  108. package/dist/gaesup/index.js +8 -0
  109. package/dist/gaesup/mutation/airplane/index.d.ts +2 -0
  110. package/dist/gaesup/mutation/airplane/index.js +6 -0
  111. package/dist/gaesup/mutation/airplane/rotation.d.ts +2 -0
  112. package/dist/gaesup/mutation/airplane/rotation.js +9 -0
  113. package/dist/gaesup/mutation/character/index.d.ts +2 -0
  114. package/dist/gaesup/mutation/character/index.js +8 -0
  115. package/dist/gaesup/mutation/character/rotation.d.ts +2 -0
  116. package/dist/gaesup/mutation/character/rotation.js +5 -0
  117. package/dist/gaesup/mutation/common/stabilizing.d.ts +2 -0
  118. package/dist/gaesup/mutation/common/stabilizing.js +4 -0
  119. package/dist/gaesup/mutation/common/transition.d.ts +2 -0
  120. package/dist/gaesup/mutation/common/transition.js +4 -0
  121. package/dist/gaesup/mutation/index.d.ts +7 -0
  122. package/dist/gaesup/mutation/index.js +35 -0
  123. package/dist/gaesup/mutation/type.d.ts +21 -0
  124. package/dist/gaesup/mutation/type.js +1 -0
  125. package/dist/gaesup/mutation/vehicle/index.d.ts +2 -0
  126. package/dist/gaesup/mutation/vehicle/index.js +6 -0
  127. package/dist/gaesup/mutation/vehicle/rotation.d.ts +2 -0
  128. package/dist/gaesup/mutation/vehicle/rotation.js +5 -0
  129. package/dist/gaesup/physics/airplane/currentSetting.js +23 -0
  130. package/dist/gaesup/physics/airplane/damping.js +5 -0
  131. package/dist/gaesup/physics/airplane/direction.js +61 -0
  132. package/dist/gaesup/physics/airplane/gravity.js +10 -0
  133. package/dist/gaesup/physics/airplane/impulse.js +15 -0
  134. package/dist/gaesup/physics/airplane/index.js +14 -0
  135. package/dist/gaesup/physics/airplane/turn.js +5 -0
  136. package/dist/gaesup/physics/character/accelaration.js +10 -0
  137. package/dist/gaesup/physics/character/currentSetting.js +23 -0
  138. package/dist/gaesup/physics/character/damping.js +4 -0
  139. package/dist/gaesup/physics/character/direction.js +64 -0
  140. package/dist/gaesup/physics/character/impulse.js +12 -0
  141. package/dist/gaesup/physics/character/index.js +18 -0
  142. package/dist/gaesup/physics/character/jump.js +10 -0
  143. package/dist/gaesup/physics/character/stabilizing.js +4 -0
  144. package/dist/gaesup/physics/character/turn.js +9 -0
  145. package/dist/gaesup/physics/check/ground.js +13 -0
  146. package/dist/gaesup/physics/check/index.js +10 -0
  147. package/dist/gaesup/physics/check/moving.js +17 -0
  148. package/dist/gaesup/physics/check/rotate.js +8 -0
  149. package/dist/gaesup/physics/check/slope.js +22 -0
  150. package/dist/gaesup/physics/index.d.ts +2 -0
  151. package/dist/gaesup/physics/index.js +52 -0
  152. package/{src → dist}/gaesup/physics/type.d.ts +8 -7
  153. package/dist/gaesup/physics/type.js +1 -0
  154. package/dist/gaesup/physics/vehicle/currentSetting.js +23 -0
  155. package/dist/gaesup/physics/vehicle/damping.js +6 -0
  156. package/dist/gaesup/physics/vehicle/direction.js +32 -0
  157. package/dist/gaesup/physics/vehicle/impulse.js +24 -0
  158. package/dist/gaesup/physics/vehicle/index.js +12 -0
  159. package/dist/gaesup/physics/vehicle/turn.js +5 -0
  160. package/dist/gaesup/styles.css.js +24 -0
  161. package/dist/gaesup/tools/gameboy/GameBoyButton.d.ts +9 -0
  162. package/dist/gaesup/tools/gameboy/GameBoyButton.js +20 -0
  163. package/{src → dist}/gaesup/tools/gameboy/index.d.ts +2 -1
  164. package/dist/gaesup/tools/gameboy/index.js +23 -0
  165. package/{src → dist}/gaesup/tools/gameboy/style.css.d.ts +0 -1
  166. package/dist/gaesup/tools/gameboy/style.css.js +76 -0
  167. package/dist/gaesup/tools/gameboy/type.d.ts +4 -0
  168. package/dist/gaesup/tools/gameboy/type.js +1 -0
  169. package/dist/gaesup/tools/gamepad/GamePadButton.d.ts +6 -0
  170. package/dist/gaesup/tools/gamepad/GamePadButton.js +24 -0
  171. package/dist/gaesup/tools/gamepad/default.js +3 -0
  172. package/dist/gaesup/tools/gamepad/index.d.ts +2 -0
  173. package/dist/gaesup/tools/gamepad/index.js +30 -0
  174. package/dist/gaesup/tools/gamepad/style.css.js +68 -0
  175. package/dist/gaesup/tools/gamepad/type.d.ts +6 -0
  176. package/dist/gaesup/tools/gamepad/type.js +1 -0
  177. package/dist/gaesup/tools/index.d.ts +5 -0
  178. package/dist/gaesup/tools/index.js +5 -0
  179. package/{src → dist}/gaesup/tools/joystick/default.d.ts +0 -4
  180. package/dist/gaesup/tools/joystick/default.js +61 -0
  181. package/dist/gaesup/tools/joystick/index.d.ts +2 -0
  182. package/dist/gaesup/tools/joystick/index.js +169 -0
  183. package/{src → dist}/gaesup/tools/joystick/style.css.d.ts +0 -1
  184. package/dist/gaesup/tools/joystick/style.css.js +33 -0
  185. package/{src → dist}/gaesup/tools/joystick/type.d.ts +2 -7
  186. package/dist/gaesup/tools/joystick/type.js +1 -0
  187. package/dist/gaesup/tools/jumpPoint/index.js +14 -0
  188. package/dist/gaesup/tools/jumpPoint/style.css.js +32 -0
  189. package/dist/gaesup/tools/keyBoardToolTip/constant.js +122 -0
  190. package/{src → dist}/gaesup/tools/keyBoardToolTip/default.d.ts +0 -1
  191. package/dist/gaesup/tools/keyBoardToolTip/default.js +12 -0
  192. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +2 -0
  193. package/dist/gaesup/tools/keyBoardToolTip/index.js +61 -0
  194. package/{src → dist}/gaesup/tools/keyBoardToolTip/style.css.d.ts +0 -1
  195. package/dist/gaesup/tools/keyBoardToolTip/style.css.js +26 -0
  196. package/{src → dist}/gaesup/tools/keyBoardToolTip/type.d.ts +8 -5
  197. package/dist/gaesup/tools/keyBoardToolTip/type.js +1 -0
  198. package/{src → dist}/gaesup/tools/minimap/default.d.ts +4 -3
  199. package/dist/gaesup/tools/minimap/default.js +9 -0
  200. package/dist/gaesup/tools/minimap/index.d.ts +2 -0
  201. package/dist/gaesup/tools/minimap/index.js +66 -0
  202. package/dist/gaesup/tools/minimap/style.css.d.ts +41 -0
  203. package/dist/gaesup/tools/minimap/style.css.js +215 -0
  204. package/dist/gaesup/tools/minimap/type.d.ts +20 -0
  205. package/dist/gaesup/tools/minimap/type.js +1 -0
  206. package/dist/gaesup/tools/pushKey/index.js +29 -0
  207. package/dist/gaesup/tools/type.d.ts +2 -0
  208. package/dist/gaesup/tools/type.js +1 -0
  209. package/dist/gaesup/utils/context.d.ts +2 -0
  210. package/dist/gaesup/utils/context.js +3 -0
  211. package/dist/gaesup/utils/debug.d.ts +29 -0
  212. package/dist/gaesup/utils/debug.js +36 -0
  213. package/dist/gaesup/utils/gltf.d.ts +7 -0
  214. package/dist/gaesup/utils/gltf.js +10 -0
  215. package/dist/gaesup/utils/ray.js +6 -0
  216. package/dist/gaesup/utils/ref.js +16 -0
  217. package/dist/gaesup/utils/type.d.ts +5 -0
  218. package/dist/gaesup/utils/type.js +1 -0
  219. package/{src → dist}/gaesup/utils/vector.d.ts +1 -0
  220. package/dist/gaesup/utils/vector.js +25 -0
  221. package/dist/gaesup/world/context/index.d.ts +6 -0
  222. package/dist/gaesup/world/context/index.js +147 -0
  223. package/{src → dist}/gaesup/world/context/reducer.d.ts +10 -7
  224. package/dist/gaesup/world/context/reducer.js +21 -0
  225. package/{src → dist}/gaesup/world/context/type.d.ts +25 -18
  226. package/dist/gaesup/world/context/type.js +1 -0
  227. package/dist/gaesup/world/debug/index.d.ts +2 -0
  228. package/dist/gaesup/world/debug/index.js +27 -0
  229. package/dist/gaesup/world/debug/mode.d.ts +10 -0
  230. package/dist/gaesup/world/debug/mode.js +10 -0
  231. package/dist/gaesup/world/index.d.ts +2 -0
  232. package/dist/gaesup/world/index.js +7 -0
  233. package/dist/gaesup/world/initalize/collider/airplane.js +24 -0
  234. package/dist/gaesup/world/initalize/collider/character.js +27 -0
  235. package/{src/gaesup/initial/gaesupWorld → dist/gaesup/world/initalize}/collider/gltf.d.ts +1 -1
  236. package/dist/gaesup/world/initalize/collider/gltf.js +54 -0
  237. package/dist/gaesup/world/initalize/collider/index.d.ts +2 -0
  238. package/dist/gaesup/world/initalize/collider/index.js +17 -0
  239. package/dist/gaesup/world/initalize/collider/vehicle.js +55 -0
  240. package/dist/gaesup/world/initalize/index.d.ts +35 -0
  241. package/dist/gaesup/world/initalize/index.js +81 -0
  242. package/dist/gaesup/world/initalize/type.d.ts +13 -0
  243. package/dist/gaesup/world/initalize/type.js +1 -0
  244. package/dist/gaesup/world/type.d.ts +19 -0
  245. package/dist/gaesup/world/type.js +1 -0
  246. package/dist/index.d.ts +2 -0
  247. package/dist/index.js +2 -0
  248. package/dist/styles/constants/boxshadow.css.js +9 -0
  249. package/dist/styles/constants/constant.css.js +79 -0
  250. package/dist/styles/constants/direction.css.js +166 -0
  251. package/dist/styles/constants/flex.css.js +66 -0
  252. package/dist/styles/constants/gradient.css.js +8 -0
  253. package/dist/styles/constants/grid.css.js +19 -0
  254. package/dist/styles/constants/palette.css.js +80 -0
  255. package/dist/styles/constants/translate.css.js +131 -0
  256. package/dist/styles/global.css.d.ts +1 -0
  257. package/dist/styles/global.css.js +68 -0
  258. package/dist/styles/index.d.ts +2 -0
  259. package/dist/styles/index.js +2 -0
  260. package/dist/styles/recipe/base.css.js +21 -0
  261. package/dist/styles/recipe/button.css.js +107 -0
  262. package/dist/styles/recipe/index.css.js +110 -0
  263. package/dist/styles/recipe/input.css.js +32 -0
  264. package/dist/styles/sprinkles/color.css.js +60 -0
  265. package/dist/styles/sprinkles/direction.css.js +35 -0
  266. package/dist/styles/sprinkles/display.css.js +24 -0
  267. package/dist/styles/sprinkles/fontSize.css.js +31 -0
  268. package/dist/styles/sprinkles/grid.css.js +24 -0
  269. package/dist/styles/sprinkles/index.css.d.ts +368 -0
  270. package/{src/styles/sprinkles/index.css.ts → dist/styles/sprinkles/index.css.js} +1 -12
  271. package/dist/styles/sprinkles/margin.css.js +39 -0
  272. package/dist/styles/sprinkles/padding.css.js +39 -0
  273. package/dist/styles/sprinkles/position.css.js +13 -0
  274. package/dist/styles/sprinkles/size.css.js +32 -0
  275. package/dist/styles/theme.css.js +75 -0
  276. package/index.ts +7 -0
  277. package/package.json +11 -24
  278. package/index.html +0 -14
  279. package/src/gaesup/animation/actions.d.ts +0 -8
  280. package/src/gaesup/animation/actions.ts +0 -123
  281. package/src/gaesup/animation/index.d.ts +0 -1
  282. package/src/gaesup/animation/index.ts +0 -1
  283. package/src/gaesup/camera/cameraCollisionDetecter.d.ts +0 -4
  284. package/src/gaesup/camera/cameraCollisionDetecter.tsx +0 -53
  285. package/src/gaesup/camera/control/map.ts +0 -10
  286. package/src/gaesup/camera/control/normal.ts +0 -16
  287. package/src/gaesup/camera/control/orbit.ts +0 -31
  288. package/src/gaesup/camera/index.tsx +0 -102
  289. package/src/gaesup/camera/type.ts +0 -17
  290. package/src/gaesup/component/Airplane.d.ts +0 -5
  291. package/src/gaesup/component/Airplane.tsx +0 -52
  292. package/src/gaesup/component/Character.d.ts +0 -5
  293. package/src/gaesup/component/Character.tsx +0 -58
  294. package/src/gaesup/component/Vehicle.d.ts +0 -5
  295. package/src/gaesup/component/Vehicle.tsx +0 -43
  296. package/src/gaesup/component/gltf/AirplaneGltf.d.ts +0 -2
  297. package/src/gaesup/component/gltf/AirplaneGltf.tsx +0 -31
  298. package/src/gaesup/component/gltf/CharacterGltf.d.ts +0 -14
  299. package/src/gaesup/component/gltf/CharacterGltf.tsx +0 -96
  300. package/src/gaesup/component/gltf/VehicleGltf.d.ts +0 -2
  301. package/src/gaesup/component/gltf/VehicleGltf.tsx +0 -31
  302. package/src/gaesup/component/gltf/WheelJoint.d.ts +0 -4
  303. package/src/gaesup/component/gltf/WheelJoint.tsx +0 -39
  304. package/src/gaesup/component/gltf/index.d.ts +0 -4
  305. package/src/gaesup/component/gltf/index.ts +0 -4
  306. package/src/gaesup/component/gltf/type.d.ts +0 -9
  307. package/src/gaesup/component/gltf/type.ts +0 -6
  308. package/src/gaesup/component/index.d.ts +0 -5
  309. package/src/gaesup/component/index.ts +0 -5
  310. package/src/gaesup/component/ref/airplane.d.ts +0 -16
  311. package/src/gaesup/component/ref/airplane.tsx +0 -97
  312. package/src/gaesup/component/ref/character.d.ts +0 -20
  313. package/src/gaesup/component/ref/character.tsx +0 -137
  314. package/src/gaesup/component/ref/index.d.ts +0 -3
  315. package/src/gaesup/component/ref/index.ts +0 -3
  316. package/src/gaesup/component/ref/vehicle.d.ts +0 -24
  317. package/src/gaesup/component/ref/vehicle.tsx +0 -122
  318. package/src/gaesup/component/setInit.d.ts +0 -3
  319. package/src/gaesup/component/setInit.ts +0 -14
  320. package/src/gaesup/controller/context/index.d.ts +0 -40
  321. package/src/gaesup/controller/context/index.ts +0 -53
  322. package/src/gaesup/controller/context/reducer.d.ts +0 -14
  323. package/src/gaesup/controller/context/reducer.ts +0 -18
  324. package/src/gaesup/controller/context/type.d.ts +0 -52
  325. package/src/gaesup/controller/context/type.ts +0 -63
  326. package/src/gaesup/controller/index.tsx +0 -123
  327. package/src/gaesup/controller/type.ts +0 -149
  328. package/src/gaesup/gaesupProps/index.tsx +0 -66
  329. package/src/gaesup/index.d.ts +0 -8
  330. package/src/gaesup/index.ts +0 -8
  331. package/src/gaesup/initial/callback/index.d.ts +0 -2
  332. package/src/gaesup/initial/callback/index.ts +0 -73
  333. package/src/gaesup/initial/callback/type.ts +0 -47
  334. package/src/gaesup/initial/controller/index.d.ts +0 -29
  335. package/src/gaesup/initial/controller/index.ts +0 -157
  336. package/src/gaesup/initial/controller/initDebug.d.ts +0 -24
  337. package/src/gaesup/initial/controller/initDebug.ts +0 -102
  338. package/src/gaesup/initial/gaesupWorld/collider/airplane.ts +0 -26
  339. package/src/gaesup/initial/gaesupWorld/collider/character.ts +0 -32
  340. package/src/gaesup/initial/gaesupWorld/collider/gltf.ts +0 -91
  341. package/src/gaesup/initial/gaesupWorld/collider/index.d.ts +0 -6
  342. package/src/gaesup/initial/gaesupWorld/collider/index.ts +0 -26
  343. package/src/gaesup/initial/gaesupWorld/collider/vehicle.ts +0 -43
  344. package/src/gaesup/initial/gaesupWorld/index.d.ts +0 -32
  345. package/src/gaesup/initial/gaesupWorld/index.ts +0 -83
  346. package/src/gaesup/initial/gaesupWorld/type.d.ts +0 -28
  347. package/src/gaesup/initial/gaesupWorld/type.ts +0 -38
  348. package/src/gaesup/initial/index.d.ts +0 -3
  349. package/src/gaesup/initial/index.ts +0 -3
  350. package/src/gaesup/physics/airplane/currentSetting.ts +0 -20
  351. package/src/gaesup/physics/airplane/damping.ts +0 -6
  352. package/src/gaesup/physics/airplane/direction.ts +0 -79
  353. package/src/gaesup/physics/airplane/gravity.ts +0 -11
  354. package/src/gaesup/physics/airplane/impulse.ts +0 -28
  355. package/src/gaesup/physics/airplane/index.tsx +0 -16
  356. package/src/gaesup/physics/airplane/turn.ts +0 -11
  357. package/src/gaesup/physics/character/accelaration.ts +0 -14
  358. package/src/gaesup/physics/character/currentSetting.ts +0 -20
  359. package/src/gaesup/physics/character/damping.ts +0 -6
  360. package/src/gaesup/physics/character/direction.ts +0 -104
  361. package/src/gaesup/physics/character/impulse.ts +0 -24
  362. package/src/gaesup/physics/character/index.tsx +0 -20
  363. package/src/gaesup/physics/character/jump.ts +0 -21
  364. package/src/gaesup/physics/character/stabilizing.ts +0 -6
  365. package/src/gaesup/physics/character/turn.ts +0 -17
  366. package/src/gaesup/physics/check/ground.ts +0 -19
  367. package/src/gaesup/physics/check/index.ts +0 -12
  368. package/src/gaesup/physics/check/moving.ts +0 -20
  369. package/src/gaesup/physics/check/rotate.ts +0 -13
  370. package/src/gaesup/physics/check/slope.ts +0 -50
  371. package/src/gaesup/physics/index.d.ts +0 -2
  372. package/src/gaesup/physics/index.ts +0 -50
  373. package/src/gaesup/physics/type.ts +0 -29
  374. package/src/gaesup/physics/vehicle/currentSetting.ts +0 -20
  375. package/src/gaesup/physics/vehicle/damping.ts +0 -12
  376. package/src/gaesup/physics/vehicle/direction.ts +0 -48
  377. package/src/gaesup/physics/vehicle/impulse.ts +0 -39
  378. package/src/gaesup/physics/vehicle/index.tsx +0 -14
  379. package/src/gaesup/physics/vehicle/turn.ts +0 -11
  380. package/src/gaesup/styles.css.ts +0 -26
  381. package/src/gaesup/tools/context.d.ts +0 -4
  382. package/src/gaesup/tools/context.ts +0 -6
  383. package/src/gaesup/tools/gameboy/GameBoyButton.d.ts +0 -7
  384. package/src/gaesup/tools/gameboy/GameBoyButton.tsx +0 -47
  385. package/src/gaesup/tools/gameboy/default.d.ts +0 -3
  386. package/src/gaesup/tools/gameboy/default.ts +0 -3
  387. package/src/gaesup/tools/gameboy/index.tsx +0 -37
  388. package/src/gaesup/tools/gameboy/style.css.ts +0 -96
  389. package/src/gaesup/tools/gameboy/type.d.ts +0 -7
  390. package/src/gaesup/tools/gameboy/type.ts +0 -8
  391. package/src/gaesup/tools/gamepad/GamePadButton.d.ts +0 -4
  392. package/src/gaesup/tools/gamepad/GamePadButton.tsx +0 -49
  393. package/src/gaesup/tools/gamepad/default.ts +0 -3
  394. package/src/gaesup/tools/gamepad/index.d.ts +0 -1
  395. package/src/gaesup/tools/gamepad/index.tsx +0 -53
  396. package/src/gaesup/tools/gamepad/style.css.ts +0 -71
  397. package/src/gaesup/tools/gamepad/type.d.ts +0 -8
  398. package/src/gaesup/tools/gamepad/type.ts +0 -9
  399. package/src/gaesup/tools/index.d.ts +0 -2
  400. package/src/gaesup/tools/index.tsx +0 -82
  401. package/src/gaesup/tools/joystick/default.ts +0 -76
  402. package/src/gaesup/tools/joystick/index.d.ts +0 -2
  403. package/src/gaesup/tools/joystick/index.tsx +0 -200
  404. package/src/gaesup/tools/joystick/style.css.ts +0 -49
  405. package/src/gaesup/tools/joystick/type.ts +0 -32
  406. package/src/gaesup/tools/jumpPoint/index.tsx +0 -28
  407. package/src/gaesup/tools/jumpPoint/style.css.ts +0 -34
  408. package/src/gaesup/tools/keyBoardToolTip/constant.ts +0 -128
  409. package/src/gaesup/tools/keyBoardToolTip/default.ts +0 -14
  410. package/src/gaesup/tools/keyBoardToolTip/index.d.ts +0 -1
  411. package/src/gaesup/tools/keyBoardToolTip/index.tsx +0 -92
  412. package/src/gaesup/tools/keyBoardToolTip/style.css.ts +0 -49
  413. package/src/gaesup/tools/keyBoardToolTip/type.ts +0 -37
  414. package/src/gaesup/tools/minimap/default.ts +0 -9
  415. package/src/gaesup/tools/minimap/index.d.ts +0 -1
  416. package/src/gaesup/tools/minimap/index.tsx +0 -78
  417. package/src/gaesup/tools/minimap/style.css.d.ts +0 -9
  418. package/src/gaesup/tools/minimap/style.css.ts +0 -144
  419. package/src/gaesup/tools/minimap/type.d.ts +0 -24
  420. package/src/gaesup/tools/minimap/type.ts +0 -27
  421. package/src/gaesup/tools/pushKey/index.ts +0 -26
  422. package/src/gaesup/tools/reducer.d.ts +0 -11
  423. package/src/gaesup/tools/reducer.ts +0 -21
  424. package/src/gaesup/tools/style.css.d.ts +0 -3
  425. package/src/gaesup/tools/style.css.ts +0 -34
  426. package/src/gaesup/tools/type.d.ts +0 -26
  427. package/src/gaesup/tools/type.ts +0 -26
  428. package/src/gaesup/utils/constant.d.ts +0 -1
  429. package/src/gaesup/utils/constant.ts +0 -1
  430. package/src/gaesup/utils/ray.ts +0 -23
  431. package/src/gaesup/utils/ref.ts +0 -17
  432. package/src/gaesup/utils/vector.ts +0 -40
  433. package/src/gaesup/world/context/index.d.ts +0 -5
  434. package/src/gaesup/world/context/index.ts +0 -124
  435. package/src/gaesup/world/context/reducer.ts +0 -21
  436. package/src/gaesup/world/context/type.ts +0 -137
  437. package/src/gaesup/world/index.d.ts +0 -2
  438. package/src/gaesup/world/index.tsx +0 -14
  439. package/src/gaesup/world/type.d.ts +0 -9
  440. package/src/gaesup/world/type.ts +0 -10
  441. package/src/index.d.ts +0 -1
  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.d.ts +0 -1
  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 -23
  468. package/tsconfig.node.json +0 -10
  469. package/vite.config.ts +0 -9
  470. package/{src → dist}/gaesup/camera/control/map.d.ts +0 -0
  471. package/{src → dist}/gaesup/camera/control/normal.d.ts +0 -0
  472. package/{src → dist}/gaesup/camera/control/orbit.d.ts +0 -0
  473. package/{src → dist}/gaesup/camera/type.d.ts +0 -0
  474. package/{src/styles/global.css.d.ts → dist/gaesup/camera/type.js} +0 -0
  475. package/{src → dist}/gaesup/physics/airplane/currentSetting.d.ts +0 -0
  476. package/{src → dist}/gaesup/physics/airplane/damping.d.ts +0 -0
  477. package/{src → dist}/gaesup/physics/airplane/direction.d.ts +0 -0
  478. package/{src → dist}/gaesup/physics/airplane/gravity.d.ts +0 -0
  479. package/{src → dist}/gaesup/physics/airplane/impulse.d.ts +0 -0
  480. package/{src → dist}/gaesup/physics/airplane/index.d.ts +0 -0
  481. package/{src → dist}/gaesup/physics/airplane/turn.d.ts +0 -0
  482. package/{src → dist}/gaesup/physics/character/accelaration.d.ts +0 -0
  483. package/{src → dist}/gaesup/physics/character/currentSetting.d.ts +0 -0
  484. package/{src → dist}/gaesup/physics/character/damping.d.ts +0 -0
  485. package/{src → dist}/gaesup/physics/character/direction.d.ts +0 -0
  486. package/{src → dist}/gaesup/physics/character/impulse.d.ts +0 -0
  487. package/{src → dist}/gaesup/physics/character/index.d.ts +0 -0
  488. package/{src → dist}/gaesup/physics/character/jump.d.ts +0 -0
  489. package/{src → dist}/gaesup/physics/character/stabilizing.d.ts +0 -0
  490. package/{src → dist}/gaesup/physics/character/turn.d.ts +0 -0
  491. package/{src → dist}/gaesup/physics/check/ground.d.ts +0 -0
  492. package/{src → dist}/gaesup/physics/check/index.d.ts +0 -0
  493. package/{src → dist}/gaesup/physics/check/moving.d.ts +0 -0
  494. package/{src → dist}/gaesup/physics/check/rotate.d.ts +0 -0
  495. package/{src → dist}/gaesup/physics/check/slope.d.ts +0 -0
  496. package/{src → dist}/gaesup/physics/vehicle/currentSetting.d.ts +0 -0
  497. package/{src → dist}/gaesup/physics/vehicle/damping.d.ts +0 -0
  498. package/{src → dist}/gaesup/physics/vehicle/direction.d.ts +0 -0
  499. package/{src → dist}/gaesup/physics/vehicle/impulse.d.ts +0 -0
  500. package/{src → dist}/gaesup/physics/vehicle/index.d.ts +0 -0
  501. package/{src → dist}/gaesup/physics/vehicle/turn.d.ts +0 -0
  502. package/{src → dist}/gaesup/styles.css.d.ts +0 -0
  503. package/{src → dist}/gaesup/tools/gamepad/default.d.ts +0 -0
  504. package/{src → dist}/gaesup/tools/gamepad/style.css.d.ts +0 -0
  505. package/{src → dist}/gaesup/tools/jumpPoint/index.d.ts +0 -0
  506. package/{src → dist}/gaesup/tools/jumpPoint/style.css.d.ts +0 -0
  507. package/{src → dist}/gaesup/tools/keyBoardToolTip/constant.d.ts +0 -0
  508. package/{src → dist}/gaesup/tools/pushKey/index.d.ts +0 -0
  509. package/{src → dist}/gaesup/utils/index.d.ts +0 -0
  510. package/{src/gaesup/utils/index.ts → dist/gaesup/utils/index.js} +0 -0
  511. package/{src → dist}/gaesup/utils/ray.d.ts +0 -0
  512. package/{src → dist}/gaesup/utils/ref.d.ts +0 -0
  513. package/{src/gaesup/initial/gaesupWorld → dist/gaesup/world/initalize}/collider/airplane.d.ts +0 -0
  514. package/{src/gaesup/initial/gaesupWorld → dist/gaesup/world/initalize}/collider/character.d.ts +0 -0
  515. package/{src/gaesup/initial/gaesupWorld → dist/gaesup/world/initalize}/collider/vehicle.d.ts +0 -0
  516. package/{src → dist}/styles/constants/boxshadow.css.d.ts +0 -0
  517. package/{src → dist}/styles/constants/constant.css.d.ts +0 -0
  518. package/{src → dist}/styles/constants/direction.css.d.ts +0 -0
  519. package/{src → dist}/styles/constants/flex.css.d.ts +0 -0
  520. package/{src → dist}/styles/constants/gradient.css.d.ts +0 -0
  521. package/{src → dist}/styles/constants/grid.css.d.ts +0 -0
  522. package/{src → dist}/styles/constants/palette.css.d.ts +0 -0
  523. package/{src → dist}/styles/constants/translate.css.d.ts +0 -0
  524. package/{src → dist}/styles/recipe/base.css.d.ts +0 -0
  525. package/{src → dist}/styles/recipe/button.css.d.ts +0 -0
  526. package/{src → dist}/styles/recipe/index.css.d.ts +0 -0
  527. package/{src → dist}/styles/recipe/input.css.d.ts +0 -0
  528. package/{src → dist}/styles/sprinkles/color.css.d.ts +14 -14
  529. package/{src → dist}/styles/sprinkles/direction.css.d.ts +24 -24
  530. package/{src → dist}/styles/sprinkles/display.css.d.ts +2 -2
  531. package/{src → dist}/styles/sprinkles/fontSize.css.d.ts +12 -12
  532. package/{src → dist}/styles/sprinkles/grid.css.d.ts +0 -0
  533. package/{src → dist}/styles/sprinkles/margin.css.d.ts +189 -189
  534. package/{src → dist}/styles/sprinkles/padding.css.d.ts +189 -189
  535. /package/{src → dist}/styles/sprinkles/position.css.d.ts +0 -0
  536. /package/{src → dist}/styles/sprinkles/size.css.d.ts +0 -0
  537. /package/{src → dist}/styles/theme.css.d.ts +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
+ };
@@ -0,0 +1,50 @@
1
+ export default function cameraCollisionDetector(prop) {
2
+ // const { cameraRay, constant, options } = prop;
3
+ // const { camera } = useThree();
4
+ var checkCollision = function (delta) {
5
+ // cameraRay.origin.copy(cameraRay.pivot.position);
6
+ // camera.getWorldPosition(cameraRay.position);
7
+ // cameraRay.dir.subVectors(cameraRay.position, cameraRay.pivot.position);
8
+ // cameraRay.intersects = cameraRay.rayCast!.intersectObjects(
9
+ // Object.values(cameraRay.intersectObjectMap)
10
+ // );
11
+ // if (
12
+ // cameraRay.intersects.length &&
13
+ // cameraRay.intersects[0].distance <= -constant.cameraInitDistance
14
+ // ) {
15
+ // if (options.cameraCollisionType === "transparent") {
16
+ // cameraRay.intersetesAndTransParented = [...cameraRay.intersects];
17
+ // cameraRay.intersetesAndTransParented.map((intersect) => {
18
+ // const mesh = intersect.object as THREE.Mesh;
19
+ // const material = mesh.material as THREE.MeshStandardMaterial;
20
+ // material.opacity = 0.2;
21
+ // material.transparent = true;
22
+ // });
23
+ // } else if (options.cameraCollisionType === "closeUp") {
24
+ // constant.cameraMinDistance =
25
+ // -cameraRay.intersects[0].distance * constant.cameraCollisionOff < -0.7
26
+ // ? -cameraRay.intersects[0].distance * constant.cameraCollisionOff
27
+ // : -0.7;
28
+ // }
29
+ // } else {
30
+ // if (options.cameraCollisionType === "transparent") {
31
+ // cameraRay.intersetesAndTransParented.map((intersect) => {
32
+ // const mesh = intersect.object as THREE.Mesh;
33
+ // const material = mesh.material as THREE.MeshStandardMaterial;
34
+ // material.opacity = 1;
35
+ // material.transparent = false;
36
+ // });
37
+ // cameraRay.intersetesAndTransParented = [];
38
+ // }
39
+ // constant.cameraMinDistance = constant.cameraInitDistance;
40
+ // }
41
+ // cameraRay.lerpingPoint.set(
42
+ // cameraRay.followCamera.position.x,
43
+ // constant.cameraMinDistance * Math.sin(-cameraRay.followCamera.rotation.x),
44
+ // constant.cameraMinDistance * Math.cos(-cameraRay.followCamera.rotation.x)
45
+ // );
46
+ //
47
+ // cameraRay.followCamera.position.lerp(cameraRay.lerpingPoint, delta * 4);
48
+ };
49
+ return { checkCollision: checkCollision };
50
+ }
@@ -0,0 +1,5 @@
1
+ export default function mapControl(prop) {
2
+ var state = prop.state, activeState = prop.worldContext.activeState;
3
+ var position = activeState.position.clone();
4
+ state.camera.position.set(-10, 10, -10).add(position);
5
+ }
@@ -0,0 +1,9 @@
1
+ import { V3 } from "../../utils/vector";
2
+ export default function normal(prop) {
3
+ var state = prop.state, perspectiveCamera = prop.controllerContext.perspectiveCamera, activeState = prop.worldContext.activeState;
4
+ var cameraPosition = activeState.position
5
+ .clone()
6
+ .add(V3(0, perspectiveCamera.YDistance, perspectiveCamera.XZDistance));
7
+ state.camera.position.lerp(cameraPosition, 1);
8
+ state.camera.lookAt(activeState.position.clone());
9
+ }
@@ -0,0 +1,18 @@
1
+ import { quat } from "@react-three/rapier";
2
+ import { V3 } from "../../utils/vector";
3
+ export default function orbit(prop) {
4
+ var state = prop.state, perspectiveCamera = prop.controllerContext.perspectiveCamera, activeState = prop.worldContext.activeState;
5
+ var cameraPosition = activeState.position.clone().add(V3(Math.sin(activeState.euler.y), 0, Math.cos(activeState.euler.y))
6
+ .normalize()
7
+ .clone()
8
+ .multiplyScalar(perspectiveCamera.XZDistance)
9
+ .multiplyScalar(perspectiveCamera.isFront ? -1 : 1)
10
+ .add(V3(0, perspectiveCamera.YDistance, 0)));
11
+ state.camera.position.lerp(cameraPosition, 0.5);
12
+ state.camera.quaternion.copy(activeState.quat
13
+ .clone()
14
+ .multiply(perspectiveCamera.isFront
15
+ ? quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)
16
+ : quat()));
17
+ state.camera.lookAt(activeState.position);
18
+ }
@@ -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,69 @@
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, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import { MapControls, OrbitControls, OrthographicCamera, PerspectiveCamera, } from "@react-three/drei";
14
+ import { useFrame, useThree } from "@react-three/fiber";
15
+ import { useContext } from "react";
16
+ import * as THREE from "three";
17
+ import { GaesupControllerContext } from "../controller/context";
18
+ import { GaesupWorldContext } from "../world/context";
19
+ import cameraCollisionDetector from "./cameraCollisionDetecter";
20
+ import mapControl from "./control/map";
21
+ import normal from "./control/normal";
22
+ import orbit from "./control/orbit";
23
+ export default function Camera(_a) {
24
+ var refs = _a.refs, prop = _a.prop, control = _a.control;
25
+ var worldContext = useContext(GaesupWorldContext);
26
+ var controllerContext = useContext(GaesupControllerContext);
27
+ var cameraMode = controllerContext.cameraMode, perspectiveCamera = controllerContext.perspectiveCamera, orthographicCamera = controllerContext.orthographicCamera;
28
+ var rigidBodyRef = refs.rigidBodyRef, outerGroupRef = refs.outerGroupRef;
29
+ var cameraRay = prop.cameraRay;
30
+ var checkCollision = cameraCollisionDetector(prop).checkCollision;
31
+ var scene = useThree().scene;
32
+ var activeState = worldContext.activeState;
33
+ var intersectObjectMap = {};
34
+ var cameraProp = __assign(__assign({}, prop), { checkCollision: checkCollision, control: control, controllerContext: controllerContext, worldContext: worldContext });
35
+ var getMeshs = function (object) {
36
+ if (object.userData && object.userData.intangible)
37
+ return;
38
+ if (object instanceof THREE.Mesh &&
39
+ object.geometry.type !== "InstancedBufferGeometry") {
40
+ intersectObjectMap[object.uuid] = object;
41
+ }
42
+ object.children.forEach(function (child) {
43
+ getMeshs(child);
44
+ });
45
+ };
46
+ useFrame(function (state, delta) {
47
+ if (!rigidBodyRef ||
48
+ !rigidBodyRef.current ||
49
+ !outerGroupRef ||
50
+ !outerGroupRef.current)
51
+ return null;
52
+ cameraProp.state = state;
53
+ cameraProp.delta = delta;
54
+ if (cameraMode.cameraType === "perspective") {
55
+ scene.children.forEach(function (child) { return getMeshs(child); });
56
+ cameraRay.intersectObjectMap = intersectObjectMap;
57
+ if (cameraMode.controlType === "orbit") {
58
+ orbit(cameraProp);
59
+ }
60
+ else if (cameraMode.controlType === "normal") {
61
+ normal(cameraProp);
62
+ }
63
+ }
64
+ else if (cameraMode.cameraType === "orthographic") {
65
+ mapControl(cameraProp);
66
+ }
67
+ });
68
+ return (_jsxs(_Fragment, { children: [cameraMode.cameraType === "perspective" && (_jsxs(_Fragment, { children: [_jsx(OrbitControls, { target: activeState.position }), _jsx(PerspectiveCamera, __assign({ makeDefault: true }, perspectiveCamera))] })), cameraMode.cameraType === "orthographic" && (_jsxs(_Fragment, { children: [_jsx(MapControls, { target: activeState.position }), _jsx(OrthographicCamera, __assign({ makeDefault: true }, orthographicCamera))] }))] }));
69
+ }
@@ -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>>;