gaesup-world 0.0.68 → 0.0.651

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 (166) hide show
  1. package/README.md +2 -59
  2. package/dist/gaesup/controller/index.d.ts +1 -1
  3. package/dist/gaesup/controller/index.js +2 -1
  4. package/dist/gaesup/gaesupProps/index.d.ts +1 -1
  5. package/dist/gaesup/gaesupProps/index.js +1 -1
  6. package/dist/gaesup/index.d.ts +4 -4
  7. package/dist/gaesup/index.js +4 -4
  8. package/dist/gaesup/tools/gameboy/index.js +1 -1
  9. package/dist/gaesup/tools/gameboy/style.css.js +0 -1
  10. package/dist/gaesup/tools/gamepad/GamePadButton.js +1 -1
  11. package/dist/gaesup/tools/gamepad/index.js +1 -1
  12. package/dist/gaesup/tools/index.d.ts +1 -1
  13. package/dist/gaesup/tools/index.js +7 -5
  14. package/dist/gaesup/tools/joystick/index.js +1 -1
  15. package/dist/gaesup/tools/joystick/style.css.js +10 -12
  16. package/dist/gaesup/tools/keyBoardToolTip/index.js +14 -3
  17. package/dist/gaesup/tools/minimap/index.js +5 -6
  18. package/dist/gaesup/world/index.d.ts +1 -1
  19. package/dist/gaesup/world/index.js +1 -1
  20. package/dist/styles/sprinkles/color.css.d.ts +27 -27
  21. package/dist/styles/sprinkles/direction.css.d.ts +24 -24
  22. package/dist/styles/sprinkles/display.css.d.ts +2 -2
  23. package/dist/styles/sprinkles/fontSize.css.d.ts +12 -12
  24. package/dist/styles/sprinkles/margin.css.d.ts +50 -50
  25. package/dist/styles/sprinkles/padding.css.d.ts +50 -50
  26. package/lib/index.ts +10 -0
  27. package/package.json +30 -20
  28. package/src/gaesup/animation/actions.ts +123 -0
  29. package/src/gaesup/animation/index.ts +1 -0
  30. package/src/gaesup/camera/cameraCollisionDetecter.tsx +53 -0
  31. package/src/gaesup/camera/control/map.ts +10 -0
  32. package/src/gaesup/camera/control/normal.ts +16 -0
  33. package/src/gaesup/camera/control/orbit.ts +31 -0
  34. package/src/gaesup/camera/index.tsx +102 -0
  35. package/src/gaesup/camera/type.ts +17 -0
  36. package/src/gaesup/component/Airplane.tsx +52 -0
  37. package/src/gaesup/component/Character.tsx +58 -0
  38. package/src/gaesup/component/Vehicle.tsx +43 -0
  39. package/src/gaesup/component/gltf/AirplaneGltf.tsx +31 -0
  40. package/src/gaesup/component/gltf/CharacterGltf.tsx +96 -0
  41. package/src/gaesup/component/gltf/VehicleGltf.tsx +31 -0
  42. package/src/gaesup/component/gltf/WheelJoint.tsx +39 -0
  43. package/src/gaesup/component/gltf/index.ts +4 -0
  44. package/src/gaesup/component/gltf/type.ts +7 -0
  45. package/src/gaesup/component/index.ts +5 -0
  46. package/src/gaesup/component/ref/airplane.tsx +97 -0
  47. package/src/gaesup/component/ref/character.tsx +137 -0
  48. package/src/gaesup/component/ref/index.ts +8 -0
  49. package/src/gaesup/component/ref/vehicle.tsx +122 -0
  50. package/src/gaesup/component/setInit.ts +14 -0
  51. package/src/gaesup/controller/context/index.ts +53 -0
  52. package/src/gaesup/controller/context/reducer.ts +18 -0
  53. package/src/gaesup/controller/context/type.ts +63 -0
  54. package/src/gaesup/controller/index.tsx +123 -0
  55. package/src/gaesup/controller/type.ts +149 -0
  56. package/src/gaesup/gaesupProps/index.tsx +66 -0
  57. package/src/gaesup/index.ts +8 -0
  58. package/src/gaesup/initial/callback/index.ts +73 -0
  59. package/src/gaesup/initial/callback/type.ts +47 -0
  60. package/src/gaesup/initial/controller/index.ts +157 -0
  61. package/src/gaesup/initial/controller/initDebug.ts +102 -0
  62. package/src/gaesup/initial/gaesupWorld/collider/airplane.ts +26 -0
  63. package/src/gaesup/initial/gaesupWorld/collider/character.ts +32 -0
  64. package/src/gaesup/initial/gaesupWorld/collider/gltf.ts +98 -0
  65. package/src/gaesup/initial/gaesupWorld/collider/index.ts +26 -0
  66. package/src/gaesup/initial/gaesupWorld/collider/vehicle.ts +43 -0
  67. package/src/gaesup/initial/gaesupWorld/index.ts +84 -0
  68. package/src/gaesup/initial/gaesupWorld/type.ts +38 -0
  69. package/src/gaesup/initial/index.ts +3 -0
  70. package/src/gaesup/physics/airplane/currentSetting.ts +20 -0
  71. package/src/gaesup/physics/airplane/damping.ts +6 -0
  72. package/src/gaesup/physics/airplane/direction.ts +79 -0
  73. package/src/gaesup/physics/airplane/gravity.ts +11 -0
  74. package/src/gaesup/physics/airplane/impulse.ts +28 -0
  75. package/src/gaesup/physics/airplane/index.tsx +16 -0
  76. package/src/gaesup/physics/airplane/turn.ts +11 -0
  77. package/src/gaesup/physics/character/accelaration.ts +14 -0
  78. package/src/gaesup/physics/character/currentSetting.ts +20 -0
  79. package/src/gaesup/physics/character/damping.ts +6 -0
  80. package/src/gaesup/physics/character/direction.ts +104 -0
  81. package/src/gaesup/physics/character/impulse.ts +24 -0
  82. package/src/gaesup/physics/character/index.tsx +20 -0
  83. package/src/gaesup/physics/character/jump.ts +21 -0
  84. package/src/gaesup/physics/character/stabilizing.ts +6 -0
  85. package/src/gaesup/physics/character/turn.ts +17 -0
  86. package/src/gaesup/physics/check/ground.ts +19 -0
  87. package/src/gaesup/physics/check/index.ts +12 -0
  88. package/src/gaesup/physics/check/moving.ts +20 -0
  89. package/src/gaesup/physics/check/rotate.ts +13 -0
  90. package/src/gaesup/physics/check/slope.ts +50 -0
  91. package/src/gaesup/physics/index.ts +50 -0
  92. package/src/gaesup/physics/type.ts +29 -0
  93. package/src/gaesup/physics/vehicle/currentSetting.ts +20 -0
  94. package/src/gaesup/physics/vehicle/damping.ts +12 -0
  95. package/src/gaesup/physics/vehicle/direction.ts +48 -0
  96. package/src/gaesup/physics/vehicle/impulse.ts +39 -0
  97. package/src/gaesup/physics/vehicle/index.tsx +14 -0
  98. package/src/gaesup/physics/vehicle/turn.ts +11 -0
  99. package/src/gaesup/styles.css.ts +26 -0
  100. package/src/gaesup/tools/context.ts +6 -0
  101. package/src/gaesup/tools/gameboy/GameBoyButton.tsx +47 -0
  102. package/src/gaesup/tools/gameboy/default.ts +3 -0
  103. package/src/gaesup/tools/gameboy/index.tsx +37 -0
  104. package/src/gaesup/tools/gameboy/style.css.ts +96 -0
  105. package/src/gaesup/tools/gameboy/type.ts +8 -0
  106. package/src/gaesup/tools/gamepad/GamePadButton.tsx +49 -0
  107. package/src/gaesup/tools/gamepad/default.ts +3 -0
  108. package/src/gaesup/tools/gamepad/index.tsx +53 -0
  109. package/src/gaesup/tools/gamepad/style.css.ts +71 -0
  110. package/src/gaesup/tools/gamepad/type.ts +9 -0
  111. package/src/gaesup/tools/index.tsx +82 -0
  112. package/src/gaesup/tools/joystick/default.ts +76 -0
  113. package/src/gaesup/tools/joystick/index.tsx +429 -0
  114. package/src/gaesup/tools/joystick/style.css.ts +49 -0
  115. package/src/gaesup/tools/joystick/type.ts +32 -0
  116. package/src/gaesup/tools/jumpPoint/index.tsx +28 -0
  117. package/src/gaesup/tools/jumpPoint/style.css.ts +34 -0
  118. package/src/gaesup/tools/keyBoardToolTip/constant.ts +128 -0
  119. package/src/gaesup/tools/keyBoardToolTip/default.ts +14 -0
  120. package/src/gaesup/tools/keyBoardToolTip/index.tsx +92 -0
  121. package/src/gaesup/tools/keyBoardToolTip/style.css.ts +49 -0
  122. package/src/gaesup/tools/keyBoardToolTip/type.ts +37 -0
  123. package/src/gaesup/tools/minimap/default.ts +9 -0
  124. package/src/gaesup/tools/minimap/index.tsx +78 -0
  125. package/src/gaesup/tools/minimap/style.css.ts +144 -0
  126. package/src/gaesup/tools/minimap/type.ts +27 -0
  127. package/src/gaesup/tools/pushKey/index.ts +26 -0
  128. package/src/gaesup/tools/reducer.ts +21 -0
  129. package/src/gaesup/tools/style.css.ts +34 -0
  130. package/src/gaesup/tools/type.ts +26 -0
  131. package/src/gaesup/utils/constant.ts +1 -0
  132. package/src/gaesup/utils/index.ts +3 -0
  133. package/src/gaesup/utils/ray.ts +23 -0
  134. package/src/gaesup/utils/ref.ts +17 -0
  135. package/src/gaesup/utils/vector.ts +40 -0
  136. package/src/gaesup/world/context/index.ts +133 -0
  137. package/src/gaesup/world/context/reducer.ts +21 -0
  138. package/src/gaesup/world/context/type.ts +139 -0
  139. package/src/gaesup/world/index.tsx +14 -0
  140. package/src/gaesup/world/type.ts +10 -0
  141. package/{index.ts → src/index.ts} +1 -1
  142. package/src/styles/constants/boxshadow.css.ts +10 -0
  143. package/src/styles/constants/constant.css.ts +81 -0
  144. package/src/styles/constants/direction.css.ts +168 -0
  145. package/src/styles/constants/flex.css.ts +68 -0
  146. package/src/styles/constants/gradient.css.ts +10 -0
  147. package/src/styles/constants/grid.css.ts +37 -0
  148. package/src/styles/constants/palette.css.ts +91 -0
  149. package/src/styles/constants/translate.css.ts +129 -0
  150. package/src/styles/global.css.ts +91 -0
  151. package/src/styles/recipe/base.css.ts +31 -0
  152. package/src/styles/recipe/button.css.ts +109 -0
  153. package/src/styles/recipe/index.css.ts +134 -0
  154. package/src/styles/recipe/input.css.ts +33 -0
  155. package/src/styles/sprinkles/color.css.ts +62 -0
  156. package/src/styles/sprinkles/direction.css.ts +26 -0
  157. package/src/styles/sprinkles/display.css.ts +25 -0
  158. package/src/styles/sprinkles/fontSize.css.ts +25 -0
  159. package/src/styles/sprinkles/grid.css.ts +28 -0
  160. package/src/styles/sprinkles/index.css.ts +22 -0
  161. package/src/styles/sprinkles/margin.css.ts +30 -0
  162. package/src/styles/sprinkles/padding.css.ts +30 -0
  163. package/src/styles/sprinkles/position.css.ts +14 -0
  164. package/src/styles/sprinkles/size.css.ts +23 -0
  165. package/src/styles/theme.css.ts +98 -0
  166. package/tsconfig.json +22 -0
