gaesup-world 0.0.781 → 0.0.783

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 (184) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +273 -8
  3. package/dist/gaesup/camera/control/normal.js +4 -2
  4. package/dist/gaesup/camera/control/orbit.d.ts +2 -0
  5. package/dist/gaesup/camera/control/orbit.js +13 -10
  6. package/dist/gaesup/camera/index.js +75 -20
  7. package/dist/gaesup/component/active/character/index.js +1 -1
  8. package/dist/gaesup/component/active/common/RigidbodyRef.d.ts +1 -0
  9. package/dist/gaesup/component/active/common/RigidbodyRef.js +2 -2
  10. package/dist/gaesup/component/active/common/WrapperRef.d.ts +2 -1
  11. package/dist/gaesup/component/active/common/WrapperRef.js +2 -2
  12. package/dist/gaesup/component/active/vehicle/collider.js +2 -2
  13. package/dist/gaesup/component/active/vehicle/wheel.js +1 -1
  14. package/dist/gaesup/component/index.js +1 -1
  15. package/dist/gaesup/component/passive/airplane/index.js +3 -1
  16. package/dist/gaesup/component/passive/common/RigidbodyRef.js +4 -1
  17. package/dist/gaesup/controller/context/index.d.ts +1 -22
  18. package/dist/gaesup/controller/context/index.js +5 -29
  19. package/dist/gaesup/controller/context/reducer.d.ts +0 -4
  20. package/dist/gaesup/controller/context/type.d.ts +0 -33
  21. package/dist/gaesup/controller/debug/index.js +1 -54
  22. package/dist/gaesup/controller/index.js +0 -5
  23. package/dist/gaesup/controller/initialize/index.d.ts +1 -3
  24. package/dist/gaesup/controller/initialize/index.js +2 -3
  25. package/dist/gaesup/controller/type.d.ts +3 -6
  26. package/dist/gaesup/gaesupProps/index.d.ts +1 -2
  27. package/dist/gaesup/gaesupProps/index.js +2 -23
  28. package/dist/gaesup/{tools/joystick/default.d.ts → hooks/useJoyStick/index.d.ts} +1 -1
  29. package/dist/gaesup/{tools/joystick/default.js → hooks/useJoyStick/index.js} +1 -1
  30. package/dist/gaesup/physics/airplane/direction.js +14 -12
  31. package/dist/gaesup/physics/airplane/index.js +2 -4
  32. package/dist/gaesup/physics/airplane/innerCalc.d.ts +2 -0
  33. package/dist/gaesup/physics/{vehicle/currentSetting.js → airplane/innerCalc.js} +6 -2
  34. package/dist/gaesup/physics/character/direction.d.ts +1 -1
  35. package/dist/gaesup/physics/character/direction.js +13 -13
  36. package/dist/gaesup/physics/character/innerCalc.js +7 -3
  37. package/dist/gaesup/physics/check/ground.d.ts +1 -1
  38. package/dist/gaesup/physics/check/ground.js +4 -2
  39. package/dist/gaesup/physics/check/moving.js +1 -2
  40. package/dist/gaesup/physics/index.js +8 -5
  41. package/dist/gaesup/physics/vehicle/direction.d.ts +2 -0
  42. package/dist/gaesup/physics/vehicle/direction.js +30 -23
  43. package/dist/gaesup/physics/vehicle/impulse.js +1 -5
  44. package/dist/gaesup/physics/vehicle/index.js +2 -4
  45. package/dist/gaesup/physics/vehicle/innerCalc.d.ts +2 -0
  46. package/dist/gaesup/physics/{airplane/currentSetting.js → vehicle/innerCalc.js} +3 -2
  47. package/dist/gaesup/tools/{gameboy → gameBoy}/GameBoyButton.d.ts +3 -3
  48. package/dist/gaesup/tools/gameBoy/GameBoyButton.js +16 -0
  49. package/dist/gaesup/tools/{gameboy → gameBoy}/index.d.ts +1 -0
  50. package/dist/gaesup/tools/{gameboy → gameBoy}/index.js +2 -3
  51. package/dist/gaesup/tools/gameBoy/type.d.ts +4 -0
  52. package/dist/gaesup/tools/gamePad/GamePadButton.d.ts +7 -0
  53. package/dist/gaesup/tools/gamePad/GamePadButton.js +21 -0
  54. package/dist/gaesup/tools/gamePad/index.d.ts +6 -0
  55. package/dist/gaesup/tools/{gamepad → gamePad}/index.js +10 -8
  56. package/dist/gaesup/tools/gamePad/type.d.ts +6 -0
  57. package/dist/gaesup/tools/{joystick → joyStick}/index.d.ts +1 -0
  58. package/dist/gaesup/tools/{joystick → joyStick}/index.js +19 -20
  59. package/dist/gaesup/tools/{joystick → joyStick}/type.d.ts +2 -2
  60. package/dist/gaesup/tools/jumpPortal/index.d.ts +3 -0
  61. package/dist/gaesup/tools/jumpPortal/index.js +11 -0
  62. package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +1 -0
  63. package/dist/gaesup/tools/keyBoardToolTip/index.js +4 -6
  64. package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +2 -2
  65. package/dist/gaesup/tools/{minimap → miniMap}/index.d.ts +1 -0
  66. package/dist/gaesup/tools/{minimap → miniMap}/index.js +13 -16
  67. package/dist/gaesup/tools/{minimap → miniMap}/type.d.ts +2 -2
  68. package/dist/gaesup/tools/rideable/index.d.ts +9 -0
  69. package/dist/gaesup/tools/rideable/index.js +115 -0
  70. package/dist/gaesup/tools/zoomButton/index.d.ts +10 -0
  71. package/dist/gaesup/tools/zoomButton/index.js +99 -0
  72. package/dist/gaesup/world/context/index.js +25 -1
  73. package/dist/gaesup/world/context/reducer.d.ts +8 -3
  74. package/dist/gaesup/world/context/type.d.ts +35 -7
  75. package/dist/gaesup/{controller → world}/debug/cameraOption.d.ts +20 -0
  76. package/dist/gaesup/{controller → world}/debug/cameraOption.js +20 -0
  77. package/dist/gaesup/world/debug/index.js +28 -4
  78. package/dist/gaesup/world/index.d.ts +1 -0
  79. package/dist/gaesup/world/index.js +4 -2
  80. package/dist/gaesup/world/initalize/index.d.ts +8 -3
  81. package/dist/gaesup/world/initalize/index.js +12 -2
  82. package/dist/gaesup/world/type.d.ts +6 -1
  83. package/dist/index.d.ts +19 -2
  84. package/dist/index.js +19 -2
  85. package/package.json +8 -9
  86. package/yarn-error.log +12152 -0
  87. package/dist/gaesup/camera/control/map.d.ts +0 -2
  88. package/dist/gaesup/camera/control/map.js +0 -5
  89. package/dist/gaesup/controller/debug/orthographicCamera.d.ts +0 -17
  90. package/dist/gaesup/controller/debug/orthographicCamera.js +0 -17
  91. package/dist/gaesup/controller/debug/perspectiveCamera.d.ts +0 -12
  92. package/dist/gaesup/controller/debug/perspectiveCamera.js +0 -12
  93. package/dist/gaesup/index.d.ts +0 -11
  94. package/dist/gaesup/index.js +0 -11
  95. package/dist/gaesup/physics/airplane/currentSetting.d.ts +0 -2
  96. package/dist/gaesup/physics/airplane/turn.d.ts +0 -2
  97. package/dist/gaesup/physics/airplane/turn.js +0 -5
  98. package/dist/gaesup/physics/vehicle/currentSetting.d.ts +0 -2
  99. package/dist/gaesup/physics/vehicle/turn.d.ts +0 -2
  100. package/dist/gaesup/physics/vehicle/turn.js +0 -6
  101. package/dist/gaesup/styles.css.d.ts +0 -2
  102. package/dist/gaesup/styles.css.js +0 -24
  103. package/dist/gaesup/tools/gameboy/GameBoyButton.js +0 -20
  104. package/dist/gaesup/tools/gameboy/style.css.d.ts +0 -39
  105. package/dist/gaesup/tools/gameboy/style.css.js +0 -76
  106. package/dist/gaesup/tools/gameboy/type.d.ts +0 -4
  107. package/dist/gaesup/tools/gamepad/GamePadButton.d.ts +0 -6
  108. package/dist/gaesup/tools/gamepad/GamePadButton.js +0 -24
  109. package/dist/gaesup/tools/gamepad/default.d.ts +0 -3
  110. package/dist/gaesup/tools/gamepad/default.js +0 -3
  111. package/dist/gaesup/tools/gamepad/index.d.ts +0 -2
  112. package/dist/gaesup/tools/gamepad/style.css.d.ts +0 -15
  113. package/dist/gaesup/tools/gamepad/style.css.js +0 -68
  114. package/dist/gaesup/tools/gamepad/type.d.ts +0 -6
  115. package/dist/gaesup/tools/index.d.ts +0 -6
  116. package/dist/gaesup/tools/index.js +0 -6
  117. package/dist/gaesup/tools/joystick/style.css.d.ts +0 -2
  118. package/dist/gaesup/tools/joystick/style.css.js +0 -33
  119. package/dist/gaesup/tools/jumpPoint/index.d.ts +0 -3
  120. package/dist/gaesup/tools/jumpPoint/index.js +0 -22
  121. package/dist/gaesup/tools/jumpPoint/style.css.d.ts +0 -2
  122. package/dist/gaesup/tools/jumpPoint/style.css.js +0 -32
  123. package/dist/gaesup/tools/keyBoardToolTip/style.css.d.ts +0 -2
  124. package/dist/gaesup/tools/keyBoardToolTip/style.css.js +0 -26
  125. package/dist/gaesup/tools/minimap/style.css.d.ts +0 -41
  126. package/dist/gaesup/tools/minimap/style.css.js +0 -215
  127. package/dist/styles/constants/boxshadow.css.d.ts +0 -9
  128. package/dist/styles/constants/boxshadow.css.js +0 -9
  129. package/dist/styles/constants/constant.css.d.ts +0 -77
  130. package/dist/styles/constants/constant.css.js +0 -79
  131. package/dist/styles/constants/direction.css.d.ts +0 -160
  132. package/dist/styles/constants/direction.css.js +0 -166
  133. package/dist/styles/constants/flex.css.d.ts +0 -61
  134. package/dist/styles/constants/flex.css.js +0 -66
  135. package/dist/styles/constants/gradient.css.d.ts +0 -8
  136. package/dist/styles/constants/gradient.css.js +0 -8
  137. package/dist/styles/constants/grid.css.d.ts +0 -55
  138. package/dist/styles/constants/grid.css.js +0 -19
  139. package/dist/styles/constants/palette.css.d.ts +0 -77
  140. package/dist/styles/constants/palette.css.js +0 -80
  141. package/dist/styles/constants/translate.css.d.ts +0 -563
  142. package/dist/styles/constants/translate.css.js +0 -131
  143. package/dist/styles/global.css.d.ts +0 -1
  144. package/dist/styles/global.css.js +0 -68
  145. package/dist/styles/index.d.ts +0 -2
  146. package/dist/styles/index.js +0 -2
  147. package/dist/styles/recipe/base.css.d.ts +0 -22
  148. package/dist/styles/recipe/base.css.js +0 -21
  149. package/dist/styles/recipe/button.css.d.ts +0 -61
  150. package/dist/styles/recipe/button.css.js +0 -107
  151. package/dist/styles/recipe/index.css.d.ts +0 -4167
  152. package/dist/styles/recipe/index.css.js +0 -110
  153. package/dist/styles/recipe/input.css.d.ts +0 -21
  154. package/dist/styles/recipe/input.css.js +0 -32
  155. package/dist/styles/sprinkles/color.css.d.ts +0 -764
  156. package/dist/styles/sprinkles/color.css.js +0 -60
  157. package/dist/styles/sprinkles/direction.css.d.ts +0 -1047
  158. package/dist/styles/sprinkles/direction.css.js +0 -35
  159. package/dist/styles/sprinkles/display.css.d.ts +0 -208
  160. package/dist/styles/sprinkles/display.css.js +0 -24
  161. package/dist/styles/sprinkles/fontSize.css.d.ts +0 -529
  162. package/dist/styles/sprinkles/fontSize.css.js +0 -31
  163. package/dist/styles/sprinkles/grid.css.d.ts +0 -462
  164. package/dist/styles/sprinkles/grid.css.js +0 -24
  165. package/dist/styles/sprinkles/index.css.d.ts +0 -368
  166. package/dist/styles/sprinkles/index.css.js +0 -11
  167. package/dist/styles/sprinkles/margin.css.d.ts +0 -2212
  168. package/dist/styles/sprinkles/margin.css.js +0 -39
  169. package/dist/styles/sprinkles/padding.css.d.ts +0 -2212
  170. package/dist/styles/sprinkles/padding.css.js +0 -39
  171. package/dist/styles/sprinkles/position.css.d.ts +0 -48
  172. package/dist/styles/sprinkles/position.css.js +0 -13
  173. package/dist/styles/sprinkles/size.css.d.ts +0 -43
  174. package/dist/styles/sprinkles/size.css.js +0 -32
  175. package/dist/styles/theme.css.d.ts +0 -62
  176. package/dist/styles/theme.css.js +0 -75
  177. /package/dist/gaesup/{tools/pushKey → hooks/usePushKey}/index.d.ts +0 -0
  178. /package/dist/gaesup/{tools/pushKey → hooks/usePushKey}/index.js +0 -0
  179. /package/dist/gaesup/tools/{gameboy → gameBoy}/type.js +0 -0
  180. /package/dist/gaesup/tools/{gamepad → gamePad}/type.js +0 -0
  181. /package/dist/gaesup/tools/{joystick → joyStick}/type.js +0 -0
  182. /package/dist/gaesup/tools/{minimap → miniMap}/default.d.ts +0 -0
  183. /package/dist/gaesup/tools/{minimap → miniMap}/default.js +0 -0
  184. /package/dist/gaesup/tools/{minimap → miniMap}/type.js +0 -0
