gaesup-world 0.0.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.
- package/README.md +51 -0
- package/index.html +13 -0
- package/package.json +82 -0
- package/src/gaesup/animation/actions.ts +123 -0
- package/src/gaesup/camera/cameraCollisionDetecter.tsx +53 -0
- package/src/gaesup/camera/control/map.ts +10 -0
- package/src/gaesup/camera/control/normal copy.ts +19 -0
- package/src/gaesup/camera/control/normal.ts +15 -0
- package/src/gaesup/camera/control/orbit.ts +31 -0
- package/src/gaesup/camera/index.tsx +102 -0
- package/src/gaesup/camera/type.ts +17 -0
- package/src/gaesup/component/Airplane.tsx +46 -0
- package/src/gaesup/component/Character.tsx +48 -0
- package/src/gaesup/component/Vehicle.tsx +40 -0
- package/src/gaesup/component/gltf/AirplaneGltf.tsx +31 -0
- package/src/gaesup/component/gltf/CharacterGltf.tsx +81 -0
- package/src/gaesup/component/gltf/VehicleGltf.tsx +31 -0
- package/src/gaesup/component/gltf/WheelJoint.tsx +39 -0
- package/src/gaesup/component/gltf/type.ts +6 -0
- package/src/gaesup/component/ref/airplane.tsx +83 -0
- package/src/gaesup/component/ref/character.tsx +132 -0
- package/src/gaesup/component/ref/vehicle.tsx +145 -0
- package/src/gaesup/controller/index.tsx +103 -0
- package/src/gaesup/controller/type.ts +139 -0
- package/src/gaesup/gaesupProps/index.tsx +66 -0
- package/src/gaesup/initial/callback/index.ts +73 -0
- package/src/gaesup/initial/callback/type.ts +45 -0
- package/src/gaesup/initial/controller/index.ts +143 -0
- package/src/gaesup/initial/controller/initDebug.ts +102 -0
- package/src/gaesup/initial/gaesupWorld/collider/airplane.ts +26 -0
- package/src/gaesup/initial/gaesupWorld/collider/character.ts +32 -0
- package/src/gaesup/initial/gaesupWorld/collider/gltf.ts +91 -0
- package/src/gaesup/initial/gaesupWorld/collider/index.ts +26 -0
- package/src/gaesup/initial/gaesupWorld/collider/vehicle.ts +43 -0
- package/src/gaesup/initial/gaesupWorld/index.ts +82 -0
- package/src/gaesup/initial/gaesupWorld/type.ts +37 -0
- package/src/gaesup/physics/airplane/currentSetting.ts +20 -0
- package/src/gaesup/physics/airplane/damping.ts +8 -0
- package/src/gaesup/physics/airplane/direction.ts +70 -0
- package/src/gaesup/physics/airplane/gravity.ts +11 -0
- package/src/gaesup/physics/airplane/impulse.ts +22 -0
- package/src/gaesup/physics/airplane/index.tsx +16 -0
- package/src/gaesup/physics/airplane/turn.ts +12 -0
- package/src/gaesup/physics/airplane copy/currentSetting.ts +20 -0
- package/src/gaesup/physics/airplane copy/direction.ts +52 -0
- package/src/gaesup/physics/airplane copy/gravity.ts +6 -0
- package/src/gaesup/physics/airplane copy/impulse.ts +28 -0
- package/src/gaesup/physics/airplane copy/index.tsx +14 -0
- package/src/gaesup/physics/airplane copy/turn.ts +9 -0
- package/src/gaesup/physics/character/accelaration.ts +14 -0
- package/src/gaesup/physics/character/currentSetting.ts +20 -0
- package/src/gaesup/physics/character/damping.ts +6 -0
- package/src/gaesup/physics/character/direction.ts +104 -0
- package/src/gaesup/physics/character/impulse.ts +24 -0
- package/src/gaesup/physics/character/index.tsx +20 -0
- package/src/gaesup/physics/character/jump.ts +21 -0
- package/src/gaesup/physics/character/stabilizing.ts +6 -0
- package/src/gaesup/physics/character/turn.ts +17 -0
- package/src/gaesup/physics/check/ground.ts +19 -0
- package/src/gaesup/physics/check/index.ts +12 -0
- package/src/gaesup/physics/check/moving.ts +21 -0
- package/src/gaesup/physics/check/rotate.ts +13 -0
- package/src/gaesup/physics/check/slope.ts +50 -0
- package/src/gaesup/physics/index.ts +50 -0
- package/src/gaesup/physics/type.ts +35 -0
- package/src/gaesup/physics/vehicle/currentSetting.ts +20 -0
- package/src/gaesup/physics/vehicle/damping.ts +8 -0
- package/src/gaesup/physics/vehicle/direction.ts +27 -0
- package/src/gaesup/physics/vehicle/impulse.ts +22 -0
- package/src/gaesup/physics/vehicle/index.tsx +14 -0
- package/src/gaesup/physics/vehicle/turn.ts +11 -0
- package/src/gaesup/stores/active/index.ts +19 -0
- package/src/gaesup/stores/active/type.ts +16 -0
- package/src/gaesup/stores/airplane/index.ts +6 -0
- package/src/gaesup/stores/airplane/type.ts +4 -0
- package/src/gaesup/stores/animation/index.ts +18 -0
- package/src/gaesup/stores/animation/type.ts +9 -0
- package/src/gaesup/stores/collider/index.ts +55 -0
- package/src/gaesup/stores/context/controller/index.ts +36 -0
- package/src/gaesup/stores/context/controller/reducer.ts +18 -0
- package/src/gaesup/stores/context/controller/type.ts +38 -0
- package/src/gaesup/stores/context/gaesupworld/index.ts +11 -0
- package/src/gaesup/stores/context/gaesupworld/reducer.ts +21 -0
- package/src/gaesup/stores/context/gaesupworld/type.ts +66 -0
- package/src/gaesup/stores/control/index.ts +33 -0
- package/src/gaesup/stores/control/type.ts +11 -0
- package/src/gaesup/stores/joystick/index.ts +72 -0
- package/src/gaesup/stores/joystick/type.ts +23 -0
- package/src/gaesup/stores/minimap/index.ts +5 -0
- package/src/gaesup/stores/minimap/type.ts +22 -0
- package/src/gaesup/stores/point/type.ts +6 -0
- package/src/gaesup/stores/states/index.tsx +10 -0
- package/src/gaesup/stores/states/type.ts +10 -0
- package/src/gaesup/stores/url/index.ts +6 -0
- package/src/gaesup/stores/url/type.ts +6 -0
- package/src/gaesup/styles.css.ts +26 -0
- package/src/gaesup/tools/gameboy/GameBoyButton.tsx +38 -0
- package/src/gaesup/tools/gameboy/index.tsx +36 -0
- package/src/gaesup/tools/gameboy/style.css.ts +78 -0
- package/src/gaesup/tools/gamepad/GamePadButton.tsx +31 -0
- package/src/gaesup/tools/gamepad/index.tsx +55 -0
- package/src/gaesup/tools/gamepad/style.css.ts +16 -0
- package/src/gaesup/tools/index.tsx +61 -0
- package/src/gaesup/tools/joystick/index.tsx +145 -0
- package/src/gaesup/tools/joystick/style.css.ts +40 -0
- package/src/gaesup/tools/jumpPoint/index.tsx +27 -0
- package/src/gaesup/tools/jumpPoint/style.css.ts +33 -0
- package/src/gaesup/tools/keyBoardToolTip/constant.ts +144 -0
- package/src/gaesup/tools/keyBoardToolTip/index.tsx +85 -0
- package/src/gaesup/tools/keyBoardToolTip/style.css.ts +49 -0
- package/src/gaesup/tools/minimap/index.tsx +47 -0
- package/src/gaesup/tools/minimap/style.css.ts +144 -0
- package/src/gaesup/tools/style.css.ts +34 -0
- package/src/gaesup/utils/constant.ts +1 -0
- package/src/gaesup/utils/ray.ts +23 -0
- package/src/gaesup/utils/ref.ts +17 -0
- package/src/gaesup/utils/vector.ts +40 -0
- package/src/gaesup/world/index.tsx +17 -0
- package/src/gaesup/world/type.ts +10 -0
- package/src/styles/constants/boxshadow.css.ts +499 -0
- package/src/styles/constants/constant.css.ts +81 -0
- package/src/styles/constants/direction.css.ts +168 -0
- package/src/styles/constants/flex.css.ts +68 -0
- package/src/styles/constants/gradient.css.ts +10 -0
- package/src/styles/constants/grid.css.ts +37 -0
- package/src/styles/constants/palette.css.ts +324 -0
- package/src/styles/constants/translate.css.ts +129 -0
- package/src/styles/global.css.ts +91 -0
- package/src/styles/recipe/base.css.ts +31 -0
- package/src/styles/recipe/button.css.ts +109 -0
- package/src/styles/recipe/index.css.ts +134 -0
- package/src/styles/recipe/input.css.ts +33 -0
- package/src/styles/sprinkles/color.css.ts +62 -0
- package/src/styles/sprinkles/direction.css.ts +26 -0
- package/src/styles/sprinkles/display.css.ts +25 -0
- package/src/styles/sprinkles/fontSize.css.ts +25 -0
- package/src/styles/sprinkles/grid.css.ts +25 -0
- package/src/styles/sprinkles/index.css.ts +22 -0
- package/src/styles/sprinkles/margin.css.ts +30 -0
- package/src/styles/sprinkles/padding.css.ts +30 -0
- package/src/styles/sprinkles/position.css.ts +14 -0
- package/src/styles/sprinkles/size.css.ts +23 -0
- package/src/styles/theme.css.ts +98 -0
- package/tsconfig.json +27 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +9 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createSprinkles } from "@vanilla-extract/sprinkles";
|
|
2
|
+
import { colorProperties } from "./color.css";
|
|
3
|
+
import { directionProperties } from "./direction.css";
|
|
4
|
+
import { displayProperties } from "./display.css";
|
|
5
|
+
import { fontSizeProperties } from "./fontSize.css";
|
|
6
|
+
import { gridProperties } from "./grid.css";
|
|
7
|
+
import { marginProperties } from "./margin.css";
|
|
8
|
+
import { paddingProperties } from "./padding.css";
|
|
9
|
+
import { positionProperties } from "./position.css";
|
|
10
|
+
import { sizeProperties } from "./size.css";
|
|
11
|
+
|
|
12
|
+
export const sprinkles = createSprinkles(
|
|
13
|
+
colorProperties,
|
|
14
|
+
directionProperties,
|
|
15
|
+
displayProperties,
|
|
16
|
+
gridProperties,
|
|
17
|
+
marginProperties,
|
|
18
|
+
paddingProperties,
|
|
19
|
+
positionProperties,
|
|
20
|
+
fontSizeProperties,
|
|
21
|
+
sizeProperties
|
|
22
|
+
);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineProperties } from "@vanilla-extract/sprinkles";
|
|
2
|
+
import { persent, rem, size } from "../constants/constant.css";
|
|
3
|
+
|
|
4
|
+
const properties = { ...persent, ...size, ...rem };
|
|
5
|
+
|
|
6
|
+
export const marginProperties = defineProperties({
|
|
7
|
+
conditions: {
|
|
8
|
+
mobile: {},
|
|
9
|
+
tablet: { "@media": "(min-width: 768px)" },
|
|
10
|
+
laptop: { "@media": "(min-width: 1024px)" },
|
|
11
|
+
desktop: { "@media": "(min-width: 1440px)" },
|
|
12
|
+
},
|
|
13
|
+
defaultCondition: "mobile",
|
|
14
|
+
properties: {
|
|
15
|
+
margin: properties,
|
|
16
|
+
marginBottom: properties,
|
|
17
|
+
marginTop: properties,
|
|
18
|
+
marginLeft: properties,
|
|
19
|
+
marginRight: properties,
|
|
20
|
+
},
|
|
21
|
+
shorthands: {
|
|
22
|
+
m: ["margin"],
|
|
23
|
+
mb: ["marginBottom"],
|
|
24
|
+
mt: ["marginTop"],
|
|
25
|
+
ml: ["marginLeft"],
|
|
26
|
+
mr: ["marginRight"],
|
|
27
|
+
mX: ["marginLeft", "marginRight"],
|
|
28
|
+
mY: ["marginTop", "marginBottom"],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineProperties } from "@vanilla-extract/sprinkles";
|
|
2
|
+
import { persent, rem, size } from "../constants/constant.css";
|
|
3
|
+
|
|
4
|
+
const properties = { ...persent, ...size, ...rem };
|
|
5
|
+
|
|
6
|
+
export const paddingProperties = defineProperties({
|
|
7
|
+
conditions: {
|
|
8
|
+
mobile: {},
|
|
9
|
+
tablet: { "@media": "(min-width: 768px)" },
|
|
10
|
+
laptop: { "@media": "(min-width: 1024px)" },
|
|
11
|
+
desktop: { "@media": "(min-width: 1440px)" },
|
|
12
|
+
},
|
|
13
|
+
defaultCondition: "mobile",
|
|
14
|
+
properties: {
|
|
15
|
+
padding: properties,
|
|
16
|
+
paddingBottom: properties,
|
|
17
|
+
paddingTop: properties,
|
|
18
|
+
paddingLeft: properties,
|
|
19
|
+
paddingRight: properties,
|
|
20
|
+
},
|
|
21
|
+
shorthands: {
|
|
22
|
+
p: ["padding"],
|
|
23
|
+
pb: ["paddingBottom"],
|
|
24
|
+
pt: ["paddingTop"],
|
|
25
|
+
pl: ["paddingLeft"],
|
|
26
|
+
pr: ["paddingRight"],
|
|
27
|
+
pX: ["paddingLeft", "paddingRight"],
|
|
28
|
+
pY: ["paddingTop", "paddingBottom"],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineProperties } from "@vanilla-extract/sprinkles";
|
|
2
|
+
|
|
3
|
+
export const positionProperties = defineProperties({
|
|
4
|
+
conditions: {
|
|
5
|
+
mobile: {},
|
|
6
|
+
tablet: { "@media": "(min-width: 768px)" },
|
|
7
|
+
laptop: { "@media": "(min-width: 1024px)" },
|
|
8
|
+
desktop: { "@media": "(min-width: 1440px)" },
|
|
9
|
+
},
|
|
10
|
+
defaultCondition: "mobile",
|
|
11
|
+
properties: {
|
|
12
|
+
position: ["static", "relative", "absolute", "fixed"],
|
|
13
|
+
},
|
|
14
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineProperties } from "@vanilla-extract/sprinkles";
|
|
2
|
+
import { size } from "lodash";
|
|
3
|
+
import { persent, rem } from "../constants/constant.css";
|
|
4
|
+
|
|
5
|
+
const properties = { ...persent, ...size, ...rem };
|
|
6
|
+
|
|
7
|
+
export const sizeProperties = defineProperties({
|
|
8
|
+
conditions: {
|
|
9
|
+
mobile: {},
|
|
10
|
+
tablet: { "@media": "(min-width: 768px)" },
|
|
11
|
+
laptop: { "@media": "(min-width: 1024px)" },
|
|
12
|
+
desktop: { "@media": "(min-width: 1440px)" },
|
|
13
|
+
},
|
|
14
|
+
defaultCondition: "mobile",
|
|
15
|
+
properties: {
|
|
16
|
+
width: properties,
|
|
17
|
+
height: properties,
|
|
18
|
+
},
|
|
19
|
+
shorthands: {
|
|
20
|
+
w: ["width"],
|
|
21
|
+
h: ["height"],
|
|
22
|
+
},
|
|
23
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGlobalTheme,
|
|
3
|
+
createTheme,
|
|
4
|
+
createThemeContract,
|
|
5
|
+
} from "@vanilla-extract/css";
|
|
6
|
+
|
|
7
|
+
const root = createGlobalTheme(":root", {
|
|
8
|
+
fonts: {
|
|
9
|
+
heading: "Georgia, Times, Times New Roman, serif",
|
|
10
|
+
// body: 'NanumSquareL, sans-serif'
|
|
11
|
+
},
|
|
12
|
+
gradient: {
|
|
13
|
+
purple: "linear-gradient(45deg,#8e2de2, #4a00e0)",
|
|
14
|
+
bluePurple:
|
|
15
|
+
"radial-gradient( circle farthest-corner at 11.7% 80.6%, rgba(249,185,255,1) 0%, rgba(177,172,255,1) 49.3%, rgba(98,203,255,1) 89% );",
|
|
16
|
+
green:
|
|
17
|
+
"linear-gradient( 68.4deg, rgba(99,251,215,1) -0.4%, rgba(5,222,250,1) 100.2% );",
|
|
18
|
+
lightGreen:
|
|
19
|
+
"linear-gradient( 68.4deg, rgba(176,255,237,1) -0.4%, rgba(161,244,255,1) 100.2% );",
|
|
20
|
+
red: "linear-gradient( 68.3deg, rgba(245,177,97,1) 0.4%, rgba(236,54,110,1) 100.2% );",
|
|
21
|
+
pink: "radial-gradient( circle farthest-corner at 10.2% 55.8%, rgba(252,37,103,1) 0%, rgba(250,38,151,1) 46.2%, rgba(186,8,181,1) 90.1% );",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const themes = createThemeContract<{
|
|
26
|
+
background?: string;
|
|
27
|
+
scrollBarTrack?: string;
|
|
28
|
+
comment?: string;
|
|
29
|
+
textarea?: string;
|
|
30
|
+
sunmoon?: string;
|
|
31
|
+
text: {
|
|
32
|
+
normal?: string;
|
|
33
|
+
reverse?: string;
|
|
34
|
+
};
|
|
35
|
+
tag?: string;
|
|
36
|
+
code?: string;
|
|
37
|
+
blockquote?: string;
|
|
38
|
+
placeholder?: string;
|
|
39
|
+
glass: {
|
|
40
|
+
normal?: string;
|
|
41
|
+
reverse?: string;
|
|
42
|
+
};
|
|
43
|
+
debug?: string;
|
|
44
|
+
toc: {
|
|
45
|
+
selected?: string;
|
|
46
|
+
notSelected?: string;
|
|
47
|
+
};
|
|
48
|
+
}>({
|
|
49
|
+
background: null,
|
|
50
|
+
scrollBarTrack: null,
|
|
51
|
+
comment: null,
|
|
52
|
+
textarea: null,
|
|
53
|
+
sunmoon: null,
|
|
54
|
+
text: {
|
|
55
|
+
normal: null,
|
|
56
|
+
reverse: null,
|
|
57
|
+
},
|
|
58
|
+
tag: null,
|
|
59
|
+
code: null,
|
|
60
|
+
blockquote: null,
|
|
61
|
+
placeholder: null,
|
|
62
|
+
glass: {
|
|
63
|
+
normal: null,
|
|
64
|
+
reverse: null,
|
|
65
|
+
},
|
|
66
|
+
debug: null,
|
|
67
|
+
toc: {
|
|
68
|
+
selected: null,
|
|
69
|
+
notSelected: null,
|
|
70
|
+
},
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
export const darkTheme = createTheme(themes, {
|
|
74
|
+
background: "rgb(13, 17, 23)",
|
|
75
|
+
scrollBarTrack: "rgb(40, 46, 53)",
|
|
76
|
+
comment: "rgb(50, 50, 50)",
|
|
77
|
+
textarea: "rgb(50, 50, 50)",
|
|
78
|
+
sunmoon: "#ff594e",
|
|
79
|
+
text: {
|
|
80
|
+
normal: "#FFFFFF",
|
|
81
|
+
reverse: "#000000",
|
|
82
|
+
},
|
|
83
|
+
tag: "rgb(51 65 85)",
|
|
84
|
+
code: "rgb(54, 54, 54)",
|
|
85
|
+
blockquote: "rgb(50, 50, 50)",
|
|
86
|
+
placeholder: "rgb(75 85 99)",
|
|
87
|
+
glass: {
|
|
88
|
+
normal: "rgba(0, 0, 0, 0.2)",
|
|
89
|
+
reverse: "rgba(255, 255, 255, 0.8)",
|
|
90
|
+
},
|
|
91
|
+
debug: "rgba(31, 41, 55, 0.8)",
|
|
92
|
+
toc: {
|
|
93
|
+
selected: "rgb(243 244 246)",
|
|
94
|
+
notSelected: "rgb(156 163 175)",
|
|
95
|
+
},
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
export const vars = { ...root, themes };
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"useDefineForClassFields": true,
|
|
5
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
6
|
+
"module": "ESNext",
|
|
7
|
+
"skipLibCheck": true,
|
|
8
|
+
|
|
9
|
+
/* Bundler mode */
|
|
10
|
+
"moduleResolution": "bundler",
|
|
11
|
+
"allowImportingTsExtensions": true,
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": true,
|
|
15
|
+
"jsx": "react-jsx"
|
|
16
|
+
|
|
17
|
+
/* Linting */
|
|
18
|
+
// "strict": true,
|
|
19
|
+
// "noUnusedLocals": true,
|
|
20
|
+
// "noUnusedParameters": true,
|
|
21
|
+
// "noFallthroughCasesInSwitch": true,
|
|
22
|
+
|
|
23
|
+
/* Other */
|
|
24
|
+
},
|
|
25
|
+
"include": ["src", "examples"],
|
|
26
|
+
"references": [{ "path": "./tsconfig.node.json" }]
|
|
27
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
|
2
|
+
import react from "@vitejs/plugin-react-swc";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
base: "/gaesup-world/",
|
|
8
|
+
plugins: [react(), vanillaExtractPlugin()],
|
|
9
|
+
});
|