gaesup-world 0.2.21 → 0.2.23
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/package.json +5 -2
- package/dist/gaesup/animation/actions.d.ts +0 -44
- package/dist/gaesup/animation/actions.js +0 -103
- package/dist/gaesup/camera/control/normal.d.ts +0 -4
- package/dist/gaesup/camera/control/normal.js +0 -18
- package/dist/gaesup/camera/control/orbit.d.ts +0 -4
- package/dist/gaesup/camera/control/orbit.js +0 -22
- package/dist/gaesup/camera/detector/index.d.ts +0 -2
- package/dist/gaesup/camera/detector/index.js +0 -25
- package/dist/gaesup/camera/index.d.ts +0 -8
- package/dist/gaesup/camera/index.js +0 -139
- package/dist/gaesup/camera/type.d.ts +0 -13
- package/dist/gaesup/camera/type.js +0 -1
- package/dist/gaesup/component/active/airplane/index.d.ts +0 -11
- package/dist/gaesup/component/active/airplane/index.js +0 -6
- package/dist/gaesup/component/active/character/index.d.ts +0 -7
- package/dist/gaesup/component/active/character/index.js +0 -34
- package/dist/gaesup/component/active/vehicle/index.d.ts +0 -12
- package/dist/gaesup/component/active/vehicle/index.js +0 -31
- package/dist/gaesup/component/index.d.ts +0 -7
- package/dist/gaesup/component/index.js +0 -19
- package/dist/gaesup/component/inner/airplane/index.d.ts +0 -2
- package/dist/gaesup/component/inner/airplane/index.js +0 -16
- package/dist/gaesup/component/inner/character/index.d.ts +0 -25
- package/dist/gaesup/component/inner/character/index.js +0 -28
- package/dist/gaesup/component/inner/common/InnerGroupRef.d.ts +0 -10
- package/dist/gaesup/component/inner/common/InnerGroupRef.js +0 -29
- package/dist/gaesup/component/inner/common/OuterGroupRef.d.ts +0 -4
- package/dist/gaesup/component/inner/common/OuterGroupRef.js +0 -6
- package/dist/gaesup/component/inner/common/RigidbodyRef.d.ts +0 -12
- package/dist/gaesup/component/inner/common/RigidbodyRef.js +0 -7
- package/dist/gaesup/component/inner/common/setGroundRay.d.ts +0 -9
- package/dist/gaesup/component/inner/common/setGroundRay.js +0 -14
- package/dist/gaesup/component/inner/common/type.d.ts +0 -20
- package/dist/gaesup/component/inner/common/type.js +0 -1
- package/dist/gaesup/component/inner/rider/index.d.ts +0 -11
- package/dist/gaesup/component/inner/rider/index.js +0 -31
- package/dist/gaesup/component/inner/vehicle/collider.d.ts +0 -10
- package/dist/gaesup/component/inner/vehicle/collider.js +0 -19
- package/dist/gaesup/component/inner/vehicle/index.d.ts +0 -2
- package/dist/gaesup/component/inner/vehicle/index.js +0 -17
- package/dist/gaesup/component/inner/vehicle/wheels.d.ts +0 -7
- package/dist/gaesup/component/inner/vehicle/wheels.js +0 -64
- package/dist/gaesup/component/passive/airplane/index.d.ts +0 -13
- package/dist/gaesup/component/passive/airplane/index.js +0 -40
- package/dist/gaesup/component/passive/character/index.d.ts +0 -10
- package/dist/gaesup/component/passive/character/index.js +0 -46
- package/dist/gaesup/component/passive/type.d.ts +0 -20
- package/dist/gaesup/component/passive/type.js +0 -1
- package/dist/gaesup/component/passive/vehicle/index.d.ts +0 -13
- package/dist/gaesup/component/passive/vehicle/index.js +0 -17
- package/dist/gaesup/component/type.d.ts +0 -17
- package/dist/gaesup/component/type.js +0 -1
- package/dist/gaesup/controller/context/index.d.ts +0 -49
- package/dist/gaesup/controller/context/index.js +0 -59
- package/dist/gaesup/controller/context/reducer.d.ts +0 -12
- package/dist/gaesup/controller/context/reducer.js +0 -21
- package/dist/gaesup/controller/context/type.d.ts +0 -38
- package/dist/gaesup/controller/context/type.js +0 -1
- package/dist/gaesup/controller/debug/airplane.d.ts +0 -71
- package/dist/gaesup/controller/debug/airplane.js +0 -71
- package/dist/gaesup/controller/debug/character.d.ts +0 -27
- package/dist/gaesup/controller/debug/character.js +0 -27
- package/dist/gaesup/controller/debug/index.d.ts +0 -6
- package/dist/gaesup/controller/debug/index.js +0 -49
- package/dist/gaesup/controller/debug/vehicle.d.ts +0 -27
- package/dist/gaesup/controller/debug/vehicle.js +0 -27
- package/dist/gaesup/controller/index.d.ts +0 -3
- package/dist/gaesup/controller/index.js +0 -74
- package/dist/gaesup/controller/initialize/callback/index.d.ts +0 -2
- package/dist/gaesup/controller/initialize/callback/index.js +0 -62
- package/dist/gaesup/controller/initialize/callback/type.d.ts +0 -27
- package/dist/gaesup/controller/initialize/callback/type.js +0 -1
- package/dist/gaesup/controller/initialize/index.d.ts +0 -10
- package/dist/gaesup/controller/initialize/index.js +0 -75
- package/dist/gaesup/controller/type.d.ts +0 -85
- package/dist/gaesup/controller/type.js +0 -1
- package/dist/gaesup/gaesupProps/index.d.ts +0 -7
- package/dist/gaesup/gaesupProps/index.js +0 -46
- package/dist/gaesup/hooks/useGaesupAnimation/index.d.ts +0 -10
- package/dist/gaesup/hooks/useGaesupAnimation/index.js +0 -95
- package/dist/gaesup/hooks/useGaesupController/index.d.ts +0 -10
- package/dist/gaesup/hooks/useGaesupController/index.js +0 -14
- package/dist/gaesup/hooks/useGaesupGltf/index.d.ts +0 -25
- package/dist/gaesup/hooks/useGaesupGltf/index.js +0 -73
- package/dist/gaesup/hooks/useJoyStick/index.d.ts +0 -39
- package/dist/gaesup/hooks/useJoyStick/index.js +0 -61
- package/dist/gaesup/hooks/usePushKey/index.d.ts +0 -3
- package/dist/gaesup/hooks/usePushKey/index.js +0 -29
- package/dist/gaesup/hooks/useRideable/index.d.ts +0 -28
- package/dist/gaesup/hooks/useRideable/index.js +0 -199
- package/dist/gaesup/hooks/useTeleport/index.d.ts +0 -3
- package/dist/gaesup/hooks/useTeleport/index.js +0 -12
- package/dist/gaesup/physics/airplane/damping.d.ts +0 -2
- package/dist/gaesup/physics/airplane/damping.js +0 -5
- package/dist/gaesup/physics/airplane/direction.d.ts +0 -2
- package/dist/gaesup/physics/airplane/direction.js +0 -65
- package/dist/gaesup/physics/airplane/gravity.d.ts +0 -14
- package/dist/gaesup/physics/airplane/gravity.js +0 -18
- package/dist/gaesup/physics/airplane/impulse.d.ts +0 -16
- package/dist/gaesup/physics/airplane/impulse.js +0 -31
- package/dist/gaesup/physics/airplane/index.d.ts +0 -2
- package/dist/gaesup/physics/airplane/index.js +0 -14
- package/dist/gaesup/physics/airplane/innerCalc.d.ts +0 -2
- package/dist/gaesup/physics/airplane/innerCalc.js +0 -27
- package/dist/gaesup/physics/airplane/landing.d.ts +0 -2
- package/dist/gaesup/physics/airplane/landing.js +0 -29
- package/dist/gaesup/physics/character/direction.d.ts +0 -23
- package/dist/gaesup/physics/character/direction.js +0 -55
- package/dist/gaesup/physics/character/impulse.d.ts +0 -2
- package/dist/gaesup/physics/character/impulse.js +0 -43
- package/dist/gaesup/physics/character/index.d.ts +0 -2
- package/dist/gaesup/physics/character/index.js +0 -8
- package/dist/gaesup/physics/character/innerCalc.d.ts +0 -2
- package/dist/gaesup/physics/character/innerCalc.js +0 -31
- package/dist/gaesup/physics/check/ground.d.ts +0 -2
- package/dist/gaesup/physics/check/ground.js +0 -15
- package/dist/gaesup/physics/check/index.d.ts +0 -2
- package/dist/gaesup/physics/check/index.js +0 -12
- package/dist/gaesup/physics/check/moving.d.ts +0 -2
- package/dist/gaesup/physics/check/moving.js +0 -16
- package/dist/gaesup/physics/check/push.d.ts +0 -2
- package/dist/gaesup/physics/check/push.js +0 -6
- package/dist/gaesup/physics/check/riding.d.ts +0 -2
- package/dist/gaesup/physics/check/riding.js +0 -7
- package/dist/gaesup/physics/check/rotate.d.ts +0 -2
- package/dist/gaesup/physics/check/rotate.js +0 -8
- package/dist/gaesup/physics/index.d.ts +0 -2
- package/dist/gaesup/physics/index.js +0 -58
- package/dist/gaesup/physics/type.d.ts +0 -36
- package/dist/gaesup/physics/type.js +0 -1
- package/dist/gaesup/physics/vehicle/damping.d.ts +0 -2
- package/dist/gaesup/physics/vehicle/damping.js +0 -6
- package/dist/gaesup/physics/vehicle/direction.d.ts +0 -4
- package/dist/gaesup/physics/vehicle/direction.js +0 -30
- package/dist/gaesup/physics/vehicle/impulse.d.ts +0 -16
- package/dist/gaesup/physics/vehicle/impulse.js +0 -40
- package/dist/gaesup/physics/vehicle/index.d.ts +0 -2
- package/dist/gaesup/physics/vehicle/index.js +0 -12
- package/dist/gaesup/physics/vehicle/innerCalc.d.ts +0 -2
- package/dist/gaesup/physics/vehicle/innerCalc.js +0 -24
- package/dist/gaesup/physics/vehicle/landing.d.ts +0 -2
- package/dist/gaesup/physics/vehicle/landing.js +0 -29
- package/dist/gaesup/tools/gameBoy/GameBoyButton.d.ts +0 -9
- package/dist/gaesup/tools/gameBoy/GameBoyButton.js +0 -16
- package/dist/gaesup/tools/gameBoy/index.d.ts +0 -8
- package/dist/gaesup/tools/gameBoy/index.js +0 -22
- package/dist/gaesup/tools/gameBoy/type.d.ts +0 -4
- package/dist/gaesup/tools/gameBoy/type.js +0 -1
- package/dist/gaesup/tools/gamePad/GamePadButton.d.ts +0 -8
- package/dist/gaesup/tools/gamePad/GamePadButton.js +0 -21
- package/dist/gaesup/tools/gamePad/index.d.ts +0 -6
- package/dist/gaesup/tools/gamePad/index.js +0 -32
- package/dist/gaesup/tools/gamePad/type.d.ts +0 -6
- package/dist/gaesup/tools/gamePad/type.js +0 -1
- package/dist/gaesup/tools/joyStick/index.d.ts +0 -6
- package/dist/gaesup/tools/joyStick/index.js +0 -169
- package/dist/gaesup/tools/joyStick/type.d.ts +0 -19
- package/dist/gaesup/tools/joyStick/type.js +0 -1
- package/dist/gaesup/tools/jumpPortal/index.d.ts +0 -16
- package/dist/gaesup/tools/jumpPortal/index.js +0 -18
- package/dist/gaesup/tools/keyBoardToolTip/constant.d.ts +0 -402
- package/dist/gaesup/tools/keyBoardToolTip/constant.js +0 -122
- package/dist/gaesup/tools/keyBoardToolTip/default.d.ts +0 -10
- package/dist/gaesup/tools/keyBoardToolTip/default.js +0 -12
- package/dist/gaesup/tools/keyBoardToolTip/index.d.ts +0 -3
- package/dist/gaesup/tools/keyBoardToolTip/index.js +0 -70
- package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +0 -37
- package/dist/gaesup/tools/keyBoardToolTip/type.js +0 -1
- package/dist/gaesup/tools/miniMap/default.d.ts +0 -9
- package/dist/gaesup/tools/miniMap/default.js +0 -9
- package/dist/gaesup/tools/miniMap/index.d.ts +0 -3
- package/dist/gaesup/tools/miniMap/index.js +0 -72
- package/dist/gaesup/tools/miniMap/type.d.ts +0 -25
- package/dist/gaesup/tools/miniMap/type.js +0 -1
- package/dist/gaesup/tools/rideable/index.d.ts +0 -3
- package/dist/gaesup/tools/rideable/index.js +0 -79
- package/dist/gaesup/tools/type.d.ts +0 -2
- package/dist/gaesup/tools/type.js +0 -1
- package/dist/gaesup/tools/zoomButton/index.d.ts +0 -18
- package/dist/gaesup/tools/zoomButton/index.js +0 -146
- package/dist/gaesup/utils/context.d.ts +0 -2
- package/dist/gaesup/utils/context.js +0 -3
- package/dist/gaesup/utils/debug.d.ts +0 -29
- package/dist/gaesup/utils/debug.js +0 -36
- package/dist/gaesup/utils/index.d.ts +0 -3
- package/dist/gaesup/utils/index.js +0 -3
- package/dist/gaesup/utils/ray.d.ts +0 -7
- package/dist/gaesup/utils/ray.js +0 -6
- package/dist/gaesup/utils/ref.d.ts +0 -2
- package/dist/gaesup/utils/ref.js +0 -16
- package/dist/gaesup/utils/type.d.ts +0 -5
- package/dist/gaesup/utils/type.js +0 -1
- package/dist/gaesup/utils/vector.d.ts +0 -10
- package/dist/gaesup/utils/vector.js +0 -33
- package/dist/gaesup/world/context/index.d.ts +0 -6
- package/dist/gaesup/world/context/index.js +0 -117
- package/dist/gaesup/world/context/reducer.d.ts +0 -29
- package/dist/gaesup/world/context/reducer.js +0 -21
- package/dist/gaesup/world/context/type.d.ts +0 -169
- package/dist/gaesup/world/context/type.js +0 -1
- package/dist/gaesup/world/debug/cameraOption.d.ts +0 -47
- package/dist/gaesup/world/debug/cameraOption.js +0 -47
- package/dist/gaesup/world/debug/index.d.ts +0 -6
- package/dist/gaesup/world/debug/index.js +0 -32
- package/dist/gaesup/world/debug/mode.d.ts +0 -10
- package/dist/gaesup/world/debug/mode.js +0 -10
- package/dist/gaesup/world/index.d.ts +0 -3
- package/dist/gaesup/world/index.js +0 -9
- package/dist/gaesup/world/initalize/index.d.ts +0 -35
- package/dist/gaesup/world/initalize/index.js +0 -62
- package/dist/gaesup/world/type.d.ts +0 -19
- package/dist/gaesup/world/type.js +0 -1
- package/dist/index.d.ts +0 -23
- package/index.ts +0 -29
- package/yarn-error.log +0 -12152
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
|
-
import { useCallback, useContext, useEffect, useRef, useState, } from "react";
|
|
14
|
-
import useJoyStick from "../../hooks/useJoyStick";
|
|
15
|
-
import { GaesupWorldContext } from "../../world/context";
|
|
16
|
-
import "./style.css";
|
|
17
|
-
export function JoyStick(props) {
|
|
18
|
-
var outerRef = useRef(null);
|
|
19
|
-
var childRef = useRef(null);
|
|
20
|
-
var joyStickBallStyle = props.joyStickBallStyle, joyStickStyle = props.joyStickStyle;
|
|
21
|
-
var mode = useContext(GaesupWorldContext).mode;
|
|
22
|
-
var _a = useJoyStick(), joyStickBall = _a.joyStickBall, joyStickOrigin = _a.joyStickOrigin, setBall = _a.setBall, setOrigin = _a.setOrigin;
|
|
23
|
-
var _b = useState({
|
|
24
|
-
mouseDown: false,
|
|
25
|
-
touchDown: false,
|
|
26
|
-
position: "absolute",
|
|
27
|
-
transform: "",
|
|
28
|
-
background: "rgba(0, 0, 0, 0.5)",
|
|
29
|
-
boxShadow: "0 0 10px rgba(0, 0, 0, 0.5)",
|
|
30
|
-
}), state = _b[0], setState = _b[1];
|
|
31
|
-
var _c = useState({
|
|
32
|
-
top: 0,
|
|
33
|
-
left: 0,
|
|
34
|
-
bottom: 0,
|
|
35
|
-
right: 0,
|
|
36
|
-
width: 0,
|
|
37
|
-
height: 0,
|
|
38
|
-
}), screenSize = _c[0], setScreenSize = _c[1];
|
|
39
|
-
var initBall = function () {
|
|
40
|
-
setState(function (state) { return (__assign(__assign({}, state), { position: "absolute", transform: "translate(-50%, -50%)", background: "rgba(0, 0, 0, 0.5)", boxShadow: "0 0 10px rgba(0, 0, 0, 0.5)" })); });
|
|
41
|
-
setBall({
|
|
42
|
-
top: "50%",
|
|
43
|
-
left: "50%",
|
|
44
|
-
});
|
|
45
|
-
};
|
|
46
|
-
var setMouseDown = function (value) {
|
|
47
|
-
setState(function (state) { return (__assign(__assign({}, state), { mouseDown: value })); });
|
|
48
|
-
};
|
|
49
|
-
var setTouchDown = function (value) {
|
|
50
|
-
setState(function (state) { return (__assign(__assign({}, state), { touchDown: value })); });
|
|
51
|
-
};
|
|
52
|
-
var initialize = function () {
|
|
53
|
-
var client = outerRef.current.getBoundingClientRect();
|
|
54
|
-
var x = client.left + client.width / 2;
|
|
55
|
-
var y = client.top + client.height / 2;
|
|
56
|
-
setScreenSize(function () { return ({
|
|
57
|
-
top: client.top,
|
|
58
|
-
left: client.left,
|
|
59
|
-
bottom: client.bottom,
|
|
60
|
-
right: client.right,
|
|
61
|
-
width: client.width,
|
|
62
|
-
height: client.height,
|
|
63
|
-
}); });
|
|
64
|
-
setOrigin({
|
|
65
|
-
x: x,
|
|
66
|
-
y: y,
|
|
67
|
-
angle: Math.PI / 2,
|
|
68
|
-
currentRadius: 0,
|
|
69
|
-
originRadius: 0,
|
|
70
|
-
isIn: true,
|
|
71
|
-
isOn: false,
|
|
72
|
-
isCenter: true,
|
|
73
|
-
isUp: true,
|
|
74
|
-
});
|
|
75
|
-
initBall();
|
|
76
|
-
};
|
|
77
|
-
var resize = function () {
|
|
78
|
-
if (!outerRef.current)
|
|
79
|
-
return;
|
|
80
|
-
var client = outerRef.current.getBoundingClientRect();
|
|
81
|
-
setScreenSize(function () { return ({
|
|
82
|
-
top: client.top,
|
|
83
|
-
left: client.left,
|
|
84
|
-
bottom: client.bottom,
|
|
85
|
-
right: client.right,
|
|
86
|
-
width: client.width,
|
|
87
|
-
height: client.height,
|
|
88
|
-
}); });
|
|
89
|
-
};
|
|
90
|
-
var calcOriginBall = function (X, Y) {
|
|
91
|
-
var top = screenSize.top, left = screenSize.left, bottom = screenSize.bottom, right = screenSize.right, width = screenSize.width, height = screenSize.height;
|
|
92
|
-
if (top > Y || bottom < Y || left > X || right < X) {
|
|
93
|
-
return;
|
|
94
|
-
}
|
|
95
|
-
var dx = joyStickOrigin.x - X;
|
|
96
|
-
var dy = joyStickOrigin.y - Y;
|
|
97
|
-
var normX = Math.pow(dx, 2);
|
|
98
|
-
var normY = Math.pow(dy, 2);
|
|
99
|
-
var currentRadius = Math.sqrt(normX + normY);
|
|
100
|
-
var originRadius = Math.sqrt(Math.pow((width / 2), 2) + Math.pow((height / 2), 2));
|
|
101
|
-
var newAngle = Math.atan2(Y - (bottom - height / 2), X - (left + width / 2));
|
|
102
|
-
if (currentRadius >= width / 2) {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
setOrigin({
|
|
106
|
-
x: left + width / 2,
|
|
107
|
-
y: bottom - height / 2,
|
|
108
|
-
angle: newAngle,
|
|
109
|
-
currentRadius: currentRadius,
|
|
110
|
-
originRadius: originRadius,
|
|
111
|
-
isIn: currentRadius > originRadius / 2,
|
|
112
|
-
isOn: true,
|
|
113
|
-
isCenter: currentRadius < originRadius / 8,
|
|
114
|
-
isUp: top > Y - height / 2,
|
|
115
|
-
});
|
|
116
|
-
setState(function (state) { return (__assign(__assign({}, state), { position: "fixed", background: currentRadius > originRadius / 2
|
|
117
|
-
? "linear-gradient( 68.4deg, rgba(176,255,237,1) -0.4%, rgba(161,244,255,1) 100.2% )"
|
|
118
|
-
: "linear-gradient( 68.4deg, rgba(99,251,215,1) -0.4%, rgba(5,222,250,1) 100.2% )", boxShadow: "0 0 10px rgba(99,251,215,1)" })); });
|
|
119
|
-
setBall({
|
|
120
|
-
top: "".concat(Y, "px"),
|
|
121
|
-
left: "".concat(X, "px"),
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
var handleMouseOver = function (e) {
|
|
125
|
-
if (!state.mouseDown)
|
|
126
|
-
return;
|
|
127
|
-
e.preventDefault();
|
|
128
|
-
calcOriginBall(e.clientX, e.clientY);
|
|
129
|
-
};
|
|
130
|
-
var handleTouchMove = function (e) {
|
|
131
|
-
if (!state.touchDown)
|
|
132
|
-
return;
|
|
133
|
-
calcOriginBall(e.touches[0].pageX, e.touches[0].pageY);
|
|
134
|
-
};
|
|
135
|
-
var handleTouchEnd = useCallback(function (e) {
|
|
136
|
-
setState(function (state) { return (__assign(__assign({}, state), { touchDown: false })); });
|
|
137
|
-
return initialize();
|
|
138
|
-
}, [setBall, setState, setOrigin, state.touchDown]);
|
|
139
|
-
var handleMouseOut = useCallback(function (e) {
|
|
140
|
-
setState(function (state) { return (__assign(__assign({}, state), { mouseDown: false })); });
|
|
141
|
-
e.preventDefault();
|
|
142
|
-
return initialize();
|
|
143
|
-
}, [setBall, setState, setOrigin, state.mouseDown]);
|
|
144
|
-
useEffect(function () {
|
|
145
|
-
window.addEventListener("resize", resize);
|
|
146
|
-
}, []);
|
|
147
|
-
useEffect(function () {
|
|
148
|
-
if (outerRef.current) {
|
|
149
|
-
initialize();
|
|
150
|
-
}
|
|
151
|
-
}, [mode.controller]);
|
|
152
|
-
return (_jsx(_Fragment, { children: mode.controller === "joystick" && (_jsx("div", { className: "joyStick", style: __assign({ position: "fixed" }, joyStickStyle), ref: outerRef, onMouseDown: function (e) {
|
|
153
|
-
e.preventDefault();
|
|
154
|
-
setMouseDown(true);
|
|
155
|
-
}, onMouseUp: function (e) {
|
|
156
|
-
e.preventDefault();
|
|
157
|
-
setMouseDown(false);
|
|
158
|
-
}, onMouseMove: handleMouseOver, onMouseLeave: handleMouseOut, onTouchStart: function (e) {
|
|
159
|
-
setTouchDown(true);
|
|
160
|
-
}, onTouchEnd: handleTouchEnd, onTouchMove: handleTouchMove, onTouchCancel: handleTouchEnd, children: _jsx("div", { className: "joystickBall", ref: childRef, onMouseDown: function (e) {
|
|
161
|
-
e.preventDefault();
|
|
162
|
-
setMouseDown(true);
|
|
163
|
-
}, onMouseUp: function (e) {
|
|
164
|
-
e.preventDefault();
|
|
165
|
-
setMouseDown(false);
|
|
166
|
-
}, onMouseMove: handleMouseOver, onMouseLeave: handleMouseOut, onTouchStart: function (e) {
|
|
167
|
-
setTouchDown(true);
|
|
168
|
-
}, onTouchEnd: handleTouchEnd, onTouchMove: handleTouchMove, onTouchCancel: handleTouchEnd, style: __assign({ position: state.position, transform: state.transform, background: (joyStickBallStyle === null || joyStickBallStyle === void 0 ? void 0 : joyStickBallStyle.background) || state.background, boxShadow: (joyStickBallStyle === null || joyStickBallStyle === void 0 ? void 0 : joyStickBallStyle.boxShadow) || state.boxShadow, top: joyStickBall.top, left: joyStickBall.left }, joyStickBallStyle) }) })) }));
|
|
169
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export type joyStickBallType = {
|
|
2
|
-
left: string;
|
|
3
|
-
top: string;
|
|
4
|
-
};
|
|
5
|
-
export type joyStickOriginType = {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
angle: number;
|
|
9
|
-
currentRadius: number;
|
|
10
|
-
originRadius: number;
|
|
11
|
-
isIn: boolean;
|
|
12
|
-
isOn: boolean;
|
|
13
|
-
isUp: boolean;
|
|
14
|
-
isCenter: boolean;
|
|
15
|
-
};
|
|
16
|
-
export type joyStickInnerType = {
|
|
17
|
-
joyStickBall?: joyStickBallType;
|
|
18
|
-
joyStickOrigin?: joyStickOriginType;
|
|
19
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from "react";
|
|
2
|
-
import "./style.css";
|
|
3
|
-
export type JumpPortalType = {
|
|
4
|
-
text?: string;
|
|
5
|
-
position: THREE.Vector3;
|
|
6
|
-
jumpPortalStyle?: CSSProperties;
|
|
7
|
-
};
|
|
8
|
-
/**
|
|
9
|
-
* JumpPortal component represents a clickable portal that teleports the user to a specified location.
|
|
10
|
-
*
|
|
11
|
-
* @param {JumpPortalType} props - The props for the JumpPortal component.
|
|
12
|
-
* @param {string} props.text - (Optional) The text to display on the portal.
|
|
13
|
-
* @param {THREE.Vector3} props.position - The target position to teleport to.
|
|
14
|
-
* @param {CSSProperties} props.jumpPortalStyle - (Optional) CSS styles for the JumpPortal component.
|
|
15
|
-
*/
|
|
16
|
-
export declare function JumpPortal({ text, position, jumpPortalStyle, }: JumpPortalType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useTeleport } from "../../hooks/useTeleport";
|
|
3
|
-
import "./style.css";
|
|
4
|
-
/**
|
|
5
|
-
* JumpPortal component represents a clickable portal that teleports the user to a specified location.
|
|
6
|
-
*
|
|
7
|
-
* @param {JumpPortalType} props - The props for the JumpPortal component.
|
|
8
|
-
* @param {string} props.text - (Optional) The text to display on the portal.
|
|
9
|
-
* @param {THREE.Vector3} props.position - The target position to teleport to.
|
|
10
|
-
* @param {CSSProperties} props.jumpPortalStyle - (Optional) CSS styles for the JumpPortal component.
|
|
11
|
-
*/
|
|
12
|
-
export function JumpPortal(_a) {
|
|
13
|
-
var text = _a.text, position = _a.position, jumpPortalStyle = _a.jumpPortalStyle;
|
|
14
|
-
var Teleport = useTeleport().Teleport;
|
|
15
|
-
return (_jsx("div", { className: "jumpPortal", onClick: function () {
|
|
16
|
-
Teleport(position);
|
|
17
|
-
}, style: jumpPortalStyle, children: text }));
|
|
18
|
-
}
|
|
@@ -1,402 +0,0 @@
|
|
|
1
|
-
import { keyBoardMapType } from "./type";
|
|
2
|
-
export declare const KeyboardF: {
|
|
3
|
-
ESC: {
|
|
4
|
-
name: string;
|
|
5
|
-
gridRow: string;
|
|
6
|
-
gridColumn: string;
|
|
7
|
-
};
|
|
8
|
-
F1: {
|
|
9
|
-
name: string;
|
|
10
|
-
gridRow: string;
|
|
11
|
-
gridColumn: string;
|
|
12
|
-
};
|
|
13
|
-
F2: {
|
|
14
|
-
name: string;
|
|
15
|
-
gridRow: string;
|
|
16
|
-
gridColumn: string;
|
|
17
|
-
};
|
|
18
|
-
F3: {
|
|
19
|
-
name: string;
|
|
20
|
-
gridRow: string;
|
|
21
|
-
gridColumn: string;
|
|
22
|
-
};
|
|
23
|
-
F4: {
|
|
24
|
-
name: string;
|
|
25
|
-
gridRow: string;
|
|
26
|
-
gridColumn: string;
|
|
27
|
-
};
|
|
28
|
-
F5: {
|
|
29
|
-
name: string;
|
|
30
|
-
gridRow: string;
|
|
31
|
-
gridColumn: string;
|
|
32
|
-
};
|
|
33
|
-
F6: {
|
|
34
|
-
name: string;
|
|
35
|
-
gridRow: string;
|
|
36
|
-
gridColumn: string;
|
|
37
|
-
};
|
|
38
|
-
F7: {
|
|
39
|
-
name: string;
|
|
40
|
-
gridRow: string;
|
|
41
|
-
gridColumn: string;
|
|
42
|
-
};
|
|
43
|
-
F8: {
|
|
44
|
-
name: string;
|
|
45
|
-
gridRow: string;
|
|
46
|
-
gridColumn: string;
|
|
47
|
-
};
|
|
48
|
-
F9: {
|
|
49
|
-
name: string;
|
|
50
|
-
gridRow: string;
|
|
51
|
-
gridColumn: string;
|
|
52
|
-
};
|
|
53
|
-
F10: {
|
|
54
|
-
name: string;
|
|
55
|
-
gridRow: string;
|
|
56
|
-
gridColumn: string;
|
|
57
|
-
};
|
|
58
|
-
F11: {
|
|
59
|
-
name: string;
|
|
60
|
-
gridRow: string;
|
|
61
|
-
gridColumn: string;
|
|
62
|
-
};
|
|
63
|
-
F12: {
|
|
64
|
-
name: string;
|
|
65
|
-
gridRow: string;
|
|
66
|
-
gridColumn: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
export declare const KeyboardOne: {
|
|
70
|
-
Backquote: {
|
|
71
|
-
name: string;
|
|
72
|
-
gridRow: string;
|
|
73
|
-
gridColumn: string;
|
|
74
|
-
};
|
|
75
|
-
Digit1: {
|
|
76
|
-
name: string;
|
|
77
|
-
gridRow: string;
|
|
78
|
-
gridColumn: string;
|
|
79
|
-
};
|
|
80
|
-
Digit2: {
|
|
81
|
-
name: string;
|
|
82
|
-
gridRow: string;
|
|
83
|
-
gridColumn: string;
|
|
84
|
-
};
|
|
85
|
-
Digit3: {
|
|
86
|
-
name: string;
|
|
87
|
-
gridRow: string;
|
|
88
|
-
gridColumn: string;
|
|
89
|
-
};
|
|
90
|
-
Digit4: {
|
|
91
|
-
name: string;
|
|
92
|
-
gridRow: string;
|
|
93
|
-
gridColumn: string;
|
|
94
|
-
};
|
|
95
|
-
Digit5: {
|
|
96
|
-
name: string;
|
|
97
|
-
gridRow: string;
|
|
98
|
-
gridColumn: string;
|
|
99
|
-
};
|
|
100
|
-
Digit6: {
|
|
101
|
-
name: string;
|
|
102
|
-
gridRow: string;
|
|
103
|
-
gridColumn: string;
|
|
104
|
-
};
|
|
105
|
-
Digit7: {
|
|
106
|
-
name: string;
|
|
107
|
-
gridRow: string;
|
|
108
|
-
gridColumn: string;
|
|
109
|
-
};
|
|
110
|
-
Digit8: {
|
|
111
|
-
name: string;
|
|
112
|
-
gridRow: string;
|
|
113
|
-
gridColumn: string;
|
|
114
|
-
};
|
|
115
|
-
Digit9: {
|
|
116
|
-
name: string;
|
|
117
|
-
gridRow: string;
|
|
118
|
-
gridColumn: string;
|
|
119
|
-
};
|
|
120
|
-
Digit0: {
|
|
121
|
-
name: string;
|
|
122
|
-
gridRow: string;
|
|
123
|
-
gridColumn: string;
|
|
124
|
-
};
|
|
125
|
-
Minus: {
|
|
126
|
-
name: string;
|
|
127
|
-
gridRow: string;
|
|
128
|
-
gridColumn: string;
|
|
129
|
-
};
|
|
130
|
-
Equal: {
|
|
131
|
-
name: string;
|
|
132
|
-
gridRow: string;
|
|
133
|
-
gridColumn: string;
|
|
134
|
-
};
|
|
135
|
-
Backspace: {
|
|
136
|
-
name: string;
|
|
137
|
-
gridRow: string;
|
|
138
|
-
gridColumn: string;
|
|
139
|
-
};
|
|
140
|
-
};
|
|
141
|
-
export declare const KeyboardTwo: {
|
|
142
|
-
Tab: {
|
|
143
|
-
name: string;
|
|
144
|
-
gridRow: string;
|
|
145
|
-
gridColumn: string;
|
|
146
|
-
};
|
|
147
|
-
KeyQ: {
|
|
148
|
-
name: string;
|
|
149
|
-
gridRow: string;
|
|
150
|
-
gridColumn: string;
|
|
151
|
-
};
|
|
152
|
-
KeyW: {
|
|
153
|
-
name: string;
|
|
154
|
-
gridRow: string;
|
|
155
|
-
gridColumn: string;
|
|
156
|
-
};
|
|
157
|
-
KeyE: {
|
|
158
|
-
name: string;
|
|
159
|
-
gridRow: string;
|
|
160
|
-
gridColumn: string;
|
|
161
|
-
};
|
|
162
|
-
KeyR: {
|
|
163
|
-
name: string;
|
|
164
|
-
gridRow: string;
|
|
165
|
-
gridColumn: string;
|
|
166
|
-
};
|
|
167
|
-
KeyT: {
|
|
168
|
-
name: string;
|
|
169
|
-
gridRow: string;
|
|
170
|
-
gridColumn: string;
|
|
171
|
-
};
|
|
172
|
-
KeyY: {
|
|
173
|
-
name: string;
|
|
174
|
-
gridRow: string;
|
|
175
|
-
gridColumn: string;
|
|
176
|
-
};
|
|
177
|
-
KeyU: {
|
|
178
|
-
name: string;
|
|
179
|
-
gridRow: string;
|
|
180
|
-
gridColumn: string;
|
|
181
|
-
};
|
|
182
|
-
KeyI: {
|
|
183
|
-
name: string;
|
|
184
|
-
gridRow: string;
|
|
185
|
-
gridColumn: string;
|
|
186
|
-
};
|
|
187
|
-
KeyO: {
|
|
188
|
-
name: string;
|
|
189
|
-
gridRow: string;
|
|
190
|
-
gridColumn: string;
|
|
191
|
-
};
|
|
192
|
-
KeyP: {
|
|
193
|
-
name: string;
|
|
194
|
-
gridRow: string;
|
|
195
|
-
gridColumn: string;
|
|
196
|
-
};
|
|
197
|
-
BracketLeft: {
|
|
198
|
-
name: string;
|
|
199
|
-
gridRow: string;
|
|
200
|
-
gridColumn: string;
|
|
201
|
-
};
|
|
202
|
-
BracketRight: {
|
|
203
|
-
name: string;
|
|
204
|
-
gridRow: string;
|
|
205
|
-
gridColumn: string;
|
|
206
|
-
};
|
|
207
|
-
Backslash: {
|
|
208
|
-
name: string;
|
|
209
|
-
gridRow: string;
|
|
210
|
-
gridColumn: string;
|
|
211
|
-
};
|
|
212
|
-
};
|
|
213
|
-
export declare const KeyboardThree: {
|
|
214
|
-
CapsLock: {
|
|
215
|
-
name: string;
|
|
216
|
-
gridRow: string;
|
|
217
|
-
gridColumn: string;
|
|
218
|
-
};
|
|
219
|
-
KeyA: {
|
|
220
|
-
name: string;
|
|
221
|
-
gridRow: string;
|
|
222
|
-
gridColumn: string;
|
|
223
|
-
};
|
|
224
|
-
KeyS: {
|
|
225
|
-
name: string;
|
|
226
|
-
gridRow: string;
|
|
227
|
-
gridColumn: string;
|
|
228
|
-
};
|
|
229
|
-
KeyD: {
|
|
230
|
-
name: string;
|
|
231
|
-
gridRow: string;
|
|
232
|
-
gridColumn: string;
|
|
233
|
-
};
|
|
234
|
-
KeyF: {
|
|
235
|
-
name: string;
|
|
236
|
-
gridRow: string;
|
|
237
|
-
gridColumn: string;
|
|
238
|
-
};
|
|
239
|
-
KeyG: {
|
|
240
|
-
name: string;
|
|
241
|
-
gridRow: string;
|
|
242
|
-
gridColumn: string;
|
|
243
|
-
};
|
|
244
|
-
KeyH: {
|
|
245
|
-
name: string;
|
|
246
|
-
gridRow: string;
|
|
247
|
-
gridColumn: string;
|
|
248
|
-
};
|
|
249
|
-
KeyJ: {
|
|
250
|
-
name: string;
|
|
251
|
-
gridRow: string;
|
|
252
|
-
gridColumn: string;
|
|
253
|
-
};
|
|
254
|
-
KeyK: {
|
|
255
|
-
name: string;
|
|
256
|
-
gridRow: string;
|
|
257
|
-
gridColumn: string;
|
|
258
|
-
};
|
|
259
|
-
KeyL: {
|
|
260
|
-
name: string;
|
|
261
|
-
gridRow: string;
|
|
262
|
-
gridColumn: string;
|
|
263
|
-
};
|
|
264
|
-
Semicolon: {
|
|
265
|
-
name: string;
|
|
266
|
-
gridRow: string;
|
|
267
|
-
gridColumn: string;
|
|
268
|
-
};
|
|
269
|
-
Quote: {
|
|
270
|
-
name: string;
|
|
271
|
-
gridRow: string;
|
|
272
|
-
gridColumn: string;
|
|
273
|
-
};
|
|
274
|
-
Enter: {
|
|
275
|
-
name: string;
|
|
276
|
-
gridRow: string;
|
|
277
|
-
gridColumn: string;
|
|
278
|
-
};
|
|
279
|
-
};
|
|
280
|
-
export declare const KeyboardFour: {
|
|
281
|
-
ShiftLeft: {
|
|
282
|
-
name: string;
|
|
283
|
-
gridRow: string;
|
|
284
|
-
gridColumn: string;
|
|
285
|
-
code: string;
|
|
286
|
-
};
|
|
287
|
-
KeyZ: {
|
|
288
|
-
name: string;
|
|
289
|
-
gridRow: string;
|
|
290
|
-
gridColumn: string;
|
|
291
|
-
};
|
|
292
|
-
KeyX: {
|
|
293
|
-
name: string;
|
|
294
|
-
gridRow: string;
|
|
295
|
-
gridColumn: string;
|
|
296
|
-
};
|
|
297
|
-
KeyC: {
|
|
298
|
-
name: string;
|
|
299
|
-
gridRow: string;
|
|
300
|
-
gridColumn: string;
|
|
301
|
-
};
|
|
302
|
-
KeyV: {
|
|
303
|
-
name: string;
|
|
304
|
-
gridRow: string;
|
|
305
|
-
gridColumn: string;
|
|
306
|
-
};
|
|
307
|
-
KeyB: {
|
|
308
|
-
name: string;
|
|
309
|
-
gridRow: string;
|
|
310
|
-
gridColumn: string;
|
|
311
|
-
};
|
|
312
|
-
KeyN: {
|
|
313
|
-
name: string;
|
|
314
|
-
gridRow: string;
|
|
315
|
-
gridColumn: string;
|
|
316
|
-
};
|
|
317
|
-
KeyM: {
|
|
318
|
-
name: string;
|
|
319
|
-
gridRow: string;
|
|
320
|
-
gridColumn: string;
|
|
321
|
-
};
|
|
322
|
-
Comma: {
|
|
323
|
-
name: string;
|
|
324
|
-
gridRow: string;
|
|
325
|
-
gridColumn: string;
|
|
326
|
-
};
|
|
327
|
-
Period: {
|
|
328
|
-
name: string;
|
|
329
|
-
gridRow: string;
|
|
330
|
-
gridColumn: string;
|
|
331
|
-
};
|
|
332
|
-
Slash: {
|
|
333
|
-
name: string;
|
|
334
|
-
gridRow: string;
|
|
335
|
-
gridColumn: string;
|
|
336
|
-
};
|
|
337
|
-
ShiftRight: {
|
|
338
|
-
name: string;
|
|
339
|
-
gridRow: string;
|
|
340
|
-
gridColumn: string;
|
|
341
|
-
code: string;
|
|
342
|
-
};
|
|
343
|
-
};
|
|
344
|
-
export declare const KeyboardFive: {
|
|
345
|
-
ControlLeft: {
|
|
346
|
-
name: string;
|
|
347
|
-
gridRow: string;
|
|
348
|
-
gridColumn: string;
|
|
349
|
-
code: string;
|
|
350
|
-
};
|
|
351
|
-
Option: {
|
|
352
|
-
name: string;
|
|
353
|
-
gridRow: string;
|
|
354
|
-
gridColumn: string;
|
|
355
|
-
};
|
|
356
|
-
AltLeft: {
|
|
357
|
-
name: string;
|
|
358
|
-
gridRow: string;
|
|
359
|
-
gridColumn: string;
|
|
360
|
-
code: string;
|
|
361
|
-
};
|
|
362
|
-
Space: {
|
|
363
|
-
name: string;
|
|
364
|
-
gridRow: string;
|
|
365
|
-
gridColumn: string;
|
|
366
|
-
};
|
|
367
|
-
AltRight: {
|
|
368
|
-
name: string;
|
|
369
|
-
gridRow: string;
|
|
370
|
-
gridColumn: string;
|
|
371
|
-
code: string;
|
|
372
|
-
};
|
|
373
|
-
ControlRight: {
|
|
374
|
-
name: string;
|
|
375
|
-
gridRow: string;
|
|
376
|
-
gridColumn: string;
|
|
377
|
-
code: string;
|
|
378
|
-
};
|
|
379
|
-
};
|
|
380
|
-
export declare const KeyboardArrow: {
|
|
381
|
-
ArrowUp: {
|
|
382
|
-
name: string;
|
|
383
|
-
gridRow: string;
|
|
384
|
-
gridColumn: string;
|
|
385
|
-
};
|
|
386
|
-
ArrowLeft: {
|
|
387
|
-
name: string;
|
|
388
|
-
gridRow: string;
|
|
389
|
-
gridColumn: string;
|
|
390
|
-
};
|
|
391
|
-
ArrowDown: {
|
|
392
|
-
name: string;
|
|
393
|
-
gridRow: string;
|
|
394
|
-
gridColumn: string;
|
|
395
|
-
};
|
|
396
|
-
ArrowRight: {
|
|
397
|
-
name: string;
|
|
398
|
-
gridRow: string;
|
|
399
|
-
gridColumn: string;
|
|
400
|
-
};
|
|
401
|
-
};
|
|
402
|
-
export declare const KeyBoardAll: keyBoardMapType;
|