package/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 jigglypop
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -179,22 +179,287 @@ This is the airplane control in Gaesup World. Characters can board the airplane.
179
179
 
180
180
  ---
181
181
 
182
- ## Tools
182
+ # Tools
183
183
 
184
- #### [Tools](#tools)
184
+ - 개숲월드에서 캐릭터 컨트롤을 도와주는 다양한 도구들입니다.
185
185
 
186
- #### [joystick](#joystick)
186
+ #### 1) [joystick](#joystick)
187
187
 
188
- #### [keyboardtooltip](#keyboard tooltip)
188
+ #### 2) [keyboardtooltip](#keyBoardTooltip)
189
189
 
190
190
  #### [minimap](#minimap)
191
191
 
192
192
  #### [gameboy](#gameboy)
193
193
 
194
- ## joystick
194
+ ## 1) joyStick
195
195
 
196
- ## keyboard tooltip
196
+ ### (1) Info
197
197
 
198
- ## minimap
198
+ - 가상 조이스틱 인터페이스를 제공하는 컴포넌트입니다. 모바일 환경에서 사용을 권장합니다
199
199
 
200
- ## gameboy
200
+ > 주의! 모바일에서 위치의 흔들림 때문에 `GaesupWorld` 의 옵션 `scrollBlock` 의 사용을 권장합니다.
201
+
202
+ ### (2) 특징
203
+
204
+ - **모바일 등에서 조이스틱 인터페이스 제공**: 모바일 등의 환경에서 조이스틱 인터페이스를 제공합니다
205
+ - **커스텀 외관**: 조이스틱과 그 공의 스타일링을 위한 `joyStickBallStyle` 및 `joyStickStyle` 속성을 받습니다.
206
+ - **반응형 및 상호작용**: 다양한 장치에 대응하기 위한 마우스, 모바일 터치 이벤트를 지원합니다.
207
+
208
+ ### (3) Props
209
+
210
+ - `joyStickBallStyle`: 조이스틱 공의 스타일 (`React.CSSProperties` 객체).
211
+ - `joyStickStyle`: 조이스틱 컨테이너의 스타일 (`React.CSSProperties` 객체).
212
+
213
+ ### (4) How To Use
214
+
215
+ 1. 컴포넌트 트리에 `JoyStick` 컴포넌트를 포함시킵니다.
216
+ 2. 컴포넌트는 마우스 및 터치 입력에 반응하여 이동을 제어합니다.
217
+ 3. (선택) `joyStickBallStyle` 및 `joyStickStyle`을 통해 필요한 스타일을 커스텀합니다
218
+
219
+ ### (5) Example
220
+
221
+ ```jsx
222
+ const MyComponent = () => {
223
+ // 커스텀 스타일 정의
224
+ const joyStickStyle = {
225
+ /* 여기에 조이스틱 컨테이너 스타일을 정의하세요 */
226
+ };
227
+ const joyStickBallStyle = {
228
+ /* 여기에 조이스틱 공의 스타일을 정의하세요 */
229
+ };
230
+
231
+ return (
232
+ <JoyStick
233
+ joyStickStyle={joyStickStyle}
234
+ joyStickBallStyle={joyStickBallStyle}
235
+ />
236
+ );
237
+ };
238
+ ```
239
+
240
+ ## 2) keyBoardTooltip
241
+
242
+ ### (1) 개요
243
+
244
+ - 키보드 컨트롤러 인터페이스를 시각적으로 표시하기 위해 만든 컴포넌트입니다. 키보드의 각 키와 연결된 액션을 시각적으로 나타냅니다.
245
+
246
+ ### (2) 특징
247
+
248
+ - **키 배열 시각화** : 키보드의 모든 키를 배열 형태로 시각화합니다.
249
+ - **애니메이션 상태 반영** : 현재 활성화된 키와 연관된 액션을 다른 스타일로 표시하여 사용자에게 피드백을 제공합니다.
250
+ - **커스텀 스타일링** : 키 캡의 스타일을 사용자 정의할 수 있도록 다양한 스타일링 속성을 제공합니다.
251
+
252
+ ### (3) How To Use
253
+
254
+ 1. `KeyBoardToolTip` 컴포넌트를 `GaesupWorld` 컴포넌트에 포함시킵니다.
255
+ 2. mode의 `control`는 `keyboard` 로 정의합니다.
256
+ 3. 컴포넌트는 `KeyBoardAll` 상수에 따라 키보드의 각 키를 시각화하고, 현재 활성화된 키에 대해 다른 스타일을 적용합니다.
257
+ 4. (선택) 필요한 스타일을 `keyBoardToolTipInnerStyle`, `selectedKeyCapStyle`, `notSelectedkeyCapStyle`, `keyCapStyle` 속성을 통해 전달합니다.
258
+
259
+ ### (5) Example
260
+
261
+ ```jsx
262
+ import { KeyBoardToolTip } from "./KeyBoardToolTip";
263
+ import { GaesupWorldContext } from "../../world/context";
264
+
265
+ const MyComponent = () => {
266
+ const keyBoardToolTipInnerStyle = {
267
+ /* ... */
268
+ };
269
+ const selectedKeyCapStyle = {
270
+ /* ... */
271
+ };
272
+ const notSelectedkeyCapStyle = {
273
+ /* ... */
274
+ };
275
+ const keyCapStyle = {
276
+ /* ... */
277
+ };
278
+
279
+ return (
280
+ <GaesupWorld>
281
+ {/* ... */}
282
+ <KeyBoardToolTip
283
+ keyBoardToolTipInnerStyle={keyBoardToolTipInnerStyle}
284
+ selectedKeyCapStyle={selectedKeyCapStyle}
285
+ notSelectedkeyCapStyle={notSelectedkeyCapStyle}
286
+ keyCapStyle={keyCapStyle}
287
+ />
288
+ {/* ... */}
289
+ </GaesupWorld>
290
+ );
291
+ };
292
+ ```
293
+
294
+ ## 3) minimap
295
+
296
+ ### (1) Info
297
+
298
+ - 3D 월드 내에서 사용자의 위치와 주변 환경을 작은 지도 형태로 보여주는 리액트 컴포넌트입니다. 이 컴포넌트는 `GaesupWorldContext`를 활용하여 사용자의 현재 상태와 모드에 따라 다르게 렌더링됩니다.
299
+
300
+ ### (2) 특징
301
+
302
+ - **동적 스케일 조절**: 사용자가 지도의 크기를 동적으로 조절할 수 있습니다.
303
+ - **방향 표시**: 동(East), 서(West), 남(South), 북(North) 방향을 시각적으로 표시합니다.
304
+ - **커스텀 스타일링**: 미니맵 및 그 내부 요소들의 스타일을 사용자 정의할 수 있습니다.
305
+ - **마우스 휠 지원**: 마우스 휠을 사용하여 미니맵의 스케일을 조절할 수 있습니다.
306
+
307
+ ## 사용 방법
308
+
309
+ 1. `MiniMap` 컴포넌트를 컴포넌트 트리에 포함시킵니다.
310
+ 2. 필요한 스타일을 `minimapStyle`, `innerStyle`, `textStyle`, `objectStyle`, `avatarStyle`, `scaleStyle`, `directionStyle`, `plusMinusStyle` 속성을 통해 전달합니다.
311
+ 3. 컴포넌트는 현재 사용자의 위치와 방향에 따라 미니맵을 업데이트합니다.
312
+
313
+ ### (4) Example
314
+
315
+ ```jsx
316
+ import { MiniMap } from "./MiniMap";
317
+
318
+ const MyComponent = () => {
319
+ const minimapStyle = {
320
+ /* ... */
321
+ };
322
+ const innerStyle = {
323
+ /* ... */
324
+ };
325
+ // 다른 스타일 속성들도 정의
326
+
327
+ return (
328
+ <GaesupWorld>
329
+ {/* ... */}
330
+ <MiniMap
331
+ minimapStyle={minimapStyle}
332
+ innerStyle={innerStyle}
333
+ // 다른 스타일 속성들 전달
334
+ />
335
+ {/* ... */}
336
+ </GaesupWorld>
337
+ );
338
+ };
339
+ ```
340
+
341
+ ## GameBoy
342
+
343
+ ## 개요
344
+
345
+ - GameBoy 컨트롤러 인터페이스입니다. 게임 4방향 키처럼 사용할 수 있으며, 모바일에서 사용을 권장합니다.
346
+
347
+ ## 특징
348
+
349
+ - **방향 버튼**: `GameBoyDirections` 배열을 사용하여 방향 입력 (앞으로, 뒤로, 왼쪽으로, 오른쪽으로)을 위한 버튼을 구현합니다.
350
+ - **컨텍스트 인식 렌더링**: `GaesupWorldContext`에서 `mode.controller` 값에 따라 컴포넌트를 렌더링합니다.
351
+ - **커스텀 스타일링**: 스타일링을 위한 `gameboyStyle` 및 `gameboyButtonStyle` 속성을 받습니다.
352
+
353
+ ## 사용 방법
354
+
355
+ `GameBoy` 컴포넌트를 사용하기 위해:
356
+
357
+ 1. 컴포넌트 트리에 배치합니다.
358
+ 2. 필요한 스타일을 `gameboyStyle` 및 `gameboyButtonStyle` 속성을 통해 전달합니다.
359
+ 3. 컴포넌트는 `GameBoyDirections` 배열에 기반하여 버튼을 렌더링합니다.
360
+
361
+ ## 예제 코드
362
+
363
+ ```jsx
364
+ import { GameBoy } from "./GameBoy";
365
+ import { GaesupWorldContext } from "../../world/context";
366
+
367
+ const MyComponent = () => {
368
+ // 커스텀 스타일 정의
369
+ const gameboyStyle = {
370
+ /* ... */
371
+ };
372
+ const gameboyButtonStyle = {
373
+ /* ... */
374
+ };
375
+
376
+ return (
377
+ <GameBoy
378
+ gameboyStyle={gameboyStyle}
379
+ gameboyButtonStyle={gameboyButtonStyle}
380
+ />
381
+ );
382
+ };
383
+ ```
384
+
385
+ ## GamePad
386
+
387
+ ## 개요
388
+
389
+ - 게임패드 컨트롤 인터페이스를 제공하는 커스터마이징 가능한 인터페이스입니다. 조이스틱과 GameBoy와 같은 다양한 컨트롤러 모드에 대응할 수 있는 범용성을 가지고 있습니다.
390
+
391
+ ## 특징
392
+
393
+ - **동적 버튼 렌더링**: `GaesupWorldContext`의 `control` 객체에 기반하여 버튼을 생성합니다.
394
+ - **범용적 사용**: 조이스틱 및 GameBoy와 같은 다양한 컨트롤러 모드와 호환됩니다.
395
+ - **커스텀 스타일링**: `gamePadStyle` 및 `gamePadButtonStyle` 속성을 통해 커스텀 스타일링 가능.
396
+
397
+ ## 속성 (Props)
398
+
399
+ - `gamePadStyle`: 게임패드 컨테이너의 스타일 (`React.CSSProperties` 객체).
400
+ - `gamePadButtonStyle`: 개별 버튼의 스타일 (`React.CSSProperties` 객체).
401
+ - `label`: 버튼에 대한 커스텀 라벨.
402
+
403
+ ## 사용 방법
404
+
405
+ 1. `GamePad` 컴포넌트를 컴포넌트 트리에 배치합니다.
406
+ 2. `gamePadStyle` 및 `gamePadButtonStyle`을 사용하여 외관을 커스터마이즈합니다.
407
+ 3. 컴포넌트는 컨트롤러 모드에 맞춰 적절한 버튼을 렌더링합니다.
408
+
409
+ ## 예제 코드
410
+
411
+ ```jsx
412
+ import { GamePad } from "./GamePad";
413
+ import { GaesupWorldContext } from "../../world/context";
414
+
415
+ const MyComponent = () => {
416
+ const gamePadStyle = {
417
+ /* 여기에 커스텀 스타일을 정의하세요 */
418
+ };
419
+ const gamePadButtonStyle = {
420
+ /* 여기에 버튼의 커스텀 스타일을 정의하세요 */
421
+ };
422
+
423
+ return (
424
+ <GamePad
425
+ gamePadStyle={gamePadStyle}
426
+ gamePadButtonStyle={gamePadButtonStyle}
427
+ />
428
+ );
429
+ };
430
+ ```
431
+
432
+ ## ZoomButton
433
+
434
+ ## 개요
435
+
436
+ - 특정 위치로 카메라를 이동시키기 위한 버튼이고 카메라의 zoom 컨트롤을 주로 수행합니다. target에 특정 물체를 넣을 수도 있습니다.
437
+
438
+ ## 속성 (Props)
439
+
440
+ - `position`: 카메라가 이동할 대상 위치 (`THREE.Vector3` 객체).
441
+ - `children`: (선택사항) 버튼 내에 렌더링될 React 노드.
442
+ - `target`: (선택사항) 카메라가 바라볼 대상 위치 (`THREE.Vector3` 객체).
443
+ - `keepBlocking`: (선택사항) 카메라 이동 중 블로킹 상태를 유지할지 여부.
444
+ - `zoomButtonStyle`: (선택사항) 버튼의 스타일 (`React.CSSProperties` 객체).
445
+
446
+ ## 사용 방법
447
+
448
+ 1. `ZoomButton` 컴포넌트를 원하는 위치에 배치합니다.
449
+ 2. `position` prop을 통해 카메라가 이동할 위치를 지정합니다.
450
+ 3. 버튼을 클릭하면 지정된 위치로 카메라가 이동합니다.
451
+
452
+ ## 예제 코드
453
+
454
+ ```jsx
455
+ import { ZoomButton } from "./ZoomButton";
456
+ import * as THREE from "three";
457
+
458
+ const App = () => {
459
+ return (
460
+ <ZoomButton position={new THREE.Vector3(0, 0, 5)}>
461
+ Zoom to Position
462
+ </ZoomButton>
463
+ );
464
+ };
465
+ ```
@@ -1,9 +1,11 @@
1
1
  import { V3 } from "../../utils/vector";
