gaesup-world 0.2.25 → 0.2.26

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 (216) hide show
  1. package/dist/gaesup/animation/actions.d.ts +44 -0
  2. package/dist/gaesup/animation/actions.js +103 -0
  3. package/dist/gaesup/camera/control/normal.d.ts +4 -0
  4. package/dist/gaesup/camera/control/normal.js +18 -0
  5. package/dist/gaesup/camera/control/orbit.d.ts +4 -0
  6. package/dist/gaesup/camera/control/orbit.js +22 -0
  7. package/dist/gaesup/camera/detector/index.d.ts +2 -0
  8. package/dist/gaesup/camera/detector/index.js +25 -0
  9. package/dist/gaesup/camera/index.d.ts +8 -0
  10. package/dist/gaesup/camera/index.js +139 -0
  11. package/dist/gaesup/camera/type.d.ts +13 -0
  12. package/dist/gaesup/camera/type.js +1 -0
  13. package/dist/gaesup/component/active/airplane/index.d.ts +11 -0
  14. package/dist/gaesup/component/active/airplane/index.js +6 -0
  15. package/dist/gaesup/component/active/character/index.d.ts +7 -0
  16. package/dist/gaesup/component/active/character/index.js +34 -0
  17. package/dist/gaesup/component/active/vehicle/index.d.ts +12 -0
  18. package/dist/gaesup/component/active/vehicle/index.js +31 -0
  19. package/dist/gaesup/component/index.d.ts +7 -0
  20. package/dist/gaesup/component/index.js +19 -0
  21. package/dist/gaesup/component/inner/airplane/index.d.ts +2 -0
  22. package/dist/gaesup/component/inner/airplane/index.js +16 -0
  23. package/dist/gaesup/component/inner/character/index.d.ts +25 -0
  24. package/dist/gaesup/component/inner/character/index.js +28 -0
  25. package/dist/gaesup/component/inner/common/InnerGroupRef.d.ts +10 -0
  26. package/dist/gaesup/component/inner/common/InnerGroupRef.js +29 -0
  27. package/dist/gaesup/component/inner/common/OuterGroupRef.d.ts +4 -0
  28. package/dist/gaesup/component/inner/common/OuterGroupRef.js +6 -0
  29. package/dist/gaesup/component/inner/common/RigidbodyRef.d.ts +12 -0
  30. package/dist/gaesup/component/inner/common/RigidbodyRef.js +7 -0
  31. package/dist/gaesup/component/inner/common/setGroundRay.d.ts +9 -0
  32. package/dist/gaesup/component/inner/common/setGroundRay.js +14 -0
  33. package/dist/gaesup/component/inner/common/type.d.ts +20 -0
  34. package/dist/gaesup/component/inner/common/type.js +1 -0
  35. package/dist/gaesup/component/inner/rider/index.d.ts +11 -0
  36. package/dist/gaesup/component/inner/rider/index.js +31 -0
  37. package/dist/gaesup/component/inner/vehicle/collider.d.ts +10 -0
  38. package/dist/gaesup/component/inner/vehicle/collider.js +19 -0
  39. package/dist/gaesup/component/inner/vehicle/index.d.ts +2 -0
  40. package/dist/gaesup/component/inner/vehicle/index.js +17 -0
  41. package/dist/gaesup/component/inner/vehicle/wheels.d.ts +7 -0
  42. package/dist/gaesup/component/inner/vehicle/wheels.js +64 -0
  43. package/dist/gaesup/component/passive/airplane/index.d.ts +13 -0
  44. package/dist/gaesup/component/passive/airplane/index.js +40 -0
  45. package/dist/gaesup/component/passive/character/index.d.ts +10 -0
  46. package/dist/gaesup/component/passive/character/index.js +46 -0
  47. package/dist/gaesup/component/passive/type.d.ts +20 -0
  48. package/dist/gaesup/component/passive/type.js +1 -0
  49. package/dist/gaesup/component/passive/vehicle/index.d.ts +13 -0
  50. package/dist/gaesup/component/passive/vehicle/index.js +17 -0
  51. package/dist/gaesup/component/type.d.ts +17 -0
  52. package/dist/gaesup/component/type.js +1 -0
  53. package/dist/gaesup/controller/context/index.d.ts +49 -0
  54. package/dist/gaesup/controller/context/index.js +59 -0
  55. package/dist/gaesup/controller/context/reducer.d.ts +12 -0
  56. package/dist/gaesup/controller/context/reducer.js +21 -0
  57. package/dist/gaesup/controller/context/type.d.ts +38 -0
  58. package/dist/gaesup/controller/context/type.js +1 -0
  59. package/dist/gaesup/controller/debug/airplane.d.ts +71 -0
  60. package/dist/gaesup/controller/debug/airplane.js +71 -0
  61. package/dist/gaesup/controller/debug/character.d.ts +27 -0
  62. package/dist/gaesup/controller/debug/character.js +27 -0
  63. package/dist/gaesup/controller/debug/index.d.ts +6 -0
  64. package/dist/gaesup/controller/debug/index.js +49 -0
  65. package/dist/gaesup/controller/debug/vehicle.d.ts +27 -0
  66. package/dist/gaesup/controller/debug/vehicle.js +27 -0
  67. package/dist/gaesup/controller/index.d.ts +3 -0
  68. package/dist/gaesup/controller/index.js +74 -0
  69. package/dist/gaesup/controller/initialize/callback/index.d.ts +2 -0
  70. package/dist/gaesup/controller/initialize/callback/index.js +62 -0
  71. package/dist/gaesup/controller/initialize/callback/type.d.ts +27 -0
  72. package/dist/gaesup/controller/initialize/callback/type.js +1 -0
  73. package/dist/gaesup/controller/initialize/index.d.ts +10 -0
  74. package/dist/gaesup/controller/initialize/index.js +75 -0
  75. package/dist/gaesup/controller/type.d.ts +85 -0
  76. package/dist/gaesup/controller/type.js +1 -0
  77. package/dist/gaesup/gaesupProps/index.d.ts +7 -0
  78. package/dist/gaesup/gaesupProps/index.js +46 -0
  79. package/dist/gaesup/hooks/useGaesupAnimation/index.d.ts +10 -0
  80. package/dist/gaesup/hooks/useGaesupAnimation/index.js +95 -0
  81. package/dist/gaesup/hooks/useGaesupController/index.d.ts +10 -0
  82. package/dist/gaesup/hooks/useGaesupController/index.js +14 -0
  83. package/dist/gaesup/hooks/useGaesupGltf/index.d.ts +25 -0
  84. package/dist/gaesup/hooks/useGaesupGltf/index.js +73 -0
  85. package/dist/gaesup/hooks/useJoyStick/index.d.ts +39 -0
  86. package/dist/gaesup/hooks/useJoyStick/index.js +61 -0
  87. package/dist/gaesup/hooks/usePushKey/index.d.ts +3 -0
  88. package/dist/gaesup/hooks/usePushKey/index.js +29 -0
  89. package/dist/gaesup/hooks/useRideable/index.d.ts +28 -0
  90. package/dist/gaesup/hooks/useRideable/index.js +199 -0
  91. package/dist/gaesup/hooks/useTeleport/index.d.ts +3 -0
  92. package/dist/gaesup/hooks/useTeleport/index.js +12 -0
  93. package/dist/gaesup/physics/airplane/damping.d.ts +2 -0
  94. package/dist/gaesup/physics/airplane/damping.js +5 -0
  95. package/dist/gaesup/physics/airplane/direction.d.ts +2 -0
  96. package/dist/gaesup/physics/airplane/direction.js +65 -0
  97. package/dist/gaesup/physics/airplane/gravity.d.ts +14 -0
  98. package/dist/gaesup/physics/airplane/gravity.js +18 -0
  99. package/dist/gaesup/physics/airplane/impulse.d.ts +16 -0
  100. package/dist/gaesup/physics/airplane/impulse.js +31 -0
  101. package/dist/gaesup/physics/airplane/index.d.ts +2 -0
  102. package/dist/gaesup/physics/airplane/index.js +14 -0
  103. package/dist/gaesup/physics/airplane/innerCalc.d.ts +2 -0
  104. package/dist/gaesup/physics/airplane/innerCalc.js +27 -0
  105. package/dist/gaesup/physics/airplane/landing.d.ts +2 -0
  106. package/dist/gaesup/physics/airplane/landing.js +29 -0
  107. package/dist/gaesup/physics/character/direction.d.ts +23 -0
  108. package/dist/gaesup/physics/character/direction.js +55 -0
  109. package/dist/gaesup/physics/character/impulse.d.ts +2 -0
  110. package/dist/gaesup/physics/character/impulse.js +43 -0
  111. package/dist/gaesup/physics/character/index.d.ts +2 -0
  112. package/dist/gaesup/physics/character/index.js +8 -0
  113. package/dist/gaesup/physics/character/innerCalc.d.ts +2 -0
  114. package/dist/gaesup/physics/character/innerCalc.js +31 -0
  115. package/dist/gaesup/physics/check/ground.d.ts +2 -0
  116. package/dist/gaesup/physics/check/ground.js +15 -0
  117. package/dist/gaesup/physics/check/index.d.ts +2 -0
  118. package/dist/gaesup/physics/check/index.js +12 -0
  119. package/dist/gaesup/physics/check/moving.d.ts +2 -0
  120. package/dist/gaesup/physics/check/moving.js +16 -0
  121. package/dist/gaesup/physics/check/push.d.ts +2 -0
  122. package/dist/gaesup/physics/check/push.js +6 -0
  123. package/dist/gaesup/physics/check/riding.d.ts +2 -0
  124. package/dist/gaesup/physics/check/riding.js +7 -0
  125. package/dist/gaesup/physics/check/rotate.d.ts +2 -0
  126. package/dist/gaesup/physics/check/rotate.js +8 -0
  127. package/dist/gaesup/physics/index.d.ts +2 -0
  128. package/dist/gaesup/physics/index.js +58 -0
  129. package/dist/gaesup/physics/type.d.ts +36 -0
  130. package/dist/gaesup/physics/type.js +1 -0
  131. package/dist/gaesup/physics/vehicle/damping.d.ts +2 -0
  132. package/dist/gaesup/physics/vehicle/damping.js +6 -0
  133. package/dist/gaesup/physics/vehicle/direction.d.ts +4 -0
  134. package/dist/gaesup/physics/vehicle/direction.js +30 -0
  135. package/dist/gaesup/physics/vehicle/impulse.d.ts +16 -0
  136. package/dist/gaesup/physics/vehicle/impulse.js +40 -0
  137. package/dist/gaesup/physics/vehicle/index.d.ts +2 -0
  138. package/dist/gaesup/physics/vehicle/index.js +12 -0
  139. package/dist/gaesup/physics/vehicle/innerCalc.d.ts +2 -0
  140. package/dist/gaesup/physics/vehicle/innerCalc.js +24 -0
  141. package/dist/gaesup/physics/vehicle/landing.d.ts +2 -0
  142. package/dist/gaesup/physics/vehicle/landing.js +29 -0
  143. package/dist/gaesup/tools/gameBoy/GameBoyButton.d.ts +9 -0
  144. package/dist/gaesup/tools/gameBoy/GameBoyButton.js +16 -0
  145. package/dist/gaesup/tools/gameBoy/index.d.ts +8 -0
  146. package/dist/gaesup/tools/gameBoy/index.js +22 -0
  147. package/dist/gaesup/tools/gameBoy/type.d.ts +4 -0
  148. package/dist/gaesup/tools/gameBoy/type.js +1 -0
  149. package/dist/gaesup/tools/gamePad/GamePadButton.d.ts +8 -0
  150. package/dist/gaesup/tools/gamePad/GamePadButton.js +21 -0
  151. package/dist/gaesup/tools/gamePad/index.d.ts +6 -0
  152. package/dist/gaesup/tools/gamePad/index.js +32 -0
  153. package/dist/gaesup/tools/gamePad/type.d.ts +6 -0
  154. package/dist/gaesup/tools/gamePad/type.js +1 -0
  155. package/dist/gaesup/tools/joyStick/index.d.ts +6 -0
  156. package/dist/gaesup/tools/joyStick/index.js +169 -0
  157. package/dist/gaesup/tools/joyStick/type.d.ts +19 -0
  158. package/dist/gaesup/tools/joyStick/type.js +1 -0
  159. package/dist/gaesup/tools/jumpPortal/index.d.ts +16 -0
  160. package/dist/gaesup/tools/jumpPortal/index.js +18 -0
  161. package/dist/gaesup/tools/keyBoardToolTip/constant.d.ts +402 -0
  162. package/dist/gaesup/tools/keyBoardToolTip/constant.js +122 -0
  163. package/dist/gaesup/tools/keyBoardToolTip/default.d.ts +10 -0
  164. package/dist/gaesup/tools/keyBoardToolTip/default.js +12 -0
  165. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +3 -0
  166. package/dist/gaesup/tools/keyBoardToolTip/index.js +70 -0
  167. package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +37 -0
  168. package/dist/gaesup/tools/keyBoardToolTip/type.js +1 -0
  169. package/dist/gaesup/tools/miniMap/default.d.ts +9 -0
  170. package/dist/gaesup/tools/miniMap/default.js +9 -0
  171. package/dist/gaesup/tools/miniMap/index.d.ts +3 -0
  172. package/dist/gaesup/tools/miniMap/index.js +72 -0
  173. package/dist/gaesup/tools/miniMap/type.d.ts +25 -0
  174. package/dist/gaesup/tools/miniMap/type.js +1 -0
  175. package/dist/gaesup/tools/rideable/index.d.ts +3 -0
  176. package/dist/gaesup/tools/rideable/index.js +79 -0
  177. package/dist/gaesup/tools/type.d.ts +2 -0
  178. package/dist/gaesup/tools/type.js +1 -0
  179. package/dist/gaesup/tools/zoomButton/index.d.ts +18 -0
  180. package/dist/gaesup/tools/zoomButton/index.js +146 -0
  181. package/dist/gaesup/utils/context.d.ts +2 -0
  182. package/dist/gaesup/utils/context.js +3 -0
  183. package/dist/gaesup/utils/debug.d.ts +29 -0
  184. package/dist/gaesup/utils/debug.js +36 -0
  185. package/dist/gaesup/utils/index.d.ts +3 -0
  186. package/dist/gaesup/utils/index.js +3 -0
  187. package/dist/gaesup/utils/ray.d.ts +7 -0
  188. package/dist/gaesup/utils/ray.js +6 -0
  189. package/dist/gaesup/utils/ref.d.ts +2 -0
  190. package/dist/gaesup/utils/ref.js +16 -0
  191. package/dist/gaesup/utils/type.d.ts +5 -0
  192. package/dist/gaesup/utils/type.js +1 -0
  193. package/dist/gaesup/utils/vector.d.ts +10 -0
  194. package/dist/gaesup/utils/vector.js +33 -0
  195. package/dist/gaesup/world/context/index.d.ts +6 -0
  196. package/dist/gaesup/world/context/index.js +117 -0
  197. package/dist/gaesup/world/context/reducer.d.ts +29 -0
  198. package/dist/gaesup/world/context/reducer.js +21 -0
  199. package/dist/gaesup/world/context/type.d.ts +169 -0
  200. package/dist/gaesup/world/context/type.js +1 -0
  201. package/dist/gaesup/world/debug/cameraOption.d.ts +47 -0
  202. package/dist/gaesup/world/debug/cameraOption.js +47 -0
  203. package/dist/gaesup/world/debug/index.d.ts +6 -0
  204. package/dist/gaesup/world/debug/index.js +32 -0
  205. package/dist/gaesup/world/debug/mode.d.ts +10 -0
  206. package/dist/gaesup/world/debug/mode.js +10 -0
  207. package/dist/gaesup/world/index.d.ts +3 -0
  208. package/dist/gaesup/world/index.js +9 -0
  209. package/dist/gaesup/world/initalize/index.d.ts +35 -0
  210. package/dist/gaesup/world/initalize/index.js +62 -0
  211. package/dist/gaesup/world/type.d.ts +19 -0
  212. package/dist/gaesup/world/type.js +1 -0
  213. package/dist/index.d.ts +23 -0
  214. package/index.ts +29 -0
  215. package/package.json +2 -5
  216. package/yarn-error.log +12152 -0
