gaesup-world 0.1.0 → 0.1.1

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 (2) hide show
  1. package/README.md +226 -136
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -109,13 +109,19 @@ This project is distributed under the MIT License.
109
109
 
110
110
  ---
111
111
 
112
- ## Controller
112
+ ### Index
113
113
 
114
- #### [Controller](#controller)
114
+ - Player Type
115
115
 
116
- - [Character](#character)
117
- - [Vehicle](#vehicle)
118
- - [Airplane](#airplane)
116
+ - Character
117
+ - Vehicle
118
+ - Airplane
119
+
120
+ - Animation
121
+
122
+ ## Player Type
123
+
124
+ ---
119
125
 
120
126
  ## Character
121
127
 
@@ -123,11 +129,10 @@ This is the character control in Gaesup World.
123
129
 
124
130
  - Possible Camera Types
125
131
 
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. |
132
+ | Name | Control | Info |
133
+ | ------ | ------------- | --------------------------------------------------------------------------------------------- |
134
+ | Normal | Orbit Control | Positioned parallel to the Z-axis from the character's location and not affected by rotation. |
135
+ | Orbit | Orbit Control | Moves with the character and rotates according to the character's direction. |
131
136
 
132
137
  - Controller Tools
133
138
 
@@ -141,13 +146,11 @@ This is the character control in Gaesup World.
141
146
 
142
147
  This is the vehicle control in Gaesup World. Characters can board the vehicle.
143
148
 
144
- - Possible Camera Types
149
+ - Possible Camera Types (only orbit type available)
145
150
 
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
+ | Name | Control | Info |
152
+ | ----- | ------------- | ---------------------------------------------------------------------------- |
153
+ | Orbit | Orbit Control | Moves with the character and rotates according to the character's direction. |
151
154
 
152
155
  - Controller Tools
153
156
 
@@ -161,13 +164,11 @@ This is the vehicle control in Gaesup World. Characters can board the vehicle.
161
164
 
162
165
  This is the airplane control in Gaesup World. Characters can board the airplane.
163
166
 
164
- - Possible Camera Types
167
+ - Possible Camera Types (only orbit type available)
165
168
 
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. |
169
+ | Name | Control | Info |
170
+ | ----- | ------------- | ---------------------------------------------------------------------------- |
171
+ | Orbit | Orbit Control | Moves with the character and rotates according to the character's direction. |
171
172
 
172
173
  - Controller Tools
173
174
 
@@ -179,88 +180,183 @@ This is the airplane control in Gaesup World. Characters can board the airplane.
179
180
 
180
181
  ---
181
182
 
182
- # Tools
183
+ # Animation
183
184
 
184
- - 개숲월드에서 캐릭터 컨트롤을 도와주는 다양한 도구들입니다.
185
+ - Animation refers to the method of controlling animations for characters and other elements in the Gaesup World.
185
186
 
186
- #### 1) [joystick](#joystick)
187
+ # Rideable
187
188
 
188
- #### 2) [keyboardtooltip](#keyBoardTooltip)
189
+ - Rideable objects are objects that can be ridden. They detect collisions and allow the character to board when contact is made. Currently, two types of objects, 'vehicle' and 'airplane', can be ridden.
189
190
 
190
- #### [minimap](#minimap)
191
+ ![Rideable](https://jiggloghttps.s3.ap-northeast-2.amazonaws.com/images/rideable.gif)
191
192
 
192
- #### [gameboy](#gameboy)
193
+ ### (1) Example
194
+
195
+ ```tsx
196
+ export default function App() {
197
+ // Define URLs
198
+ const CHARACTER_URL = S3 + "/gaesup.glb";
199
+ const AIRPLANE_URL = S3 + "/air.glb";
200
+ const VEHICLE_URL = S3 + "/kart.glb";
201
+ const WHEEL_URL = S3 + "/wheel.glb";
202
+
203
+ return (
204
+ <GaesupWorld
205
+ // ...props defined here
206
+ >
207
+ <Canvas
208
+ // ...props defined here
209
+ >
210
+ <Physics>
211
+ <GaesupController />
212
+
213
+ {/* Import Rideable component inside and pass the arguments as shown below */}
214
+ <Rideable
215
+ objectkey="1"
216
+ objectType="vehicle"
217
+ isRiderOn={true}
218
+ url={VEHICLE_URL}
219
+ wheelUrl={WHEEL_URL}
220
+ offset={V3(0, 0.5, 0)}
221
+ position={V3(-10, 5, 10)}
222
+ />
223
+ <Rideable
224
+ objectkey="2"
225
+ objectType="vehicle"
226
+ isRiderOn={false}
227
+ url={VEHICLE_URL}
228
+ wheelUrl={WHEEL_URL}
229
+ position={V3(-20, 5, 10)}
230
+ />
231
+ <Rideable
232
+ objectkey="3"
233
+ objectType="airplane"
234
+ isRiderOn={true}
235
+ url={AIRPLANE_URL}
236
+ offset={V3(0, 0.5, 0)}
237
+ position={V3(10, 5, 10)}
238
+ />
239
+ <Rideable
240
+ objectkey="4"
241
+ objectType="airplane"
242
+ isRiderOn={false}
243
+ url={AIRPLANE_URL}
244
+ position={V3(20, 5, 10)}
245
+ />
246
+ </Physics>
247
+ </Canvas>
248
+ </GaesupWorld>
249
+ );
250
+ }
251
+ ```
252
+
253
+ ### 2) Precautions
254
+
255
+ - The `objectkey` must be unique.
256
+
257
+ ### 3) Props
258
+
259
+ | Prop Name | Type | Required | Description | Default Value |
260
+ | -------------- | ----------------------- | -------- | ----------------------------------------------- | -------------- |
261
+ | `objectkey` | string | Required | Unique identifier for the rideable object | None |
262
+ | `objectType` | "vehicle" or "airplane" | Optional | Type of the rideable object | `undefined` |
263
+ | `isRiderOn` | boolean | Optional | Whether a rider is on the rideable object | `false` |
264
+ | `url` | string | Optional | 3D model URL for the rideable object | `null` |
265
+ | `wheelUrl` | string | Optional | Wheel model URL for "vehicle" type rideables | `null` |
266
+ | `position` | THREE.Vector3 | Optional | Initial position of the rideable object | `(0, 0, 0)` |
267
+ | `rotation` | THREE.Euler | Optional | Initial rotation angle of the rideable object | `(0, 0, 0)` |
268
+ | `offset` | THREE.Vector3 | Optional | Initial position offset for the rideable object | `(0, 0, 0)` |
269
+ | `visible` | boolean | Optional | Visibility of the rideable object | `true` |
270
+ | `vehicleSize` | THREE.Vector3 | Optional | Size of the "vehicle" type rideable object | Rapier default |
271
+ | `wheelSize` | THREE.Vector3 | Optional | Size of the wheel for "vehicle" type rideables | Rapier default |
272
+ | `airplaneSize` | THREE.Vector3 | Optional | Size of the "airplane" type rideable object | Rapier default |
273
+
274
+ ### 4) Features
193
275
 
194
- 1. JoyStick
276
+ 1. **Support for Various Rideable Objects:** The Rideable component can render a variety of rideable objects, including "vehicle" and "airplane" types. It can render the 3D models of each object and allow interactions with them.
277
+ 2. **Customizable Properties:** You can easily configure the initial state, size, model URLs, visibility, and more of rideable objects using component properties.
278
+ 3. **Interaction with Riders:** The Rideable component supports interactions required for a rider to board and move with rideable objects.
195
279
 
196
- - This component provides a virtual joystick interface. It is recommended for use in mobile environments.
280
+ ### Advantages:
197
281
 
198
- > Caution! Due to position fluctuation in mobile environments, it is recommended to use the scrollBlock option of GaesupWorld.
282
+ 1. **Modularity and Reusability:** The Rideable component is modular and can be easily integrated with other components, increasing code reusability and facilitating maintenance.
283
+ 2. **Rapid Development:** By using the `useRideable` hook, which manages the physics engine and rideable object management, developers can quickly implement and render rideable objects, reducing development time.
284
+ 3. **Real-time Interaction:** Leveraging the Rapier physics engine allows for real-time handling of rideable object movements and collision checks, providing a high level of interaction in games or simulations.
285
+ 4. **Flexible Customization:** You can customize the appearance and behavior of each rideable object using properties, making it suitable for various game or simulation environments.
199
286
 
200
- ### (2) Features
287
+ # Tools
288
+
289
+ - 개숲월드에서 캐릭터 컨트롤을 도와주는 다양한 도구들입니다.
290
+
291
+ #### 1) [joystick](#1. joyStick)
201
292
 
202
- Joystick Interface for Mobile and Other Environments: Provides a joystick interface in environments like mobile.
203
- Custom Appearance: Receives joyStickBallStyle and joyStickStyle properties for styling the joystick and its ball.
204
- Responsive and Interactive: Supports mouse and mobile touch events to cater to various devices.
293
+ #### 2) [keyboardtooltip](#keyBoardTooltip)
294
+
295
+ #### [minimap](#minimap)
205
296
 
206
- ### (3) Props
297
+ #### [gameboy](#gameboy)
207
298
 
208
- joyStickBallStyle: Style of the joystick ball (React.CSSProperties object).
209
- joyStickStyle: Style of the joystick container (React.CSSProperties object).
299
+ ## 1. JoyStick
210
300
 
211
- ### (4) How To Use
301
+ The JoyStick component provides a virtual joystick interface, primarily intended for mobile environments. This component allows you to simulate joystick-like input on mobile devices. Additionally, you can prevent position jitter, which can occur on mobile devices, by using the `scrollBlock` option in the `GaesupWorld` component.
212
302
 
213
- - Include the JoyStick component in your `GaesupWorld` component tree.
303
+ ### Key Features:
214
304
 
215
- > It is imperative to use it inside the GaesupWorld component
305
+ - **Joystick Interface:** Provides a joystick-like user input interface, suitable for mobile devices.
306
+ - **Customization:** You can customize the style of the JoyStick component by adjusting the styles of the joystick and the joystick ball using the `joyStickBallStyle` and `joyStickStyle` properties.
307
+ - **Responsive and Interactive:** It supports various input devices and responds to both mouse and mobile touch events for controlling movement.
216
308
 
217
- - The component responds to mouse and touch inputs to control movement.
309
+ ### Props:
218
310
 
219
- - (Optional) Customize the necessary style using joyStickBallStyle and joyStickStyle.
311
+ - `joyStickBallStyle`: Style of the joystick ball.
220
312
 
221
313
  ### (5) Example
222
314
 
223
315
  ```jsx
224
316
  const MyComponent = () => {
225
- // 커스텀 스타일 정의
226
317
  const joyStickStyle = {
227
- /* 여기에 조이스틱 컨테이너 스타일을 정의하세요 */
318
+ /* joyStickStyle */
228
319
  };
229
320
  const joyStickBallStyle = {
230
- /* 여기에 조이스틱 공의 스타일을 정의하세요 */
321
+ /* joyStickBallStyle */
231
322
  };
232
323
 
233
324
  return (
234
- <JoyStick
235
- joyStickStyle={joyStickStyle}
236
- joyStickBallStyle={joyStickBallStyle}
237
- />
325
+ <GaesupWorld>
326
+ {/* ... */}
327
+ <JoyStick
328
+ joyStickStyle={joyStickStyle}
329
+ joyStickBallStyle={joyStickBallStyle}
330
+ />
331
+ {/* ... */}
332
+ </GaesupWorld>
238
333
  );
239
334
  };
240
335
  ```
241
336
 
242
- ## 2) keyBoardTooltip
337
+ ##
243
338
 
244
- ### (1) 개요
339
+ ## 2. KeyBoardToolTip (키보드 툴팁)
245
340
 
246
- - 키보드 컨트롤러 인터페이스를 시각적으로 표시하기 위해 만든 컴포넌트입니다. 키보드의 각 키와 연결된 액션을 시각적으로 나타냅니다.
341
+ The KeyBoardToolTip component is designed to visually represent a keyboard controller interface, providing a visual representation of each key and its associated action.
247
342
 
248
- ### (2) 특징
343
+ ### Key Features:
249
344
 
250
- - **키 배열 시각화** : 키보드의 모든 키를 배열 형태로 시각화합니다.
251
- - **애니메이션 상태 반영** : 현재 활성화된 키와 연관된 액션을 다른 스타일로 표시하여 사용자에게 피드백을 제공합니다.
252
- - **커스텀 스타일링** : 키 캡의 스타일을 사용자 정의할 수 있도록 다양한 스타일링 속성을 제공합니다.
345
+ - **Visualizing Keyboard Keys:** Visualizes all keyboard keys in an array format.
346
+ - **State Animation:** Reflects the currently active keys and their associated actions by displaying them differently to provide user feedback.
347
+ - **Custom Styling:** Provides various styling properties for customizing key caps' appearance.
253
348
 
254
- ### (3) How To Use
349
+ ### How to Use:
255
350
 
256
- 1. `KeyBoardToolTip` 컴포넌트를 `GaesupWorld` 컴포넌트에 포함시킵니다.
257
- 2. mode의 `control`는 `keyboard` 로 정의합니다.
258
- 3. 컴포넌트는 `KeyBoardAll` 상수에 따라 키보드의 각 키를 시각화하고, 현재 활성화된 키에 대해 다른 스타일을 적용합니다.
259
- 4. (선택) 필요한 스타일을 `keyBoardToolTipInnerStyle`, `selectedKeyCapStyle`, `notSelectedkeyCapStyle`, `keyCapStyle` 속성을 통해 전달합니다.
351
+ 1. Include the `KeyBoardToolTip` component within the `GaesupWorld` component.
352
+ 2. Define the `control` mode as "keyboard" in the `mode` property.
353
+ 3. The component visualizes each keyboard key based on the `KeyBoardAll` constant and applies different styles for currently active keys.
354
+ 4. (Optional) Customize the styles using the `keyBoardToolTipInnerStyle`, `selectedKeyCapStyle`, `notSelectedkeyCapStyle`, and `keyCapStyle` properties.
260
355
 
261
- ### (5) Example
356
+ ### Example:
262
357
 
263
- ```jsx
358
+ ```
359
+ jsxCopy code
264
360
  import { KeyBoardToolTip } from "./KeyBoardToolTip";
265
361
  import { GaesupWorldContext } from "../../world/context";
266
362
 
@@ -293,28 +389,26 @@ const MyComponent = () => {
293
389
  };
294
390
  ```
295
391
 
296
- ## 3) minimap
392
+ ## 3. MiniMap
297
393
 
298
- ### (1) Info
394
+ The MiniMap component is used to display a small map of the user's location and the surrounding environment within a 3D world.
299
395
 
300
- - 3D 월드 내에서 사용자의 위치와 주변 환경을 작은 지도 형태로 보여주는 리액트 컴포넌트입니다. 이 컴포넌트는 `GaesupWorldContext`를 활용하여 사용자의 현재 상태와 모드에 따라 다르게 렌더링됩니다.
396
+ ### Key Features:
301
397
 
302
- ### (2) 특징
398
+ - **Dynamic Scaling:** Allows users to dynamically adjust the size of the map.
399
+ - **Direction Indicators:** Visualizes directions such as East, West, South, and North.
400
+ - **Custom Styling:** Allows customization of the MiniMap and its internal elements.
401
+ - **Mouse Wheel Support:** Supports adjusting the map's scale using the mouse wheel.
303
402
 
304
- - **동적 스케일 조절**: 사용자가 지도의 크기를 동적으로 조절할 수 있습니다.
305
- - **방향 표시**: 동(East), 서(West), 남(South), 북(North) 방향을 시각적으로 표시합니다.
306
- - **커스텀 스타일링**: 미니맵 및 그 내부 요소들의 스타일을 사용자 정의할 수 있습니다.
307
- - **마우스 휠 지원**: 마우스 휠을 사용하여 미니맵의 스케일을 조절할 수 있습니다.
403
+ ### How to Use:
308
404
 
309
- ### (3) 사용 방법
405
+ 1. Include the `MiniMap` component within your component tree.
406
+ 2. Customize the appearance using the `minimapStyle`, `innerStyle`, `textStyle`, `objectStyle`, `avatarStyle`, `scaleStyle`, `directionStyle`, and `plusMinusStyle` properties as needed.
407
+ 3. The component updates the MiniMap based on the user's current position and direction.
310
408
 
311
- 1. `MiniMap` 컴포넌트를 컴포넌트 트리에 포함시킵니다.
312
- 2. 필요한 스타일을 `minimapStyle`, `innerStyle`, `textStyle`, `objectStyle`, `avatarStyle`, `scaleStyle`, `directionStyle`, `plusMinusStyle` 속성을 통해 전달합니다.
313
- 3. 컴포넌트는 현재 사용자의 위치와 방향에 따라 미니맵을 업데이트합니다.
409
+ ### Example:
314
410
 
315
- ### (4) Example
316
-
317
- ```jsx
411
+ ```tsx
318
412
  import { MiniMap } from "./MiniMap";
319
413
 
320
414
  const MyComponent = () => {
@@ -324,7 +418,7 @@ const MyComponent = () => {
324
418
  const innerStyle = {
325
419
  /* ... */
326
420
  };
327
- // 다른 스타일 속성들도 정의
421
+ // Define other style properties as needed
328
422
 
329
423
  return (
330
424
  <GaesupWorld>
@@ -332,7 +426,7 @@ const MyComponent = () => {
332
426
  <MiniMap
333
427
  minimapStyle={minimapStyle}
334
428
  innerStyle={innerStyle}
335
- // 다른 스타일 속성들 전달
429
+ // Pass other style properties as needed
336
430
  />
337
431
  {/* ... */}
338
432
  </GaesupWorld>
@@ -340,34 +434,32 @@ const MyComponent = () => {
340
434
  };
341
435
  ```
342
436
 
343
- ## GameBoy
344
-
345
- ## 개요
437
+ ## 4. GameBoy
346
438
 
347
- - GameBoy 컨트롤러 인터페이스입니다. 게임 4방향 키처럼 사용할 수 있으며, 모바일에서 사용을 권장합니다.
439
+ - The GameBoy component is a controller interface that emulates GameBoy-like directional buttons. It is primarily intended for mobile usage.
348
440
 
349
- ## 특징
441
+ ### Key Features:
350
442
 
351
- - **방향 버튼**: `GameBoyDirections` 배열을 사용하여 방향 입력 (앞으로, 뒤로, 왼쪽으로, 오른쪽으로)을 위한 버튼을 구현합니다.
352
- - **컨텍스트 인식 렌더링**: `GaesupWorldContext`에서 `mode.controller` 값에 따라 컴포넌트를 렌더링합니다.
353
- - **커스텀 스타일링**: 스타일링을 위한 `gameboyStyle` 및 `gameboyButtonStyle` 속성을 받습니다.
443
+ - **Direction Buttons:** Implements buttons for directional input (forward, backward, left, right) based on the `GameBoyDirections` array.
444
+ - **Context-aware Rendering:** Renders the component based on the `mode.controller` value from the `GaesupWorldContext`.
445
+ - **Custom Styling:** Provides `gameboyStyle` and `gameboyButtonStyle` properties for styling customization.
354
446
 
355
- ## 사용 방법
447
+ ### How to Use:
356
448
 
357
- `GameBoy` 컴포넌트를 사용하기 위해:
449
+ To use the `GameBoy` component:
358
450
 
359
- 1. 컴포넌트 트리에 배치합니다.
360
- 2. 필요한 스타일을 `gameboyStyle` 및 `gameboyButtonStyle` 속성을 통해 전달합니다.
361
- 3. 컴포넌트는 `GameBoyDirections` 배열에 기반하여 버튼을 렌더링합니다.
451
+ 1. Place the `GameBoy` component within your component tree.
452
+ 2. Customize the appearance by defining styles in the `gameboyStyle` and `gameboyButtonStyle` properties.
453
+ 3. The component renders buttons based on the `GameBoyDirections` array.
362
454
 
363
- ## 예제 코드
455
+ ### Example:
364
456
 
365
- ```jsx
457
+ ```tsx
366
458
  import { GameBoy } from "./GameBoy";
367
459
  import { GaesupWorldContext } from "../../world/context";
368
460
 
369
461
  const MyComponent = () => {
370
- // 커스텀 스타일 정의
462
+ // Define custom styles
371
463
  const gameboyStyle = {
372
464
  /* ... */
373
465
  };
@@ -384,42 +476,41 @@ const MyComponent = () => {
384
476
  };
385
477
  ```
386
478
 
387
- ## GamePad
479
+ ## 5. GamePad
388
480
 
389
- ## 개요
481
+ - The GamePad component provides a customizable controller interface that supports various controller modes, such as joysticks and GameBoys, making it versatile for different input scenarios.
390
482
 
391
- - 게임패드 컨트롤 인터페이스를 제공하는 커스터마이징 가능한 인터페이스입니다. 조이스틱과 GameBoy와 같은 다양한 컨트롤러 모드에 대응할 수 있는 범용성을 가지고 있습니다.
483
+ ### Key Features:
392
484
 
393
- ## 특징
485
+ - **Dynamic Button Rendering:** Dynamically generates buttons based on the `control` object in the `GaesupWorldContext`.
486
+ - **Universal Usage:** Compatible with various controller modes like joysticks and GameBoys.
487
+ - **Custom Styling:** Allows customization of the GamePad's appearance using the `gamePadStyle` and `gamePadButtonStyle` properties.
394
488
 
395
- - **동적 버튼 렌더링**: `GaesupWorldContext`의 `control` 객체에 기반하여 버튼을 생성합니다.
396
- - **범용적 사용**: 조이스틱 및 GameBoy와 같은 다양한 컨트롤러 모드와 호환됩니다.
397
- - **커스텀 스타일링**: `gamePadStyle` 및 `gamePadButtonStyle` 속성을 통해 커스텀 스타일링 가능.
489
+ ### Props:
398
490
 
399
- ## 속성 (Props)
491
+ - `gamePadStyle`: Style of the GamePad container (`React.CSSProperties` object).
492
+ - `gamePadButtonStyle`: Style of individual buttons (`React.CSSProperties` object).
493
+ - `label`: Custom label for the buttons.
400
494
 
401
- - `gamePadStyle`: 게임패드 컨테이너의 스타일 (`React.CSSProperties` 객체).
402
- - `gamePadButtonStyle`: 개별 버튼의 스타일 (`React.CSSProperties` 객체).
403
- - `label`: 버튼에 대한 커스텀 라벨.
495
+ ### How to Use:
404
496
 
405
- ## 사용 방법
497
+ 1. Include the `GamePad` component within your component tree.
498
+ 2. Customize the appearance using the `gamePadStyle` and `gamePadButtonStyle` properties.
499
+ 3. The component dynamically renders buttons based on the `control` mode.
406
500
 
407
- 1. `GamePad` 컴포넌트를 컴포넌트 트리에 배치합니다.
408
- 2. `gamePadStyle` 및 `gamePadButtonStyle`을 사용하여 외관을 커스터마이즈합니다.
409
- 3. 컴포넌트는 컨트롤러 모드에 맞춰 적절한 버튼을 렌더링합니다.
410
-
411
- ## 예제 코드
501
+ ### Example:
412
502
 
413
503
  ```tsx
504
+ jsxCopy code
414
505
  import { GamePad } from "./GamePad";
415
506
  import { GaesupWorldContext } from "../../world/context";
416
507
 
417
508
  const MyComponent = () => {
418
509
  const gamePadStyle = {
419
- /* 여기에 커스텀 스타일을 정의하세요 */
510
+ /* Define custom styles here */
420
511
  };
421
512
  const gamePadButtonStyle = {
422
- /* 여기에 버튼의 커스텀 스타일을 정의하세요 */
513
+ /* Define button styles here */
423
514
  };
424
515
 
425
516
  return (
@@ -431,39 +522,38 @@ const MyComponent = () => {
431
522
  };
432
523
  ```
433
524
 
434
- ## ZoomButton
435
-
436
- ## 개요
525
+ ## 6. ZoomButton
437
526
 
438
- - 특정 위치로 카메라를 이동시키기 위한 버튼이고 카메라의 zoom 컨트롤을 주로 수행합니다. target에 특정 물체를 넣을 수도 있습니다.
527
+ The ZoomButton component is used to move the camera to a specific location and control the camera's zoom, primarily used for zooming to a target.
439
528
 
440
- ## 속성 (Props)
529
+ ### Key Features:
441
530
 
442
- - `position`: 카메라가 이동할 대상 위치 (`THREE.Vector3` 객체).
443
- - `children`: (선택사항) 버튼 내에 렌더링될 React 노드.
444
- - `target`: (선택사항) 카메라가 바라볼 대상 위치 (`THREE.Vector3` 객체).
445
- - `keepBlocking`: (선택사항) 카메라 이동 중 블로킹 상태를 유지할지 여부.
446
- - `zoomButtonStyle`: (선택사항) 버튼의 스타일 (`React.CSSProperties` 객체).
531
+ - `position`: The target position where the camera will move to (`THREE.Vector3` object).
532
+ - `children`: (Optional) React nodes to render within the button.
533
+ - `target`: (Optional) The target position the camera will look at (`THREE.Vector3` object).
534
+ - `keepBlocking`: (Optional) Determines whether to keep the blocking state while the camera is moving.
535
+ - `zoomButtonStyle`: (Optional) Style for the button (`React.CSSProperties` object).
447
536
 
448
- ## 사용 방법
537
+ ### How to Use:
449
538
 
450
- 1. `ZoomButton` 컴포넌트를 원하는 위치에 배치합니다.
451
- 2. `position` prop을 통해 카메라가 이동할 위치를 지정합니다.
452
- 3. 버튼을 클릭하면 지정된 위치로 카메라가 이동합니다.
539
+ 1. Place the `ZoomButton` component in your component tree at the desired location.
540
+ 2. Define the `position` prop to specify the location the camera should move to.
541
+ 3. When the button is clicked, the camera will move to the specified position.
453
542
 
454
- ## 예제 코드
543
+ ### Example:
455
544
 
456
545
  ```tsx
546
+ jsxCopy code
457
547
  import { ZoomButton } from "./ZoomButton";
458
548
  import * as THREE from "three";
459
549
 
460
550
  const App = () => {
461
551
  return (
462
- <GaesupWorld>
463
- {/* ... */}
464
- <ZoomButton position={new THREE.Vector3(0, 0, 5)}>{children}</ZoomButton>
465
- {/* ... */}
466
- </GaesupWorld>
552
+ <ZoomButton position={new THREE.Vector3(0, 0, 5)}>
553
+ Zoom to Position
554
+ </ZoomButton>
467
555
  );
468
556
  };
469
557
  ```
558
+
559
+ ##
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",