2
2
  export default function normal(prop) {
3
- var state = prop.state, perspectiveCamera = prop.controllerContext.perspectiveCamera, activeState = prop.worldContext.activeState;
3
+ var state = prop.state, _a = prop.worldContext, activeState = _a.activeState, cameraOption = _a.cameraOption;
4
+ if (!state || !state.camera)
5
+ return;
4
6
  var cameraPosition = activeState.position
5
7
  .clone()
6
- .add(V3(0, perspectiveCamera.YDistance, perspectiveCamera.XZDistance));
8
+ .add(V3(0, cameraOption.YDistance, cameraOption.XZDistance));
7
9
  state.camera.position.lerp(cameraPosition, 0.9);
8
10
  state.camera.lookAt(activeState.position.clone());
9
11
  }
@@ -1,2 +1,4 @@
1
1
  import { cameraPropType } from "../../physics/type";
2
+ import { activeStateType, cameraOptionType } from "../../world/context/type";
3
+ export declare const makeCameraPosition: (activeState: activeStateType, cameraOption: cameraOptionType) => import("three").Vector3;
2
4
  export default function orbit(prop: cameraPropType): void;
@@ -1,18 +1,21 @@
1
1
  import { quat } from "@react-three/rapier";
2
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))
3
+ export var makeCameraPosition = function (activeState, cameraOption) {
4
+ var XDistance = cameraOption.XDistance, YDistance = cameraOption.YDistance, ZDistance = cameraOption.ZDistance;
5
+ var cameraPosition = activeState.position.clone().add(V3(Math.sin(activeState.euler.y), 1, Math.cos(activeState.euler.y))
6
6
  .normalize()
7
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.9);
8
+ .multiply(V3(-XDistance, YDistance, -ZDistance)));
9
+ return cameraPosition;
10
+ };
11
+ export default function orbit(prop) {
12
+ var state = prop.state, _a = prop.worldContext, activeState = _a.activeState, cameraOption = _a.cameraOption;
13
+ if (!state || !state.camera)
14
+ return;
15
+ var cameraPosition = makeCameraPosition(activeState, cameraOption);
16
+ state.camera.position.lerp(cameraPosition, 1);
12
17
  state.camera.quaternion.copy(activeState.quat
13
18
  .clone()
14
- .multiply(perspectiveCamera.isFront
15
- ? quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)
16
- : quat()));
19
+ .multiply(quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)));
17
20
  state.camera.lookAt(activeState.position.clone());