@@ -0,0 +1,122 @@
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
+ export var KeyboardF = {
13
+ ESC: { name: "ESC", gridRow: "1/2", gridColumn: "1/2" },
14
+ F1: { name: "F1", gridRow: "1/2", gridColumn: "3/4" },
15
+ F2: { name: "F2", gridRow: "1/2", gridColumn: "4/5" },
16
+ F3: { name: "F3", gridRow: "1/2", gridColumn: "5/6" },
17
+ F4: { name: "F4", gridRow: "1/2", gridColumn: "6/7" },
18
+ F5: { name: "F5", gridRow: "1/2", gridColumn: "8/9" },
19
+ F6: { name: "F6", gridRow: "1/2", gridColumn: "9/10" },
20
+ F7: { name: "F7", gridRow: "1/2", gridColumn: "10/11" },
21
+ F8: { name: "F8", gridRow: "1/2", gridColumn: "11/12" },
22
+ F9: { name: "F9", gridRow: "1/2", gridColumn: "13/14" },
23
+ F10: { name: "F10", gridRow: "1/2", gridColumn: "14/15" },
24
+ F11: { name: "F11", gridRow: "1/2", gridColumn: "15/16" },
25
+ F12: { name: "F12", gridRow: "1/2", gridColumn: "16/17" },
26
+ };
27
+ export var KeyboardOne = {
28
+ Backquote: { name: "`", gridRow: "2/3", gridColumn: "1/3" },
29
+ Digit1: { name: "1", gridRow: "2/3", gridColumn: "3/4" },
30
+ Digit2: { name: "2", gridRow: "2/3", gridColumn: "4/5" },
31
+ Digit3: { name: "3", gridRow: "2/3", gridColumn: "5/6" },
32
+ Digit4: { name: "4", gridRow: "2/3", gridColumn: "6/7" },
33
+ Digit5: { name: "5", gridRow: "2/3", gridColumn: "7/8" },
34
+ Digit6: { name: "6", gridRow: "2/3", gridColumn: "8/9" },
35
+ Digit7: { name: "7", gridRow: "2/3", gridColumn: "9/10" },
36
+ Digit8: { name: "8", gridRow: "2/3", gridColumn: "10/11" },
37
+ Digit9: { name: "9", gridRow: "2/3", gridColumn: "11/12" },
38
+ Digit0: { name: "0", gridRow: "2/3", gridColumn: "12/13" },
39
+ Minus: { name: "-", gridRow: "2/3", gridColumn: "13/14" },
40
+ Equal: { name: "=", gridRow: "2/3", gridColumn: "14/15" },
41
+ Backspace: { name: "Backspace", gridRow: "2/3", gridColumn: "15/17" },
42
+ };
43
+ export var KeyboardTwo = {
44
+ Tab: { name: "Tab", gridRow: "3/4", gridColumn: "1/3" },
45
+ KeyQ: { name: "Q", gridRow: "3/4", gridColumn: "3/4" },
46
+ KeyW: { name: "W", gridRow: "3/4", gridColumn: "4/5" },
47
+ KeyE: { name: "E", gridRow: "3/4", gridColumn: "5/6" },
48
+ KeyR: { name: "R", gridRow: "3/4", gridColumn: "6/7" },
49
+ KeyT: { name: "T", gridRow: "3/4", gridColumn: "7/8" },
50
+ KeyY: { name: "Y", gridRow: "3/4", gridColumn: "8/9" },
51
+ KeyU: { name: "U", gridRow: "3/4", gridColumn: "9/10" },
52
+ KeyI: { name: "I", gridRow: "3/4", gridColumn: "10/11" },
53
+ KeyO: { name: "O", gridRow: "3/4", gridColumn: "11/12" },
54
+ KeyP: { name: "P", gridRow: "3/4", gridColumn: "12/13" },
55
+ BracketLeft: { name: "[", gridRow: "3/4", gridColumn: "13/14" },
56
+ BracketRight: { name: "]", gridRow: "3/4", gridColumn: "14/15" },
57
+ Backslash: { name: "\\", gridRow: "3/4", gridColumn: "15/17" },
58
+ };
59
+ export var KeyboardThree = {
60
+ CapsLock: { name: "CapsLock", gridRow: "4/5", gridColumn: "1/3" },
61
+ KeyA: { name: "A", gridRow: "4/5", gridColumn: "3/4" },
62
+ KeyS: { name: "S", gridRow: "4/5", gridColumn: "4/5" },
63
+ KeyD: { name: "D", gridRow: "4/5", gridColumn: "5/6" },
64
+ KeyF: { name: "F", gridRow: "4/5", gridColumn: "6/7" },
65
+ KeyG: { name: "G", gridRow: "4/5", gridColumn: "7/8" },
66
+ KeyH: { name: "H", gridRow: "4/5", gridColumn: "8/9" },
67
+ KeyJ: { name: "J", gridRow: "4/5", gridColumn: "9/10" },
68
+ KeyK: { name: "K", gridRow: "4/5", gridColumn: "10/11" },
69
+ KeyL: { name: "L", gridRow: "4/5", gridColumn: "11/12" },
70
+ Semicolon: { name: ";", gridRow: "4/5", gridColumn: "12/13" },
71
+ Quote: { name: "'", gridRow: "4/5", gridColumn: "13/14" },
72
+ Enter: { name: "Enter", gridRow: "4/5", gridColumn: "14/17" },
73
+ };
74
+ export var KeyboardFour = {
75
+ ShiftLeft: {
76
+ name: "Shift",
77
+ gridRow: "5/6",
78
+ gridColumn: "1/4",
79
+ code: "Shift",
80
+ },
81
+ KeyZ: { name: "Z", gridRow: "5/6", gridColumn: "4/5" },
82
+ KeyX: { name: "X", gridRow: "5/6", gridColumn: "5/6" },
83
+ KeyC: { name: "C", gridRow: "5/6", gridColumn: "6/7" },
84
+ KeyV: { name: "V", gridRow: "5/6", gridColumn: "7/8" },
85
+ KeyB: { name: "B", gridRow: "5/6", gridColumn: "8/9" },
86
+ KeyN: { name: "N", gridRow: "5/6", gridColumn: "9/10" },
87
+ KeyM: { name: "M", gridRow: "5/6", gridColumn: "10/11" },
88
+ Comma: { name: ",", gridRow: "5/6", gridColumn: "11/12" },
89
+ Period: { name: ".", gridRow: "5/6", gridColumn: "12/13" },
90
+ Slash: { name: "/", gridRow: "5/6", gridColumn: "13/14" },
91
+ ShiftRight: {
92
+ name: "Shift",
93
+ gridRow: "5/6",
94
+ gridColumn: "14/17",
95
+ code: "Shift",
96
+ },
97
+ };
98
+ export var KeyboardFive = {
99
+ ControlLeft: {
100
+ name: "Control",
101
+ gridRow: "6/7",
102
+ gridColumn: "1/3",
103
+ code: "Control",
104
+ },
105
+ Option: { name: "Option", gridRow: "6/7", gridColumn: "3/5" },
106
+ AltLeft: { name: "Alt", gridRow: "6/7", gridColumn: "5/7", code: "Alt" },
107
+ Space: { name: "Space", gridRow: "6/7", gridColumn: "7/13" },
108
+ AltRight: { name: "Alt", gridRow: "6/7", gridColumn: "13/15", code: "Alt" },
109
+ ControlRight: {
110
+ name: "Control",
111
+ gridRow: "6/7",
112
+ gridColumn: "15/17",
113
+ code: "Control",
114
+ },
115
+ };
116
+ export var KeyboardArrow = {
117
+ ArrowUp: { name: "Up", gridRow: "5/6", gridColumn: "19/20" },
118
+ ArrowLeft: { name: "Left", gridRow: "6/7", gridColumn: "18/19" },
119
+ ArrowDown: { name: "Down", gridRow: "6/7", gridColumn: "19/20" },
120
+ ArrowRight: { name: "Right", gridRow: "6/7", gridColumn: "20/21" },
121
+ };
122
+ export var KeyBoardAll = __assign(__assign(__assign(__assign(__assign(__assign(__assign({}, KeyboardF), KeyboardOne), KeyboardTwo), KeyboardThree), KeyboardFour), KeyboardFive), KeyboardArrow);
@@ -0,0 +1,10 @@
1
+ export declare const KeyboardMapDefault: {
2
+ name: string;
3
+ keys: string[];
4
+ }[];
5
+ export declare const keyboardToolTipDefault: {
6
+ keyBoardMap: {
7
+ name: string;
8
+ keys: string[];
9
+ }[];
10
+ };
@@ -0,0 +1,12 @@
1
+ export var KeyboardMapDefault = [
2
+ { name: "forward", keys: ["ArrowUp", "KeyW"] },
3
+ { name: "backward", keys: ["ArrowDown", "KeyS"] },
4
+ { name: "leftward", keys: ["ArrowLeft", "KeyA"] },
5
+ { name: "rightward", keys: ["ArrowRight", "KeyD"] },
6
+ { name: "jump", keys: ["Space"] },
7
+ { name: "run", keys: ["Shift"] },
8
+ { name: "greet", keys: ["KeyZ"] },
9
+ ];
10
+ export var keyboardToolTipDefault = {
11
+ keyBoardMap: KeyboardMapDefault,
12
+ };
@@ -0,0 +1,3 @@
1
+ import "./style.css";
2
+ import { keyBoardToolTipType } from "./type";
3
+ export declare function KeyBoardToolTip(props: keyBoardToolTipType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,70 @@
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 } from "react/jsx-runtime";
13
+ import { useContext } from "react";
14
+ import { GaesupWorldContext } from "../../world/context";
15
+ import { KeyBoardAll } from "./constant";
16
+ import "./style.css";
17
+ export function KeyBoardToolTip(props) {
18
+ var worldContext = useContext(GaesupWorldContext);
19
+ var keyBoardMap = props.keyBoardMap, keyBoardToolTipInnerStyle = props.keyBoardToolTipInnerStyle, selectedKeyCapStyle = props.selectedKeyCapStyle, notSelectedkeyCapStyle = props.notSelectedkeyCapStyle, keyCapStyle = props.keyCapStyle, label = props.label;
20
+ var mode = worldContext.mode, control = worldContext.control;
21
+ var keyArray = Object.entries(KeyBoardAll).reduce(function (keyArray, cur) {
22
+ var key = cur[0], value = cur[1];
23
+ var gridRow = value.gridRow, gridColumn = value.gridColumn, name = value.name;
24
+ var labeledName = (label === null || label === void 0 ? void 0 : label[name]) || name;
25
+ var keyBoardItem = {
26
+ code: value.code || key,
27
+ gridRow: gridRow,
28
+ gridColumn: gridColumn,
29
+ name: labeledName,
30
+ };
31
+ keyArray.push(keyBoardItem);
32
+ return keyArray;
33
+ }, []);
34
+ var codeToActionObj = keyBoardMap.reduce(function (maps, keyboardMapItem) {
35
+ keyboardMapItem.keys.forEach(function (key) {
36
+ maps[key] = keyboardMapItem.name;
37
+ });
38
+ return maps;
39
+ }, {});
40
+ return (_jsx(_Fragment, { children: mode.controller === "keyboard" && (_jsx("div", { className: "keyBoardToolInner", style: keyBoardToolTipInnerStyle, children: keyArray.map(function (item, key) {
41
+ var background = "rgba(0, 0, 0, 0.1)";
42
+ var boxShadow = "0 0 5px rgba(0, 0, 0, 0.2)";
43
+ var isSelect = "none";
44
+ if (codeToActionObj[item.code]) {
45
+ if (control[codeToActionObj[item.code]]) {
46
+ isSelect = "select";
47
+ background = "linear-gradient( 68.4deg, rgba(99,251,215,1) -0.4%, rgba(5,222,250,1) 100.2% )";
48
+ boxShadow = "0 0 10px rgba(99,251,215,1)";
49
+ }
50
+ else {
51
+ isSelect = "notSelect";
52
+ background = "rgba(0, 0, 0, 0.6)";
53
+ boxShadow = "0 0 10px rgba(0, 0, 0, 0.6)";
54
+ }
55
+ }
56
+ var color = "white";
57
+ if (codeToActionObj[item.code] &&
58
+ control[codeToActionObj[item.code]]) {
59
+ color = "black";
60
+ }
61
+ var keyStyle = keyCapStyle;
62
+ if (isSelect === "select") {
63
+ keyStyle = __assign({}, selectedKeyCapStyle);
64
+ }
65
+ else if (isSelect === "notSelect") {
66
+ keyStyle = __assign({}, notSelectedkeyCapStyle);
67
+ }
68
+ return (_jsx("div", { className: "keyCap", style: __assign({ background: background, boxShadow: boxShadow, color: color, gridRow: item.gridRow, gridColumn: item.gridColumn }, keyStyle), children: item.name }, key));
69
+ }) })) }));
70
+ }
@@ -0,0 +1,37 @@
1
+ import { CSSProperties } from "react";
2
+ export type keyboardMapType = {
3
+ name: string;
4
+ keys: string[];
5
+ label?: string;
6
+ match?: string;
7
+ }[];
8
+ export type keyMapItemType = {
9
+ name: string;
10
+ gridRow: string;
11
+ gridColumn: string;
12
+ code?: string;
13
+ };
14
+ export type keyArrayItemType = {
15
+ code: string;
16
+ gridRow: string;
17
+ gridColumn: string;
18
+ name: string;
19
+ };
20
+ export type keyboardMapItemType = {
21
+ name: string;
22
+ keys: string[];
23
+ };
24
+ export type keyBoardMapType = {
25
+ [name: string]: keyMapItemType;
26
+ };
27
+ export type keyBoardLabelType = {
28
+ [name: string]: string;
29
+ };
30
+ export type keyBoardToolTipType = {
31
+ keyBoardLabel?: keyBoardLabelType;
32
+ keyBoardMap?: keyboardMapItemType[];
33
+ label?: Record<string, string>;
34
+ } & {
35
+ [key in "keyBoardToolTipInnerStyle" | "notSelectedkeyCapStyle" | "selectedKeyCapStyle" | "keyCapStyle"]?: CSSProperties;
36
+ };
37
+ export type keyBoardToolTipPartialType = Partial<keyBoardToolTipType>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare const minimapDefault: {
2
+ scale: number;
3
+ minScale: number;
4
+ maxScale: number;
5
+ blockScale: boolean;
6
+ };
7
+ export declare const minimapInnerDefault: {
8
+ props: {};
9
+ };
@@ -0,0 +1,9 @@
1
+ export var minimapDefault = {
2
+ scale: 0.5,
3
+ minScale: 0.1,
4
+ maxScale: 2,
5
+ blockScale: false,
6
+ };
7
+ export var minimapInnerDefault = {
8
+ props: {},
9
+ };
@@ -0,0 +1,3 @@
1
+ import "./style.css";
2
+ import { minimapType } from "./type";
3
+ export declare function MiniMap(props: minimapType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,72 @@
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 { useCallback, useContext, useState } from "react";
14
+ import { GaesupWorldContext } from "../../world/context";
15
+ import { minimapDefault } from "./default";
16
+ import "./style.css";
17
+ // X 축은 동(+) 서(-) 방향, 즉 경도를 나타낸다.
18
+ // Z 축은 남(+) 북(-) 방향, 즉 위도를 나타낸다.
19
+ export function MiniMap(props) {
20
+ var _a = useContext(GaesupWorldContext), minimap = _a.minimap, activeState = _a.activeState, mode = _a.mode;
21
+ var _b = useState(props.scale || minimapDefault.scale), scale = _b[0], setscale = _b[1];
22
+ var innerStyle = props.innerStyle, textStyle = props.textStyle, objectStyle = props.objectStyle, avatarStyle = props.avatarStyle, scaleStyle = props.scaleStyle, directionStyle = props.directionStyle, plusMinusStyle = props.plusMinusStyle;
23
+ var upscale = useCallback(function () {
24
+ var max = props.maxScale || minimapDefault.maxScale;
25
+ setscale(function (scale) { return Math.min(max, scale + 0.1); });
26
+ }, [setscale, scale]);
27
+ var downscale = useCallback(function () {
28
+ var min = props.minScale || minimapDefault.minScale;
29
+ setscale(function (scale) { return Math.max(min, scale - 0.1); });
30
+ }, [setscale, scale]);
31
+ return (_jsxs("div", { className: "minimap", onWheel: function (e) {
32
+ if (props.blockScale)
33
+ return;
34
+ if (e.deltaY <= 0)
35
+ upscale();
36
+ else
37
+ downscale();
38
+ }, children: [_jsx("div", { className: "minimapOuter", style: objectStyle }), _jsxs("div", { className: "minimapInner", style: __assign({ transform: props.blockRotate || mode.control === "normal"
39
+ ? "translate(-50%, -50%) rotate(180deg) "
40
+ : "translate(-50%, -50%) rotate(".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, innerStyle), children: [_jsx("div", { className: "east direction", style: __assign({ transform: props.blockRotate || mode.control === "normal"
41
+ ? "translate(-50%, -50%) rotate(180deg) "
42
+ : "translate(-50%, -50%) rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, directionStyle), children: "E" }), _jsx("div", { className: "west direction", style: __assign({ transform: props.blockRotate || mode.control === "normal"
43
+ ? "translate(50%, -50%) rotate(180deg) "
44
+ : "translate(50%, -50%) rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, directionStyle), children: "W" }), _jsx("div", { className: "south direction", style: __assign({ transform: props.blockRotate || mode.control === "normal"
45
+ ? "translate(-50%, 50%) rotate(180deg) "
46
+ : "translate(-50%, 50%) rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, directionStyle), children: "S" }), _jsx("div", { className: "north direction", style: __assign({ transform: props.blockRotate || mode.control === "normal"
47
+ ? "translate(-50%, -50%) rotate(180deg) "
48
+ : "translate(-50%, -50%) rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, directionStyle), children: "N" }), Object.values(minimap.props).map(function (_a, key) {
49
+ var center = _a.center, size = _a.size, text = _a.text;
50
+ var X = (center.x - activeState.position.x) * scale;
51
+ var Z = (center.z - activeState.position.z) * scale;
52
+ return (_jsxs("div", { children: [_jsx("div", { className: "minimapObject", style: __assign({ width: "".concat(size.x * scale, "rem"), height: "".concat(size.z * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50.1%, -50.1%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%", zIndex: 1 + key }, objectStyle) }, key), _jsx("div", { className: "textObject", style: {
53
+ width: "".concat(size.x * scale, "rem"),
54
+ height: "".concat(size.z * scale, "rem"),
55
+ top: "50.1%",
56
+ left: "50.1%",
57
+ transform: "translate(-50.1%, -50.1%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"),
58
+ transformOrigin: "50.1% 50.1%",
59
+ zIndex: 1001 + key,
60
+ }, children: text && (_jsx("div", { className: "text", style: __assign(__assign({}, textStyle), { zIndex: 1001 + key, transform: props.blockRotate || mode.control === "normal"
61
+ ? " rotate(180deg) "
62
+ : " rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }), children: text })) })] }, key));
63
+ }), _jsx("div", { className: "avatar", style: avatarStyle })] }), !props.blockScaleControl && (_jsxs("div", { className: "scale", style: scaleStyle, children: [_jsx("div", { className: "plusMinus", style: plusMinusStyle, onClick: function () {
64
+ if (props.blockScale)
65
+ return;
66
+ downscale();
67
+ }, children: "+" }), "SCALE 1:", Math.round(100 / scale), _jsx("div", { className: "plusMinus", style: plusMinusStyle, onClick: function () {
68
+ if (props.blockScale)
69
+ return;
70
+ upscale();
71
+ }, children: "-" })] }))] }));
72
+ }
@@ -0,0 +1,25 @@
1
+ import { CSSProperties, ReactElement } from "react";
2
+ import * as THREE from "three";
3
+ export type minimapPropsType = {
4
+ type: "normal" | "ground";
5
+ text?: string;
6
+ center: THREE.Vector3;
7
+ size: THREE.Vector3;
8
+ children?: ReactElement;
9
+ position?: THREE.Vector3;
10
+ };
11
+ export type minimapInnerType = {
12
+ props: {
13
+ [key: string]: minimapPropsType;
14
+ };
15
+ };
16
+ export type minimapType = {
17
+ [key in "minimapStyle" | "outerStyle" | "innerStyle" | "textStyle" | "objectStyle" | "avatarStyle" | "directionStyle" | "scaleStyle" | "plusMinusStyle"]?: CSSProperties;
18
+ } & {
19
+ minScale?: number;
20
+ maxScale?: number;
21
+ blockScale?: boolean;
22
+ scale?: number;
23
+ blockRotate?: boolean;
24
+ blockScaleControl?: boolean;
25
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { rideableType } from "../../world/context/type.js";
2
+ import "./style.css";
3
+ export declare function Rideable(props: rideableType): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,79 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ var __generator = (this && this.__generator) || function (thisArg, body) {
11
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
12
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
+ function verb(n) { return function (v) { return step([n, v]); }; }
14
+ function step(op) {
15
+ if (f) throw new TypeError("Generator is already executing.");
16
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
+ if (y = 0, t) op = [op[0] & 2, t.value];
19
+ switch (op[0]) {
20
+ case 0: case 1: t = op; break;
21
+ case 4: _.label++; return { value: op[1], done: false };
22
+ case 5: _.label++; y = op[1]; op = [0]; continue;
23
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
+ default:
25
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
+ if (t[2]) _.ops.pop();
30
+ _.trys.pop(); continue;
31
+ }
32
+ op = body.call(thisArg, _);
33
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
+ }
36
+ };
37
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
+ import { useContext, useEffect } from "react";
39
+ import { euler } from "@react-three/rapier";
40
+ import { PassiveAirplane } from "../../component/passive/airplane/index.js";
41
+ import { PassiveVehicle } from "../../component/passive/vehicle/index.js";
42
+ import { useRideable } from "../../hooks/useRideable/index.js";
43
+ import { V3 } from "../../utils/vector.js";
44
+ import { GaesupWorldContext } from "../../world/context/index.js";
45
+ import "./style.css";
46
+ export function Rideable(props) {
47
+ var _this = this;
48
+ var _a = useContext(GaesupWorldContext), states = _a.states, rideable = _a.rideable;
49
+ var _b = useRideable(), initRideable = _b.initRideable, getRideable = _b.getRideable, ride = _b.ride, landing = _b.landing;
50
+ var current = getRideable(props.objectkey);
51
+ useEffect(function () {
52
+ initRideable(props);
53
+ }, []);
54
+ useEffect(function () {
55
+ if ((states === null || states === void 0 ? void 0 : states.isLanding) &&
56
+ rideable[props.objectkey] &&
57
+ !rideable[props.objectkey].visible) {
58
+ landing(props.objectkey);
59
+ }
60
+ }, [states === null || states === void 0 ? void 0 : states.isLanding]);
61
+ var onCollisionEnter = function (e) { return __awaiter(_this, void 0, void 0, function () {
62
+ return __generator(this, function (_a) {
63
+ switch (_a.label) {
64
+ case 0: return [4 /*yield*/, ride(e, props)];
65
+ case 1:
66
+ _a.sent();
67
+ return [2 /*return*/];
68
+ }
69
+ });
70
+ }); };
71
+ return (_jsx(_Fragment, { children: current &&
72
+ rideable[props.objectkey] &&
73
+ rideable[props.objectkey].visible && (_jsxs("group", { userData: { intangible: true }, children: [props.objectType === "vehicle" && (_jsx(PassiveVehicle, { position: current.position || V3(0, 0, 0), euler: current.rotation || euler(), currentAnimation: "idle", offset: props.offset, urls: {
74
+ vehicleUrl: props.url,
75
+ wheelUrl: props.wheelUrl,
76
+ }, onCollisionEnter: onCollisionEnter })), props.objectType === "airplane" && (_jsx(PassiveAirplane, { position: current.position || V3(0, 0, 0), euler: current.rotation || euler(), currentAnimation: "idle", offset: props.offset, urls: {
77
+ airplaneUrl: props.url,
78
+ }, onCollisionEnter: onCollisionEnter }))] })) }));
79
+ }
@@ -0,0 +1,2 @@
1
+ import { CSSProperties } from "react";
2
+ export type VECssType = Record<keyof CSSProperties, string>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import "@/tools/zoomButton/style.css";
3
+ export type zoomButtonPropsType = {
4
+ children?: React.ReactNode;
5
+ position: THREE.Vector3;
6
+ target?: THREE.Vector3;
7
+ keepBlocking?: boolean;
8
+ zoomButtonStyle?: React.CSSProperties;
9
+ };
10
+ export declare function useZoom(): {
11
+ setZoom: (position: THREE.Vector3, isZoom: boolean) => Promise<void>;
12
+ openCamera: () => Promise<void>;
13
+ closeCamera: (position: THREE.Vector3) => Promise<void>;
14
+ isZoom: boolean;
15
+ setIsZoom: import("react").Dispatch<import("react").SetStateAction<boolean>>;
16
+ moveToCamera: () => Promise<void>;
17
+ };
18
+ export declare function ZoomButton(props: zoomButtonPropsType): import("react/jsx-runtime").JSX.Element;