package/README.md CHANGED
@@ -1,13 +1,9 @@
1
1
  # Gaesup World
2
2
 
3
- [![Version](https://img.shields.io/npm/v/gaesup-world?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
4
- [![Downloads](https://img.shields.io/npm/dt/gaesup-world.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
5
-
6
3
  Web 3D Character Controller and World Platform Library
7
4
 
8
- [![main](https://github.com/jigglypop/gaesup-world/blob/master/image/main_image.png)](https://codesandbox.io/p/github/jigglypop/gaesup-world-examples/master?workspaceId=e8ae627a-af61-415e-aa21-1fe5af422c86)
9
-
10
- > click and watch code sandbox example!
5
+ [![Version](https://img.shields.io/npm/v/gaesup-world?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/zustand)
6
+ [![Downloads](https://img.shields.io/npm/dt/gaesup-world.svg?style=flat&colorA=000000&colorB=000000)](https://www.npmjs.com/package/gaesup-world)
11
7
 
12
8
  ---
13
9
 
@@ -15,59 +11,6 @@ Web 3D Character Controller and World Platform Library
15
11
 
16
12
  Gaesup World is a library that uses @react/three-fiber, @react/three-drei, and rapier to provide control tools for characters, airplanes, cars, and more in a web 3D environment. This controller is designed to easily manage character movement, animation, and interaction. It allows for easy manipulation of characters or vehicles in a virtual world, and is also equipped with utilities like minimaps and joysticks.
17
13
 
18
- ## How to start
19
-
20
- ```tsx
21
- "use client";
22
-
23
- import { Environment, KeyboardControls } from "@react-three/drei";
24
- import { Canvas } from "@react-three/fiber";
25
- import { Physics, RigidBody } from "@react-three/rapier";
26
-
27
- import { GaesupController, GaesupWorld } from "gaesup-world";
28
-
29
- export const keyboardMap = [
30
- { name: "forward", keys: ["ArrowUp", "KeyW"] },
31
- { name: "backward", keys: ["ArrowDown", "KeyS"] },
32
- { name: "leftward", keys: ["ArrowLeft", "KeyA"] },
33
- { name: "rightward", keys: ["ArrowRight", "KeyD"] },
34
- { name: "space", keys: ["Space"] },
35
- { name: "shift", keys: ["Shift"] },
36
- { name: "keyZ", keys: ["KeyZ"] },
37
- ];
38
-
39
- export default function App() {
40
- const CHARACTER_URL = "./gaesupyee.glb";
41
-
42
- return (
43
- <GaesupWorld
44
- url={{
45
- characterUrl: CHARACTER_URL,
46
- }}
47
- >
48
- <Canvas shadows style={{ width: "100dvw", height: "100dvh" }}>
49
- <Environment background preset="sunset" blur={0.8} />
50
- <Physics>
51
- <KeyboardControls map={keyboardMap}>
52
- <GaesupController
53
- groupProps={{
54
- rotation: [0, Math.PI, 0],
55
- }}
56
- />
57
- </KeyboardControls>
58
- <RigidBody type="fixed">
59
- <mesh receiveShadow position={[0, 0, 0]}>
60
- <boxGeometry args={[300, 5, 300]} />
61
- <meshStandardMaterial />
62
- </mesh>
63
- </RigidBody>
64
- </Physics>
65
- </Canvas>
66
- </GaesupWorld>
67
- );
68
- }
69
- ```
70
-
71
14
  ### Features
72
15
 
73
16
  - 3D character control based on React Three Fiber.
@@ -1,2 +1,2 @@
1
1
  import { controllerType } from "./type";
2
- export declare function GaesupController(props: controllerType): import("react/jsx-runtime").JSX.Element;
2
+ export default function GaesupController(props: controllerType): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -19,7 +20,7 @@ import initControllerProps from "../initial/controller";
19
20
  import { GaesupWorldContext } from "../world/context";
20
21
  import { GaesupControllerContext, GaesupControllerDispatchContext, gaesupControllerDefault, } from "./context";
21
22
  import { gaesupControllerReducer } from "./context/reducer";
22
- export function GaesupController(props) {
23
+ export default function GaesupController(props) {
23
24
  var mode = useContext(GaesupWorldContext).mode;
24
25
  var _a = useReducer(gaesupControllerReducer, {
25
26
  cameraMode: Object.assign(gaesupControllerDefault.cameraMode, props.cameraMode || {}),
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- export declare function GaeSupProps({ text, position, jumpPoint, children, }: {
2
+ export default function GaeSupProps({ text, position, jumpPoint, children, }: {
3
3
  text: string;
4
4
  position?: [number, number, number];
5
5
  jumpPoint?: boolean;
@@ -23,7 +23,7 @@ import { vec3 } from "@react-three/rapier";
23
23
  import { useContext, useEffect, useRef } from "react";
24
24
  import * as THREE from "three";
25
25
  import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../world/context/index.js";
26
- export function GaeSupProps(_a) {
26
+ export default function GaeSupProps(_a) {
27
27
  var text = _a.text, position = _a.position, jumpPoint = _a.jumpPoint, children = _a.children;
28
28
  var groupRef = useRef(null);
29
29
  var _b = useContext(GaesupWorldContext), minimap = _b.minimap, points = _b.points;
@@ -1,8 +1,8 @@
1
1
  export { playActions } from "./animation";
2
2
  export * as Camera from "./camera";
3
3
  export { Airplane, Character, Vehicle } from "./component";
4
- export { GaesupController } from "./controller";
5
- export { GaeSupProps } from "./gaesupProps";
4
+ export * as GaesupController from "./controller";
5
+ export * as GaeSupProps from "./gaesupProps";
6
6
  export * from "./initial";
7
- export { GaeSupTools } from "./tools";
8
- export { GaesupWorld } from "./world";
7
+ export * as GaeSupTools from "./tools";
8
+ export * as GaesupWorld from "./world";
@@ -1,8 +1,8 @@
1
1
  export { playActions } from "./animation";
2
2
  export * as Camera from "./camera";
3
3
  export { Airplane, Character, Vehicle } from "./component";
4
- export { GaesupController } from "./controller";
5
- export { GaeSupProps } from "./gaesupProps";
4
+ export * as GaesupController from "./controller";
5
+ export * as GaeSupProps from "./gaesupProps";
6
6
  export * from "./initial";
7
- export { GaeSupTools } from "./tools";
8
- export { GaesupWorld } from "./world";
7
+ export * as GaeSupTools from "./tools";
8
+ export * as GaesupWorld from "./world";
@@ -15,7 +15,7 @@ export var GameBoyDirections = [
15
15
  ];
16
16
  export default function GameBoy() {
17
17
  var _a = useContext(GaesupToolsContext).gameboy, gameboyStyle = _a.gameboyStyle, gameboyInnerStyle = _a.gameboyInnerStyle;
18
- return (_jsx("div", { className: style.gameBoy, children: _jsx("div", { className: style.gameBoyInner, children: GameBoyDirections.map(function (item, key) {
18
+ return (_jsx("div", { className: style.gameBoy, style: gameboyStyle, children: _jsx("div", { className: style.gameBoyInner, style: gameboyInnerStyle, children: GameBoyDirections.map(function (item, key) {
19
19
  return (_jsx(GameBoyButton, { tag: item.tag, value: item.value, icon: item.icon }, key));
20
20
  }) }) }));
21
21
  }
@@ -18,7 +18,6 @@ export var gameBoyInner = style([
18
18
  row: "center",
19
19
  }),
20
20
  {
21
- display: "grid",
22
21
  margin: "5rem",
23
22
  padding: "1rem",
24
23
  borderRadius: "50%",
@@ -21,5 +21,5 @@ export default function GamePadButton(_a) {
21
21
  }), onMouseDown: function () { return onMouseDown(); }, onMouseUp: function () { return onMouseLeave(); }, onMouseLeave: function () { return onMouseLeave(); }, onContextMenu: function (e) {
22
22
  e.preventDefault();
23
23
  onMouseLeave();
24
- }, onPointerDown: function () { return onMouseDown(); }, onPointerUp: function () { return onMouseLeave(); }, children: name }));
24
+ }, onPointerDown: function () { return onMouseDown(); }, onPointerUp: function () { return onMouseLeave(); }, style: gamepadButtonStyle, children: name }));
25
25
  }
@@ -24,7 +24,7 @@ export default function GamePad() {
24
24
  .filter(function (item) {
25
25
  return !(item.tag === "run" && mode.controller === "joystick");
26
26
  });
27
- return (_jsx("div", { className: style.gamePad, children: _jsx("div", { className: style.gamePadGrid, children: GamePadDirections.map(function (item, key) {
27
+ return (_jsx("div", { className: style.gamePad, style: gamepadStyle, children: _jsx("div", { className: style.gamePadGrid, style: gamepadGridStyle, children: GamePadDirections.map(function (item, key) {
28
28
  return (_jsx(GamePadButton, { value: item.value, name: item.name }, key));
29
29
  }) }) }));
30
30
  }
@@ -1,2 +1,2 @@
1
1
  import { gaesupToolsPartialPropType } from "./type";
2
- export declare function GaeSupTools({ keyboardToolTip, joystick, minimap, gameboy, gamepad, }: gaesupToolsPartialPropType): import("react/jsx-runtime").JSX.Element;
2
+ export default function GaeSupTools({ keyboardToolTip, joystick, minimap, gameboy, gamepad, }: gaesupToolsPartialPropType): import("react/jsx-runtime").JSX.Element;
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
3
  import { useContext, useMemo, useReducer } from "react";
3
4
  import { GaesupWorldContext } from "../world/context";
@@ -8,13 +9,14 @@ import GamePad from "./gamepad";
8
9
  import { gamepadDefault } from "./gamepad/default";
9
10
  import JoyStick from "./joystick";
10
11
  import { joyStickDefault } from "./joystick/default";
12
+ import JumpPoint from "./jumpPoint";
11
13
  import KeyBoardToolTip from "./keyBoardToolTip";
12
14
  import { keyboardToolTipDefault } from "./keyBoardToolTip/default";
13
15
  import MiniMap from "./minimap";
14
16
  import { minimapDefault } from "./minimap/default";
15
17
  import { gaesupToolsReducer } from "./reducer";
16
18
  import * as style from "./style.css";
17
- export function GaeSupTools(_a) {
19
+ export default function GaeSupTools(_a) {
18
20
  var keyboardToolTip = _a.keyboardToolTip, joystick = _a.joystick, minimap = _a.minimap, gameboy = _a.gameboy, gamepad = _a.gamepad;
19
21
  var worldContext = useContext(GaesupWorldContext);
20
22
  var mode = worldContext.mode;
@@ -35,8 +37,8 @@ export function GaeSupTools(_a) {
35
37
  tools.gameboy,
36
38
  tools.gamepad,
37
39
  ]);
38
- return (_jsx(GaesupToolsContext.Provider, { value: gaesupTool.value, children: _jsx(GaesupToolsDispatchContext.Provider, { value: gaesupTool.dispatch, children: _jsxs("div", { className: style.footer, children: [_jsx("div", { className: style.footerUpper, children: (mode.controller === "joystick" ||
39
- mode.controller === "gameboy") &&
40
- gaesupTool.value.gamepad.on && _jsx(GamePad, {}) }), _jsxs("div", { className: style.footerLower, children: [mode.controller === "joystick" && gaesupTool.value.joystick.on && (_jsx(JoyStick, {})), mode.controller === "gameboy" && gaesupTool.value.gameboy.on && (_jsx(GameBoy, {})), mode.controller === "keyboard" &&
41
- gaesupTool.value.keyboardToolTip.on && _jsx(KeyBoardToolTip, {}), gaesupTool.value.minimap.on && _jsx(MiniMap, {})] })] }) }) }));
40
+ return (_jsx(GaesupToolsContext.Provider, { value: gaesupTool.value, children: _jsxs(GaesupToolsDispatchContext.Provider, { value: gaesupTool.dispatch, children: [_jsxs("div", { className: style.footer, children: [_jsx("div", { className: style.footerUpper, children: (mode.controller === "joystick" ||
41
+ mode.controller === "gameboy") &&
42
+ gaesupTool.value.gamepad.on && _jsx(GamePad, {}) }), _jsxs("div", { className: style.footerLower, children: [mode.controller === "joystick" && gaesupTool.value.joystick.on && (_jsx(JoyStick, {})), mode.controller === "gameboy" && gaesupTool.value.gameboy.on && (_jsx(GameBoy, {})), mode.controller === "keyboard" &&
43
+ gaesupTool.value.keyboardToolTip.on && _jsx(KeyBoardToolTip, {}), gaesupTool.value.minimap.on && _jsx(MiniMap, {})] })] }), _jsx(JumpPoint, {})] }) }));
42
44
  }
@@ -17,7 +17,7 @@ import useJoyStick from "./default";
17
17
  import * as style from "./style.css";
18
18
  export default function JoyStick() {
19
19
  var joyStickStyle = useContext(GaesupToolsContext).joystick.joyStickStyle;
20
- return (_jsx("div", { className: style.joyStick, children: _jsx(JoyBall, {}) }));
20
+ return (_jsx("div", { className: style.joyStick, style: joyStickStyle, children: _jsx(JoyBall, {}) }));
21
21
  }
22
22
  export function JoyBall() {
23
23
  var outerRef = useRef(null);
@@ -1,23 +1,21 @@
1
1
  import { style } from "@vanilla-extract/css";
2
+ import { fixed, flex } from "../../../styles/recipe/index.css";
2
3
  export var joyStick = style([
4
+ fixed({
5
+ south_east: true,
6
+ }),
7
+ flex({
8
+ column: "7",
9
+ }),
3
10
  {
4
- position: "fixed",
5
- bottom: "0",
6
- right: "0",
7
- display: "flex",
8
- flexDirection: "column",
9
- justifyContent: "flex-end",
10
- alignItems: "flex-start",
11
- textAlign: "center",
12
11
  width: "100%",
13
12
  },
14
13
  ]);
15
14
  export var joyStickInner = style([
15
+ flex({
16
+ row: "center",
17
+ }),
16
18
  {
17
- display: "flex",
18
- alignItems: "center",
19
- justifyContent: "center",
20
- textAlign: "center",
21
19
  margin: "5rem",
22
20
  padding: "1rem",
23
21
  width: "12rem",
@@ -1,3 +1,14 @@
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
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { assignInlineVars } from "@vanilla-extract/dynamic";
3
14
  import { useContext } from "react";
@@ -28,7 +39,7 @@ export default function KeyBoardToolTip() {
28
39
  });
29
40
  return maps;
30
41
  }, {});
31
- return (_jsx("div", { className: style.keyBoardToolTip, children: _jsx("div", { className: style.keyBoardTooInner, children: keyArray.map(function (item, key) {
42
+ return (_jsx("div", { className: style.keyBoardToolTip, style: keyBoardToolTipStyle, children: _jsx("div", { className: style.keyBoardTooInner, style: keyBoardToolTipInnerStyle, children: keyArray.map(function (item, key) {
32
43
  var background = "rgba(0, 0, 0, 0.1)";
33
44
  var boxShadow = "0 0 5px rgba(0, 0, 0, 0.2)";
34
45
  if (codeToActionObj[item.code]) {
@@ -46,12 +57,12 @@ export default function KeyBoardToolTip() {
46
57
  animations.keyControl[codeToActionObj[item.code]]) {
47
58
  color = "black";
48
59
  }
49
- return (_jsx("div", { className: style.keyCap, style: assignInlineVars({
60
+ return (_jsx("div", { className: style.keyCap, style: __assign(__assign({}, assignInlineVars({
50
61
  background: background,
51
62
  boxShadow: boxShadow,
52
63
  color: color,
53
64
  gridRow: item.gridRow,
54
65
  gridColumn: item.gridColumn,
55
- }), children: item.name }, key));
66
+ })), keyCapStyle), children: item.name }, key));
56
67
  }) }) }));
57
68
  }
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  var __assign = (this && this.__assign) || function () {
2
3
  __assign = Object.assign || function(t) {
3
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -41,18 +42,16 @@ export default function MiniMap() {
41
42
  else
42
43
  setRatio(function (prev) { return prev - 0.1; });
43
44
  }, [setRatio, ratio]);
44
- return (_jsxs("div", { className: style.minimap,
45
- // style={assignInlineVars(minimap.minimapStyle || {})}
46
- onWheel: function (e) {
45
+ return (_jsxs("div", { className: style.minimap, style: minimap.minimapStyle || {}, onWheel: function (e) {
47
46
  if (e.deltaY > 0)
48
47
  downRatio();
49
48
  else
50
49
  upRatio();
51
- }, children: [_jsx("div", { className: style.minimapOuter }), _jsxs("div", { className: style.minimapInner, children: [Object.values(minimapInner.props).map(function (obj, key) {
52
- return (_jsx("div", { className: style.minimapObject, style: assignInlineVars({
50
+ }, children: [_jsx("div", { className: style.minimapOuter, style: minimap.objectStyle || {} }), _jsxs("div", { className: style.minimapInner, style: minimap.innerStyle || {}, children: [Object.values(minimapInner.props).map(function (obj, key) {
51
+ return (_jsx("div", { className: style.minimapObject, style: __assign(__assign({}, assignInlineVars({
53
52
  width: "".concat(obj.size.x, "rem"),
54
53
  height: "".concat(obj.size.z, "rem"),
55
54
  transform: "translate(".concat(-obj.center.x + activeState.position.x * ratio, "rem, ").concat(-obj.center.z + activeState.position.z * ratio, "rem)"),
56
- }), children: _jsx("div", { className: style.text, children: obj.text }) }, key));
55
+ })), minimap.objectStyle), children: _jsx("div", { className: style.text, style: minimap.textStyle, children: obj.text }) }, key));
57
56
  }), _jsx("div", { className: style.avatar, style: minimap.avatarStyle })] })] }));
58
57
  }
@@ -1,2 +1,2 @@
1
1
  import { initGaesupWorldPropsType } from "../initial/gaesupWorld/type";
2
- export declare function GaesupWorld(props: initGaesupWorldPropsType): import("react/jsx-runtime").JSX.Element;
2
+ export default function GaesupWorld(props: initGaesupWorldPropsType): import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import initGaesupWorld from "../initial/gaesupWorld";
3
3
  import { GaesupWorldContext, GaesupWorldDispatchContext } from "./context";
4
- export function GaesupWorld(props) {
4
+ export default function GaesupWorld(props) {
5
5
  var gaesupProps = initGaesupWorld(props).gaesupProps;
6
6
  return (_jsx(GaesupWorldContext.Provider, { value: gaesupProps.value, children: _jsx(GaesupWorldDispatchContext.Provider, { value: gaesupProps.dispatch, children: props.children }) }));
7
7
  }
@@ -24,7 +24,7 @@ export declare const colorProperties: {
24
24
  focus: string;
25
25
  };
26
26
  };
27
- inherit: {
27
+ tr: {
28
28
  defaultClass: string;
29
29
  conditions: {
30
30
  default: string;
@@ -33,7 +33,7 @@ export declare const colorProperties: {
33
33
  focus: string;
34
34
  };
35
35
  };
36
- gr: {
36
+ g: {
37
37
  defaultClass: string;
38
38
  conditions: {
39
39
  default: string;
@@ -42,7 +42,7 @@ export declare const colorProperties: {
42
42
  focus: string;
43
43
  };
44
44
  };
45
- black: {
45
+ inherit: {
46
46
  defaultClass: string;
47
47
  conditions: {
48
48
  default: string;
@@ -51,7 +51,7 @@ export declare const colorProperties: {
51
51
  focus: string;
52
52
  };
53
53
  };
54
- white: {
54
+ gr: {
55
55
  defaultClass: string;
56
56
  conditions: {
57
57
  default: string;
@@ -60,7 +60,7 @@ export declare const colorProperties: {
60
60
  focus: string;
61
61
  };
62
62
  };
63
- tag: {
63
+ black: {
64
64
  defaultClass: string;
65
65
  conditions: {
66
66
  default: string;
@@ -69,7 +69,7 @@ export declare const colorProperties: {
69
69
  focus: string;
70
70
  };
71
71
  };
72
- bg: {
72
+ white: {
73
73
  defaultClass: string;
74
74
  conditions: {
75
75
  default: string;
@@ -78,7 +78,7 @@ export declare const colorProperties: {
78
78
  focus: string;
79
79
  };
80
80
  };
81
- c: {
81
+ tag: {
82
82
  defaultClass: string;
83
83
  conditions: {
84
84
  default: string;
@@ -87,7 +87,7 @@ export declare const colorProperties: {
87
87
  focus: string;
88
88
  };
89
89
  };
90
- tr: {
90
+ bg: {
91
91
  defaultClass: string;
92
92
  conditions: {
93
93
  default: string;
@@ -96,7 +96,7 @@ export declare const colorProperties: {
96
96
  focus: string;
97
97
  };
98
98
  };
99
- t: {
99
+ c: {
100
100
  defaultClass: string;
101
101
  conditions: {
102
102
  default: string;
@@ -105,7 +105,7 @@ export declare const colorProperties: {
105
105
  focus: string;
106
106
  };
107
107
  };
108
- g: {
108
+ t: {
109
109
  defaultClass: string;
110
110
  conditions: {
111
111
  default: string;
@@ -396,7 +396,7 @@ export declare const colorProperties: {
396
396
  };
397
397
  boxShadow: {
398
398
  values: {
399
- gr: {
399
+ tr: {
400
400
  defaultClass: string;
401
401
  conditions: {
402
402
  default: string;
@@ -405,7 +405,7 @@ export declare const colorProperties: {
405
405
  focus: string;
406
406
  };
407
407
  };
408
- tag: {
408
+ g: {
409
409
  defaultClass: string;
410
410
  conditions: {
411
411
  default: string;
@@ -414,7 +414,7 @@ export declare const colorProperties: {
414
414
  focus: string;
415
415
  };
416
416
  };
417
- bg: {
417
+ gr: {
418
418
  defaultClass: string;
419
419
  conditions: {
420
420
  default: string;
@@ -423,7 +423,7 @@ export declare const colorProperties: {
423
423
  focus: string;
424
424
  };
425
425
  };
426
- c: {
426
+ tag: {
427
427
  defaultClass: string;
428
428
  conditions: {
429
429
  default: string;
@@ -432,7 +432,7 @@ export declare const colorProperties: {
432
432
  focus: string;
433
433
  };
434
434
  };
435
- bg_hover: {
435
+ bg: {
436
436
  defaultClass: string;
437
437
  conditions: {
438
438
  default: string;
@@ -441,7 +441,7 @@ export declare const colorProperties: {
441
441
  focus: string;
442
442
  };
443
443
  };
444
- tr_hover: {
444
+ c: {
445
445
  defaultClass: string;
446
446
  conditions: {
447
447
  default: string;
@@ -450,7 +450,7 @@ export declare const colorProperties: {
450
450
  focus: string;
451
451
  };
452
452
  };
453
- t_hover: {
453
+ bg_hover: {
454
454
  defaultClass: string;
455
455
  conditions: {
456
456
  default: string;
@@ -459,7 +459,7 @@ export declare const colorProperties: {
459
459
  focus: string;
460
460
  };
461
461
  };
462
- g_hover: {
462
+ tr_hover: {
463
463
  defaultClass: string;
464
464
  conditions: {
465
465
  default: string;
@@ -468,7 +468,7 @@ export declare const colorProperties: {
468
468
  focus: string;
469
469
  };
470
470
  };
471
- gr_hover: {
471
+ t_hover: {
472
472
  defaultClass: string;
473
473
  conditions: {
474
474
  default: string;
@@ -477,7 +477,7 @@ export declare const colorProperties: {
477
477
  focus: string;
478
478
  };
479
479
  };
480
- ta_hover: {
480
+ g_hover: {
481
481
  defaultClass: string;
482
482
  conditions: {
483
483
  default: string;
@@ -486,7 +486,7 @@ export declare const colorProperties: {
486
486
  focus: string;
487
487
  };
488
488
  };
489
- sb_hover: {
489
+ gr_hover: {
490
490
  defaultClass: string;
491
491
  conditions: {
492
492
  default: string;
@@ -495,7 +495,7 @@ export declare const colorProperties: {
495
495
  focus: string;
496
496
  };
497
497
  };
498
- sm_hover: {
498
+ ta_hover: {
499
499
  defaultClass: string;
500
500
  conditions: {
501
501
  default: string;
@@ -504,7 +504,7 @@ export declare const colorProperties: {
504
504
  focus: string;
505
505
  };
506
506
  };
507
- c_hover: {
507
+ sb_hover: {
508
508
  defaultClass: string;
509
509
  conditions: {
510
510
  default: string;
@@ -513,7 +513,7 @@ export declare const colorProperties: {
513
513
  focus: string;
514
514
  };
515
515
  };
516
- tag_hover: {
516
+ sm_hover: {
517
517
  defaultClass: string;
518
518
  conditions: {
519
519
  default: string;
@@ -522,7 +522,7 @@ export declare const colorProperties: {
522
522
  focus: string;
523
523
  };
524
524
  };
525
- tr: {
525
+ c_hover: {
526
526
  defaultClass: string;
527
527
  conditions: {
528
528
  default: string;
@@ -531,7 +531,7 @@ export declare const colorProperties: {
531
531
  focus: string;
532
532
  };
533
533
  };
534
- t: {
534
+ tag_hover: {
535
535
  defaultClass: string;
536
536
  conditions: {
537
537
  default: string;
@@ -540,7 +540,7 @@ export declare const colorProperties: {
540
540
  focus: string;
541
541
  };
542
542
  };
543
- g: {
543
+ t: {
544
544
  defaultClass: string;
545
545
  conditions: {
546
546
  default: string;