18
21
  }
@@ -9,24 +9,62 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
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";
12
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
13
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
14
+ return new (P || (P = Promise))(function (resolve, reject) {
15
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
16
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
17
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
18
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
19
+ });
20
+ };
21
+ var __generator = (this && this.__generator) || function (thisArg, body) {
22
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
23
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
24
+ function verb(n) { return function (v) { return step([n, v]); }; }
25
+ function step(op) {
26
+ if (f) throw new TypeError("Generator is already executing.");
27
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
28
+ 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;
29
+ if (y = 0, t) op = [op[0] & 2, t.value];
30
+ switch (op[0]) {
31
+ case 0: case 1: t = op; break;
32
+ case 4: _.label++; return { value: op[1], done: false };
33
+ case 5: _.label++; y = op[1]; op = [0]; continue;
34
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
35
+ default:
36
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
37
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
38
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
39
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
40
+ if (t[2]) _.ops.pop();
41
+ _.trys.pop(); continue;
42
+ }
43
+ op = body.call(thisArg, _);
44
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
45
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
+ }
47
+ };
48
+ import { jsx as _jsx } from "react/jsx-runtime";
49
+ import { CameraControls } from "@react-three/drei";
14
50
  import { useFrame, useThree } from "@react-three/fiber";
15
- import { useContext, useEffect, useMemo } from "react";
51
+ import { vec3 } from "@react-three/rapier";
52
+ import { useContext, useEffect, useMemo, useRef } from "react";
16
53
  import * as THREE from "three";
17
54
  import { GaesupControllerContext } from "../controller/context";
18
55
  import { GaesupWorldContext } from "../world/context";
19
- import mapControl from "./control/map";
20
56
  import normal from "./control/normal";
21
57
  import orbit from "./control/orbit";
58
+ import detector from "./detector";
22
59
  export default function Camera(_a) {
60
+ var _this = this;
23
61
  var refs = _a.refs, prop = _a.prop, control = _a.control;
24
62
  var worldContext = useContext(GaesupWorldContext);
25
63
  var controllerContext = useContext(GaesupControllerContext);
26
- var cameraMode = controllerContext.cameraMode, perspectiveCamera = controllerContext.perspectiveCamera, orthographicCamera = controllerContext.orthographicCamera;
64
+ var mode = worldContext.mode, cameraOption = worldContext.cameraOption;
27
65
  var rigidBodyRef = refs.rigidBodyRef, outerGroupRef = refs.outerGroupRef;
28
- var scene = useThree().scene;
29
- var activeState = worldContext.activeState;
66
+ var _b = useThree(), scene = _b.scene, camera = _b.camera;
67
+ var cameraRef = useRef();
30
68
  var intersectObjectMap = useMemo(function () { return ({}); }, []);
31
69
  var cameraProp = __assign(__assign({}, prop), { control: control, controllerContext: controllerContext, worldContext: worldContext, intersectObjectMap: intersectObjectMap });
32
70
  var getMeshs = function (object) {
@@ -43,29 +81,46 @@ export default function Camera(_a) {
43
81
  useEffect(function () {
44
82
  scene.children.forEach(function (child) { return getMeshs(child); });
45
83
  }, []);
84
+ var position = useMemo(function () { return camera.position; }, []);
85
+ var dir = useMemo(function () { return vec3(); }, []);
86
+ cameraProp.cameraRay.rayCast = new THREE.Raycaster(cameraProp.cameraRay.origin, cameraProp.cameraRay.dir, 0, -cameraOption.maxDistance);
87
+ useEffect(function () {
88
+ cameraProp.cameraRay.origin.copy(position);
89
+ cameraProp.cameraRay.dir.copy(camera.getWorldDirection(dir));
90
+ }, [cameraProp]);
46
91
  useFrame(function (state, delta) {
47
92
  if (!rigidBodyRef ||
48
93
  !rigidBodyRef.current ||
49
94
  !outerGroupRef ||
50
95
  !outerGroupRef.current)
51
- return null;
52
- cameraProp.state = state;
96
+ return;
53
97
  cameraProp.delta = delta;
54
- if (cameraMode.cameraType === "perspective") {
55
- if (cameraMode.controlType === "orbit") {
98
+ cameraProp.state = state;
99
+ if (!worldContext.cameraBlock) {
100
+ if (mode.control === "orbit") {
56
101
  orbit(cameraProp);
57
102
  }
58
- else if (cameraMode.controlType === "normal") {
103
+ else if (mode.control === "normal") {
59
104
  normal(cameraProp);
60
105
  }
106
+ detector(cameraProp);
61
107
  }
62
- else if (cameraMode.cameraType === "orthographic") {
63
- mapControl(cameraProp);
64
- }
65
- // const distV3 = camera.position.clone().sub(activeState.position);
66
- // cameraRay.origin.copy(camera.position);
67
- // cameraRay.dir.copy(distV3.negate().normalize());
68
- // detector(cameraProp);
69
108
  });
70
- 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))] }))] }));
109
+ // moveTo 함수 정의
110
+ worldContext.moveTo = function (position, target) { return __awaiter(_this, void 0, void 0, function () {
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ camera.position.copy(position);
115
+ return [4 /*yield*/, Promise.all([
116
+ cameraRef.current.setPosition(position.x, position.y, position.z, true),
117
+ cameraRef.current.setLookAt(position.x, position.y, position.z, target.x, target.y, target.z, true),
118
+ ])];
119
+ case 1:
120
+ _a.sent();
121
+ return [2 /*return*/];
122
+ }
123
+ });
124
+ }); };
125
+ return _jsx(CameraControls, { ref: cameraRef });
71
126
  }
@@ -12,5 +12,5 @@ export function CharacterRef(_a) {
12
12
  var ref = playCharacterActions({
13
13
  groundRay: props.groundRay,
14
14
  }).ref;
15
- return (_jsx(WrapperRef, { props: props, refs: refs, gltf: characterGltf, animationRef: ref, children: _jsx(CharacterCapsuleCollider, { props: props, ref: refs.capsuleColliderRef }) }));
15
+ return (_jsx(WrapperRef, { props: props, refs: refs, gltf: characterGltf, animationRef: ref, name: "character", children: _jsx(CharacterCapsuleCollider, { props: props, ref: refs.capsuleColliderRef }) }));
16
16
  }
@@ -3,6 +3,7 @@ import { ReactNode } from "react";
3
3
  import { controllerInnerType } from "../../../controller/type";
4
4
  export declare const RigidBodyRef: import("react").ForwardRefExoticComponent<{
5
5
  children: ReactNode;
6
+ name?: string;
6
7
  } & import("react").RefAttributes<RapierRigidBody>>;
7
8
  export declare const PassiveRigidBodyRef: import("react").ForwardRefExoticComponent<{
8
9
  props: controllerInnerType;
@@ -13,8 +13,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { RigidBody } from "@react-three/rapier";
14
14
  import { forwardRef } from "react";
15
15
  export var RigidBodyRef = forwardRef(function (_a, ref) {
16
- var children = _a.children;
17
- return (_jsx(RigidBody, { colliders: false, ref: ref, children: children }));
16
+ var children = _a.children, name = _a.name;
17
+ return (_jsx(RigidBody, { colliders: false, ref: ref, name: name, children: children }));
18
18
  });
19
19
  export var PassiveRigidBodyRef = forwardRef(function (_a, ref) {
20
20
  var props = _a.props, children = _a.children;
@@ -2,11 +2,12 @@ import { ReactNode, Ref } from "react";
2
2
  import * as THREE from "three";
3
3
  import { controllerInnerType, refsType } from "../../../controller/type";
4
4
  import { GLTFResult } from "../../type";
5
- export declare function WrapperRef({ children, outerChildren, props, refs, gltf, animationRef, }: {
5
+ export declare function WrapperRef({ children, outerChildren, props, refs, gltf, animationRef, name, }: {
6
6
  children: ReactNode;
7
7
  outerChildren?: ReactNode;
8
8
  props: controllerInnerType;
9
9
  refs: refsType;
10
10
  gltf: GLTFResult;
11
11
  animationRef?: Ref<THREE.Object3D<THREE.Object3DEventMap>>;
12
+ name?: string;
12
13
  }): import("react/jsx-runtime").JSX.Element;
@@ -4,6 +4,6 @@ import { OuterGroupRef } from "../common/OuterGroupRef";
4
4
  import { SlopeRayRef } from "../common/slopeRayRef";
5
5
  import { RigidBodyRef } from "./RigidbodyRef";
6
6
  export function WrapperRef(_a) {
7
- var children = _a.children, outerChildren = _a.outerChildren, props = _a.props, refs = _a.refs, gltf = _a.gltf, animationRef = _a.animationRef;
8
- return (_jsxs(OuterGroupRef, { ref: refs.outerGroupRef, props: props, children: [_jsxs(RigidBodyRef, { ref: refs.rigidBodyRef, children: [_jsx(SlopeRayRef, { slopeRay: props.slopeRay, groundRay: props.groundRay, ref: refs.slopeRayOriginRef }), children, props.children, _jsx(InnerGroupRef, { props: props, gltf: gltf, ref: refs.innerGroupRef, animationRef: animationRef })] }), outerChildren] }));
7
+ var children = _a.children, outerChildren = _a.outerChildren, props = _a.props, refs = _a.refs, gltf = _a.gltf, animationRef = _a.animationRef, name = _a.name;
8
+ return (_jsxs(OuterGroupRef, { ref: refs.outerGroupRef, props: props, children: [_jsxs(RigidBodyRef, { ref: refs.rigidBodyRef, name: name, children: [_jsx(SlopeRayRef, { slopeRay: props.slopeRay, groundRay: props.groundRay, ref: refs.slopeRayOriginRef }), children, props.children, _jsx(InnerGroupRef, { props: props, gltf: gltf, ref: refs.innerGroupRef, animationRef: animationRef })] }), outerChildren] }));
9
9
  }
@@ -1,9 +1,9 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { CuboidCollider } from "@react-three/rapier";
3
3
  import { forwardRef, useContext } from "react";
4
4
  import { GaesupWorldContext } from "../../../world/context";
5
5
  export var VehicleCollider = forwardRef(function (_, ref) {
6
6
  var _a = useContext(GaesupWorldContext), collider = _a.vehicleCollider, url = _a.url;
7
7
  var vehicleSizeX = collider.vehicleSizeX, vehicleSizeY = collider.vehicleSizeY, vehicleSizeZ = collider.vehicleSizeZ;
8
- return (_jsx(CuboidCollider, { ref: ref, args: [vehicleSizeX / 2, vehicleSizeY / 2, vehicleSizeZ / 2], position: [0, vehicleSizeY + url.wheelUrl ? collider.wheelSizeY : 0, 0] }));
8
+ return (_jsx(_Fragment, { children: url.wheelUrl ? (_jsx(CuboidCollider, { ref: ref, args: [vehicleSizeX / 2, vehicleSizeY / 2, vehicleSizeZ / 2], position: [0, vehicleSizeY + collider.wheelSizeY / 2, 0] })) : (_jsx(CuboidCollider, { ref: ref, args: [vehicleSizeX / 2, vehicleSizeY / 2, vehicleSizeZ / 2], position: [0, vehicleSizeY, 0] })) }));
9
9
  });
@@ -4,7 +4,7 @@ import { CylinderCollider, RigidBody, useRevoluteJoint, } from "@react-three/rap
4
4
  import { forwardRef, useContext, useRef } from "react";
5
5
  import { GaesupWorldContext } from "../../../world/context";
6
6
  export var WheelRegidBodyRef = forwardRef(function (_a, ref) {
7
- var index = _a.index, wheelPosition = _a.wheelPosition, bodyRef = _a.bodyRef, wheel = _a.wheel, bodyAnchor = _a.bodyAnchor, wheelAnchor = _a.wheelAnchor, rotationAxis = _a.rotationAxis;
7
+ var bodyRef = _a.bodyRef, wheel = _a.wheel, bodyAnchor = _a.bodyAnchor, wheelAnchor = _a.wheelAnchor, rotationAxis = _a.rotationAxis;
8
8
  var _b = useContext(GaesupWorldContext), collider = _b.vehicleCollider, url = _b.url;
9
9
  var wheelSizeX = collider.wheelSizeX, wheelSizeY = collider.wheelSizeY;
10
10
  useRevoluteJoint(bodyRef, wheel, [bodyAnchor, wheelAnchor, rotationAxis]);
@@ -7,7 +7,7 @@ import { CharacterRef } from "./active/character";
7
7
  import { VehicleRef } from "./active/vehicle";
8
8
  export function GaesupComponent(_a) {
9
9
  var props = _a.props, refs = _a.refs;
10
- var mode = useContext(GaesupWorldContext).mode;
10
+ var _b = useContext(GaesupWorldContext), mode = _b.mode, activeState = _b.activeState;
11
11
  calculation(props);
12
12
  return (_jsxs(_Fragment, { children: [mode.type === "character" && _jsx(CharacterRef, { props: props, refs: refs }), mode.type === "vehicle" && _jsx(VehicleRef, { props: props, refs: refs }), mode.type === "airplane" && _jsx(AirplaneRef, { props: props, refs: refs })] }));
13
13
  }
@@ -27,9 +27,11 @@ export function PassiveAirplane(props) {
27
27
  }, [props]), position = _a.position, euler = _a.euler, currentAnimation = _a.currentAnimation, airplaneUrl = _a.airplaneUrl;
28
28
  useFrame(function () {
29
29
  if (innerGroupRef && innerGroupRef.current) {
30
+ var _euler = euler.clone();
31
+ _euler.y = 0;
30
32
  innerGroupRef.current.setRotationFromQuaternion(quat()
31
33
  .setFromEuler(innerGroupRef.current.rotation.clone())
32
- .slerp(quat().setFromEuler(euler), 0.1));
34
+ .slerp(quat().setFromEuler(_euler), 0.2));
33
35
  }
34
36
  if (rigidBodyRef && rigidBodyRef.current) {
35
37
  rigidBodyRef.current.setGravityScale(props.gravity, false);
@@ -3,5 +3,8 @@ import { RigidBody } from "@react-three/rapier";
3
3
  import { forwardRef } from "react";
4
4
  export var RigidBodyRef = forwardRef(function (_a, ref) {
5
5
  var children = _a.children, position = _a.position, rotation = _a.rotation;
6
- return (_jsx(RigidBody, { colliders: false, ref: ref, position: position, rotation: rotation, userData: { intangible: true }, children: children }));
6
+ var _euler = rotation.clone();
7
+ _euler.x = 0;
8
+ _euler.z = 0;
9
+ return (_jsx(RigidBody, { colliders: false, ref: ref, position: position, rotation: _euler, userData: { intangible: true }, children: children }));
7
10
  });
@@ -1,28 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { dispatchType } from "../../utils/type";
3
- import { gaesupControllerType, orthographicCameraType, perspectiveCameraType } from "./type";
3
+ import { gaesupControllerType } from "./type";
4
4
  export declare const gaesupControllerDefault: {
5
- cameraMode: perspectiveCameraType | orthographicCameraType;
6
- cameraOption: {
7
- offset: import("three").Vector3;
8
- initDistance: number;
9
- maxDistance: number;
10
- minDistance: number;
11
- initDir: number;
12
- collisionOff: number;
13
- distance: number;
14
- camFollow: number;
15
- };
16
- perspectiveCamera: {
17
- isFront: boolean;
18
- XZDistance: number;
19
- YDistance: number;
20
- };
21
- orthographicCamera: {
22
- zoom: number;
23
- near: number;
24
- far: number;
25
- };
26
5
  airplane: {
27
6
  angleDelta: import("three").Vector3;
28
7
  maxAngle: import("three").Vector3;