gaesup-world 0.0.75 → 0.0.77
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/dist/gaesup/animation/actions.js +3 -3
- package/dist/gaesup/camera/control/orbit.js +2 -2
- package/dist/gaesup/component/active/common/InnerGroupRef.js +10 -10
- package/dist/gaesup/component/passive/common/InnerGroupRef.js +10 -10
- package/dist/gaesup/controller/initialize/index.js +1 -1
- package/dist/gaesup/gaesupProps/index.d.ts +1 -1
- package/dist/gaesup/gaesupProps/index.js +3 -5
- package/dist/gaesup/index.d.ts +1 -1
- package/dist/gaesup/index.js +1 -1
- package/dist/gaesup/tools/gameboy/GameBoyButton.d.ts +1 -1
- package/dist/gaesup/tools/gameboy/type.d.ts +1 -1
- package/dist/gaesup/tools/gamepad/GamePadButton.d.ts +1 -1
- package/dist/gaesup/tools/gamepad/type.d.ts +1 -1
- package/dist/gaesup/tools/index.d.ts +1 -0
- package/dist/gaesup/tools/index.js +1 -0
- package/dist/gaesup/tools/joystick/index.js +2 -1
- package/dist/gaesup/tools/joystick/type.d.ts +1 -1
- package/dist/gaesup/tools/jumpPoint/index.d.ts +2 -0
- package/dist/gaesup/tools/jumpPoint/index.js +7 -0
- package/dist/gaesup/tools/keyBoardToolTip/index.js +14 -3
- package/dist/gaesup/tools/keyBoardToolTip/type.d.ts +2 -1
- package/dist/gaesup/tools/minimap/index.js +4 -11
- package/dist/gaesup/tools/minimap/type.d.ts +2 -2
- package/dist/gaesup/world/context/type.d.ts +3 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +21 -21
|
@@ -116,9 +116,9 @@ export default function playCharacterActions(_a) {
|
|
|
116
116
|
// }
|
|
117
117
|
// }
|
|
118
118
|
// }
|
|
119
|
-
if (groundRay.hit === null && activeState.velocity.y < 0) {
|
|
120
|
-
|
|
121
|
-
}
|
|
119
|
+
// if (groundRay.hit === null && activeState.velocity.y < 0) {
|
|
120
|
+
// playFall();
|
|
121
|
+
// }
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
});
|
|
@@ -8,11 +8,11 @@ export default function orbit(prop) {
|
|
|
8
8
|
.multiplyScalar(perspectiveCamera.XZDistance)
|
|
9
9
|
.multiplyScalar(perspectiveCamera.isFront ? -1 : 1)
|
|
10
10
|
.add(V3(0, perspectiveCamera.YDistance, 0)));
|
|
11
|
-
state.camera.position.lerp(cameraPosition, 0.
|
|
11
|
+
state.camera.position.lerp(cameraPosition, 0.9);
|
|
12
12
|
state.camera.quaternion.copy(activeState.quat
|
|
13
13
|
.clone()
|
|
14
14
|
.multiply(perspectiveCamera.isFront
|
|
15
15
|
? quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)
|
|
16
16
|
: quat()));
|
|
17
|
-
state.camera.lookAt(activeState.position);
|
|
17
|
+
state.camera.lookAt(activeState.position.clone());
|
|
18
18
|
}
|
|
@@ -10,7 +10,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { forwardRef, useMemo } from "react";
|
|
13
|
+
import { Suspense, forwardRef, useMemo } from "react";
|
|
14
14
|
import { useGraph } from "@react-three/fiber";
|
|
15
15
|
import * as THREE from "three";
|
|
16
16
|
import { SkeletonUtils } from "three-stdlib";
|
|
@@ -20,13 +20,13 @@ export var InnerGroupRef = forwardRef(function (_a, ref) {
|
|
|
20
20
|
var clone = useMemo(function () { return SkeletonUtils.clone(scene); }, [scene]);
|
|
21
21
|
var nodes = useGraph(clone).nodes;
|
|
22
22
|
var objectNode = Object.values(nodes).find(function (node) { return node.type === "Object3D"; });
|
|
23
|
-
return (_jsxs("group", __assign({ receiveShadow: true, castShadow: true }, props.groupProps, { ref: ref, children: [objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
23
|
+
return (_jsx(Suspense, { children: _jsxs("group", __assign({ receiveShadow: true, castShadow: true }, props.groupProps, { ref: ref, children: [objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
|
|
24
|
+
var node = nodes[name];
|
|
25
|
+
if (node instanceof THREE.SkinnedMesh) {
|
|
26
|
+
return (_jsx("skinnedMesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry, skeleton: node.skeleton }, key));
|
|
27
|
+
}
|
|
28
|
+
else if (node instanceof THREE.Mesh) {
|
|
29
|
+
return (_jsx("mesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry }, key));
|
|
30
|
+
}
|
|
31
|
+
})] })) }));
|
|
32
32
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef, useMemo } from "react";
|
|
2
|
+
import { Suspense, forwardRef, useMemo } from "react";
|
|
3
3
|
import { useGLTF } from "@react-three/drei";
|
|
4
4
|
import { useGraph } from "@react-three/fiber";
|
|
5
5
|
import * as THREE from "three";
|
|
@@ -15,13 +15,13 @@ export var InnerGroupRef = forwardRef(function (_a, ref) {
|
|
|
15
15
|
var clone = useMemo(function () { return SkeletonUtils.clone(scene); }, [scene]);
|
|
16
16
|
var nodes = useGraph(clone).nodes;
|
|
17
17
|
var objectNode = Object.values(nodes).find(function (node) { return node.type === "Object3D"; });
|
|
18
|
-
return (_jsxs("group", { receiveShadow: true, castShadow: true, ref: ref, userData: { intangible: true }, children: [objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
18
|
+
return (_jsx(Suspense, { fallback: null, children: _jsxs("group", { receiveShadow: true, castShadow: true, ref: ref, userData: { intangible: true }, children: [objectNode && animationRef && (_jsx("primitive", { object: objectNode, visible: false, receiveShadow: true, castShadow: true, ref: animationRef })), Object.keys(nodes).map(function (name, key) {
|
|
19
|
+
var node = nodes[name];
|
|
20
|
+
if (node instanceof THREE.SkinnedMesh) {
|
|
21
|
+
return (_jsx("skinnedMesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry, skeleton: node.skeleton, userData: { intangible: true } }, key));
|
|
22
|
+
}
|
|
23
|
+
else if (node instanceof THREE.Mesh) {
|
|
24
|
+
return (_jsx("mesh", { castShadow: true, receiveShadow: true, material: node.material, geometry: node.geometry, userData: { intangible: true } }, key));
|
|
25
|
+
}
|
|
26
|
+
})] }) }));
|
|
27
27
|
});
|
|
@@ -32,7 +32,7 @@ export default function initControllerProps(_a) {
|
|
|
32
32
|
},
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
}, [context.mode.controller, keyControl, context.control]);
|
|
35
|
+
}, [context === null || context === void 0 ? void 0 : context.mode.controller, keyControl, context === null || context === void 0 ? void 0 : context.control]);
|
|
36
36
|
var groundRay = useMemo(function () {
|
|
37
37
|
return {
|
|
38
38
|
origin: vec3(),
|
|
@@ -20,7 +20,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
20
20
|
};
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
import { vec3 } from "@react-three/rapier";
|
|
23
|
-
import { useContext, useEffect, useRef } from "react";
|
|
23
|
+
import { Suspense, useContext, useEffect, useRef } from "react";
|
|
24
24
|
import * as THREE from "three";
|
|
25
25
|
import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../world/context/index.js";
|
|
26
26
|
export function GaeSupProps(_a) {
|
|
@@ -31,7 +31,7 @@ export function GaeSupProps(_a) {
|
|
|
31
31
|
useEffect(function () {
|
|
32
32
|
if (jumpPoint && position) {
|
|
33
33
|
points.push({
|
|
34
|
-
text: text,
|
|
34
|
+
text: text || null,
|
|
35
35
|
position: vec3().set(position[0], 5, position[2]),
|
|
36
36
|
});
|
|
37
37
|
dispatch({
|
|
@@ -44,9 +44,7 @@ export function GaeSupProps(_a) {
|
|
|
44
44
|
if (groupRef.current) {
|
|
45
45
|
var box = new THREE.Box3().setFromObject(groupRef.current);
|
|
46
46
|
var size = vec3(box.getSize(new THREE.Vector3())).clone();
|
|
47
|
-
// .multiplyScalar(minimap.ratio);
|
|
48
47
|
var center = vec3(box.getCenter(new THREE.Vector3())).clone();
|
|
49
|
-
// .multiplyScalar(minimap.ratio);
|
|
50
48
|
var obj = {
|
|
51
49
|
text: text,
|
|
52
50
|
size: size,
|
|
@@ -61,5 +59,5 @@ export function GaeSupProps(_a) {
|
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
61
|
}, []);
|
|
64
|
-
return (_jsx("group", { ref: groupRef, position: position, children: children }));
|
|
62
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx("group", { ref: groupRef, position: position, children: children }) }));
|
|
65
63
|
}
|
package/dist/gaesup/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export { GaesupComponent, GaesupPassiveComponent } from "./component";
|
|
|
4
4
|
export { GaesupController } from "./controller";
|
|
5
5
|
export { GaeSupProps } from "./gaesupProps";
|
|
6
6
|
export { useGaesupController } from "./hooks";
|
|
7
|
-
export { GameBoy, GamePad, JoyStick, KeyBoardToolTip, MiniMap } from "./tools";
|
|
7
|
+
export { GameBoy, GamePad, JoyStick, JumpPortal, KeyBoardToolTip, MiniMap, } from "./tools";
|
|
8
8
|
export { GaesupWorld } from "./world";
|
package/dist/gaesup/index.js
CHANGED
|
@@ -4,5 +4,5 @@ export { GaesupComponent, GaesupPassiveComponent } from "./component";
|
|
|
4
4
|
export { GaesupController } from "./controller";
|
|
5
5
|
export { GaeSupProps } from "./gaesupProps";
|
|
6
6
|
export { useGaesupController } from "./hooks";
|
|
7
|
-
export { GameBoy, GamePad, JoyStick, KeyBoardToolTip, MiniMap } from "./tools";
|
|
7
|
+
export { GameBoy, GamePad, JoyStick, JumpPortal, KeyBoardToolTip, MiniMap, } from "./tools";
|
|
8
8
|
export { GaesupWorld } from "./world";
|
|
@@ -4,6 +4,6 @@ export type gameBoyButtonType = {
|
|
|
4
4
|
tag: "up" | "down" | "left" | "right";
|
|
5
5
|
value: string;
|
|
6
6
|
icon: JSX.Element;
|
|
7
|
-
gameboyButtonStyle: VECssType
|
|
7
|
+
gameboyButtonStyle: Partial<VECssType>;
|
|
8
8
|
};
|
|
9
9
|
export default function GameBoyButton({ tag, value, icon, gameboyButtonStyle, }: gameBoyButtonType): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { VECssType } from "../type.js";
|
|
|
2
2
|
export default function GamePadButton({ value, name, gamepadButtonStyle, }: {
|
|
3
3
|
value: string;
|
|
4
4
|
name: string;
|
|
5
|
-
gamepadButtonStyle: VECssType
|
|
5
|
+
gamepadButtonStyle: Partial<VECssType>;
|
|
6
6
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -2,5 +2,5 @@ import { VECssType } from "../type";
|
|
|
2
2
|
export type gamepadType = {
|
|
3
3
|
label?: Record<string, string>;
|
|
4
4
|
} & {
|
|
5
|
-
[key in "gamepadButtonStyle" | "gamepadGridStyle" | "gamepadInnerStyle" | "gamepadStyle"]?: VECssType
|
|
5
|
+
[key in "gamepadButtonStyle" | "gamepadGridStyle" | "gamepadInnerStyle" | "gamepadStyle"]?: Partial<VECssType>;
|
|
6
6
|
};
|
|
@@ -98,10 +98,11 @@ export function JoyStick(props) {
|
|
|
98
98
|
var normY = Math.pow((joyStickOrigin.y - Y), 2);
|
|
99
99
|
var currentRadius = Math.sqrt(normX + normY);
|
|
100
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));
|
|
101
102
|
setOrigin({
|
|
102
103
|
x: left + width / 2,
|
|
103
104
|
y: bottom - height / 2,
|
|
104
|
-
angle:
|
|
105
|
+
angle: newAngle,
|
|
105
106
|
currentRadius: currentRadius,
|
|
106
107
|
originRadius: originRadius,
|
|
107
108
|
isIn: currentRadius > originRadius / 2,
|
|
@@ -19,5 +19,5 @@ export type joyStickInnerType = {
|
|
|
19
19
|
joyStickOrigin?: joyStickOriginType;
|
|
20
20
|
};
|
|
21
21
|
export type joyStickType = {
|
|
22
|
-
[key in "joyStickBallStyle" | "joyStickStyle" | "joyBallStyle"]?: VECssType
|
|
22
|
+
[key in "joyStickBallStyle" | "joyStickStyle" | "joyBallStyle"]?: Partial<VECssType>;
|
|
23
23
|
};
|
|
@@ -12,3 +12,10 @@ export default function JumpPoint() {
|
|
|
12
12
|
}, children: obj.text }, key));
|
|
13
13
|
}) }));
|
|
14
14
|
}
|
|
15
|
+
export function JumpPortal(props) {
|
|
16
|
+
var refs = useContext(GaesupWorldContext).refs;
|
|
17
|
+
return (_jsx("div", { className: style.jumpPoint, onClick: function () {
|
|
18
|
+
var _a, _b;
|
|
19
|
+
(_b = (_a = refs.rigidBodyRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setTranslation(props.position, true);
|
|
20
|
+
}, children: props.text }));
|
|
21
|
+
}
|
|
@@ -18,16 +18,17 @@ import { KeyBoardAll } from "./constant";
|
|
|
18
18
|
import * as style from "./style.css";
|
|
19
19
|
export function KeyBoardToolTip(props) {
|
|
20
20
|
var worldContext = useContext(GaesupWorldContext);
|
|
21
|
-
var keyBoardMap = props.keyBoardMap, keyBoardToolTipInnerStyle = props.keyBoardToolTipInnerStyle, keyCapStyle = props.keyCapStyle;
|
|
21
|
+
var keyBoardMap = props.keyBoardMap, keyBoardToolTipInnerStyle = props.keyBoardToolTipInnerStyle, selectedKeyCapStyle = props.selectedKeyCapStyle, notSelectedkeyCapStyle = props.notSelectedkeyCapStyle, keyCapStyle = props.keyCapStyle, label = props.label;
|
|
22
22
|
var animations = worldContext.animations, mode = worldContext.mode;
|
|
23
23
|
var keyArray = Object.entries(KeyBoardAll).reduce(function (keyArray, cur) {
|
|
24
24
|
var key = cur[0], value = cur[1];
|
|
25
25
|
var gridRow = value.gridRow, gridColumn = value.gridColumn, name = value.name;
|
|
26
|
+
var labeledName = (label === null || label === void 0 ? void 0 : label[name]) || name;
|
|
26
27
|
var keyBoardItem = {
|
|
27
28
|
code: value.code || key,
|
|
28
29
|
gridRow: gridRow,
|
|
29
30
|
gridColumn: gridColumn,
|
|
30
|
-
name:
|
|
31
|
+
name: labeledName,
|
|
31
32
|
};
|
|
32
33
|
keyArray.push(keyBoardItem);
|
|
33
34
|
return keyArray;
|
|
@@ -41,12 +42,15 @@ export function KeyBoardToolTip(props) {
|
|
|
41
42
|
return (_jsx(_Fragment, { children: mode.controller === "keyboard" && (_jsx("div", { className: style.keyBoardTooInner, style: assignInlineVars(keyBoardToolTipInnerStyle), children: keyArray.map(function (item, key) {
|
|
42
43
|
var background = "rgba(0, 0, 0, 0.1)";
|
|
43
44
|
var boxShadow = "0 0 5px rgba(0, 0, 0, 0.2)";
|
|
45
|
+
var isSelect = "none";
|
|
44
46
|
if (codeToActionObj[item.code]) {
|
|
45
47
|
if (animations.keyControl[codeToActionObj[item.code]]) {
|
|
48
|
+
isSelect = "select";
|
|
46
49
|
background = "".concat(vars.gradient.green);
|
|
47
50
|
boxShadow = "0 0 10px rgba(99,251,215,1)";
|
|
48
51
|
}
|
|
49
52
|
else {
|
|
53
|
+
isSelect = "notSelect";
|
|
50
54
|
background = "rgba(0, 0, 0, 0.6)";
|
|
51
55
|
boxShadow = "0 0 10px rgba(0, 0, 0, 0.6)";
|
|
52
56
|
}
|
|
@@ -56,6 +60,13 @@ export function KeyBoardToolTip(props) {
|
|
|
56
60
|
animations.keyControl[codeToActionObj[item.code]]) {
|
|
57
61
|
color = "black";
|
|
58
62
|
}
|
|
59
|
-
|
|
63
|
+
var keyStyle = keyCapStyle;
|
|
64
|
+
if (isSelect === "select") {
|
|
65
|
+
keyStyle = __assign({}, selectedKeyCapStyle);
|
|
66
|
+
}
|
|
67
|
+
else if (isSelect === "notSelect") {
|
|
68
|
+
keyStyle = __assign({}, notSelectedkeyCapStyle);
|
|
69
|
+
}
|
|
70
|
+
return (_jsx("div", { className: style.keyCap, style: assignInlineVars(__assign({ background: background, boxShadow: boxShadow, color: color, gridRow: item.gridRow, gridColumn: item.gridColumn }, keyStyle)), children: item.name }, key));
|
|
60
71
|
}) })) }));
|
|
61
72
|
}
|
|
@@ -28,7 +28,8 @@ export type keyBoardLabelType = {
|
|
|
28
28
|
export type keyBoardToolTipType = {
|
|
29
29
|
keyBoardLabel?: keyBoardLabelType;
|
|
30
30
|
keyBoardMap?: keyboardMapItemType[];
|
|
31
|
+
label?: Record<string, string>;
|
|
31
32
|
} & {
|
|
32
|
-
[key in "keyBoardToolTipInnerStyle" | "keyCapStyle"]?: VECssType
|
|
33
|
+
[key in "keyBoardToolTipInnerStyle" | "notSelectedkeyCapStyle" | "selectedKeyCapStyle" | "keyCapStyle"]?: Partial<VECssType>;
|
|
33
34
|
};
|
|
34
35
|
export type keyBoardToolTipPartialType = Partial<keyBoardToolTipType>;
|
|
@@ -37,8 +37,8 @@ export function MiniMap(props) {
|
|
|
37
37
|
else
|
|
38
38
|
downscale();
|
|
39
39
|
}, style: assignInlineVars(minimapStyle), children: [_jsx("div", { className: style.minimapOuter, style: assignInlineVars(objectStyle) }), _jsxs("div", { className: style.minimapInner, style: assignInlineVars(__assign({ transform: props.blockRotate
|
|
40
|
-
? "translate(-50%, -50%)"
|
|
41
|
-
: "translate(-50%, -50%) rotate(".concat((activeState.euler.y * 180) / Math.PI, "deg) ") }, innerStyle)), children: [_jsx("div", { className: style.direction({
|
|
40
|
+
? "translate(-50%, -50%) rotate(180deg) "
|
|
41
|
+
: "translate(-50%, -50%) rotate(".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, innerStyle)), children: [_jsx("div", { className: style.direction({
|
|
42
42
|
east: true,
|
|
43
43
|
}), style: assignInlineVars(directionStyle), children: "E" }), _jsx("div", { className: style.direction({
|
|
44
44
|
west: true,
|
|
@@ -48,15 +48,8 @@ export function MiniMap(props) {
|
|
|
48
48
|
var center = _a.center, size = _a.size, text = _a.text;
|
|
49
49
|
var X = (center.x - activeState.position.x) * scale;
|
|
50
50
|
var Z = (center.z - activeState.position.z) * scale;
|
|
51
|
-
return (_jsx("div", { className: style.minimapObject, style: assignInlineVars({
|
|
52
|
-
|
|
53
|
-
height: "".concat(size.z * scale, "rem"),
|
|
54
|
-
top: "50%",
|
|
55
|
-
left: "50%",
|
|
56
|
-
transform: "translate(-50%, -50%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"),
|
|
57
|
-
transformOrigin: "50% 50%",
|
|
58
|
-
}), children: _jsx("div", { className: style.text, style: assignInlineVars(textStyle), children: text }) }, key));
|
|
59
|
-
}), _jsx("div", { className: style.avatar, style: assignInlineVars(avatarStyle) })] }), props.blockScaleControl && (_jsxs("div", { className: style.scale, style: assignInlineVars(scaleStyle), children: [_jsx("div", { className: style.plusMinus, style: assignInlineVars(plusMinusStyle), onClick: function () {
|
|
51
|
+
return (_jsx("div", { className: style.minimapObject, style: assignInlineVars(__assign({ width: "".concat(size.x * scale, "rem"), height: "".concat(size.z * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50%, -50%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%" }, objectStyle)), children: text && (_jsx("div", { className: style.text, style: assignInlineVars(textStyle), children: text })) }, key));
|
|
52
|
+
}), _jsx("div", { className: style.avatar, style: assignInlineVars(avatarStyle) })] }), !props.blockScaleControl && (_jsxs("div", { className: style.scale, style: assignInlineVars(scaleStyle), children: [_jsx("div", { className: style.plusMinus, style: assignInlineVars(plusMinusStyle), onClick: function () {
|
|
60
53
|
if (props.blockScale)
|
|
61
54
|
return;
|
|
62
55
|
downscale();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import { VECssType } from "../type";
|
|
3
3
|
export type minimapPropsType = {
|
|
4
|
-
text
|
|
4
|
+
text?: string;
|
|
5
5
|
center: THREE.Vector3;
|
|
6
6
|
size: THREE.Vector3;
|
|
7
7
|
};
|
|
@@ -11,7 +11,7 @@ export type minimapInnerType = {
|
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
export type minimapType = {
|
|
14
|
-
[key in "minimapStyle" | "outerStyle" | "innerStyle" | "textStyle" | "objectStyle" | "avatarStyle" | "directionStyle" | "scaleStyle" | "plusMinusStyle"]?: VECssType
|
|
14
|
+
[key in "minimapStyle" | "outerStyle" | "innerStyle" | "textStyle" | "objectStyle" | "avatarStyle" | "directionStyle" | "scaleStyle" | "plusMinusStyle"]?: Partial<VECssType>;
|
|
15
15
|
} & {
|
|
16
16
|
minScale?: number;
|
|
17
17
|
maxScale?: number;
|
|
@@ -3,6 +3,7 @@ import { actionsType, animationTagType, refsType } from "../../controller/type";
|
|
|
3
3
|
import { joyStickInnerType } from "../../tools/joystick/type";
|
|
4
4
|
import { keyboardMapType } from "../../tools/keyBoardToolTip/type";
|
|
5
5
|
import { minimapInnerType } from "../../tools/minimap/type";
|
|
6
|
+
import { VECssType } from "../../tools/type";
|
|
6
7
|
import { dispatchType } from "../../utils/type";
|
|
7
8
|
export type controlType = {
|
|
8
9
|
forward: boolean;
|
|
@@ -15,8 +16,9 @@ export type keyControlType = {
|
|
|
15
16
|
[key: string]: boolean;
|
|
16
17
|
};
|
|
17
18
|
export type pointType = {
|
|
18
|
-
text
|
|
19
|
+
text?: string;
|
|
19
20
|
position: THREE.Vector3;
|
|
21
|
+
pointStlye?: Partial<VECssType>;
|
|
20
22
|
};
|
|
21
23
|
export type pointsType = pointType[];
|
|
22
24
|
export type statesType = {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GaeSupProps, GaesupController, GaesupWorld, GameBoy, GamePad, JoyStick, KeyBoardToolTip, MiniMap, playActions, } from "./gaesup";
|
|
1
|
+
export { GaeSupProps, GaesupController, GaesupWorld, GameBoy, GamePad, JoyStick, JumpPortal, KeyBoardToolTip, MiniMap, playActions, } from "./gaesup";
|
|
2
2
|
export { absolute, fixed, flex, flex_absolute, flex_relative, glass, grid, grid_fixed, relative, sprinkles, } from "./styles";
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { GaeSupProps, GaesupController, GaesupWorld, GameBoy, GamePad, JoyStick, KeyBoardToolTip, MiniMap, playActions, } from "./gaesup";
|
|
1
|
+
export { GaeSupProps, GaesupController, GaesupWorld, GameBoy, GamePad, JoyStick, JumpPortal, KeyBoardToolTip, MiniMap, playActions, } from "./gaesup";
|
|
2
2
|
export { absolute, fixed, flex, flex_absolute, flex_relative, glass, grid, grid_fixed, relative, sprinkles, } from "./styles";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaesup-world",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"type": "
|
|
3
|
+
"version": "0.0.77",
|
|
4
|
+
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"homepage": "https://jigglypop.github.io/gaesup-world-examples/",
|
|
@@ -16,40 +16,40 @@
|
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@dimforge/rapier3d": "^0.11.2",
|
|
19
|
-
"@react-three/drei": "9.
|
|
20
|
-
"@react-three/fiber": "8.15.
|
|
21
|
-
"@react-three/rapier": "^1.1
|
|
22
|
-
"@types/three": "^0.
|
|
19
|
+
"@react-three/drei": "9.92.6",
|
|
20
|
+
"@react-three/fiber": "8.15.12",
|
|
21
|
+
"@react-three/rapier": "^1.2.1",
|
|
22
|
+
"@types/three": "^0.160.0",
|
|
23
23
|
"@vanilla-extract/babel-plugin": "^1.2.0",
|
|
24
|
-
"@vanilla-extract/css": "^1.
|
|
24
|
+
"@vanilla-extract/css": "^1.14.0",
|
|
25
25
|
"@vanilla-extract/css-utils": "^0.1.3",
|
|
26
|
-
"@vanilla-extract/dynamic": "^2.0
|
|
27
|
-
"@vanilla-extract/next-plugin": "^2.3.
|
|
28
|
-
"@vanilla-extract/recipes": "^0.5.
|
|
26
|
+
"@vanilla-extract/dynamic": "^2.1.0",
|
|
27
|
+
"@vanilla-extract/next-plugin": "^2.3.2",
|
|
28
|
+
"@vanilla-extract/recipes": "^0.5.1",
|
|
29
29
|
"@vanilla-extract/sprinkles": "^1.6.1",
|
|
30
|
-
"gh-pages": "^6.1.
|
|
30
|
+
"gh-pages": "^6.1.1",
|
|
31
31
|
"leva": "0.9.35",
|
|
32
32
|
"node-fetch": "3.3.2",
|
|
33
33
|
"react": "^18.2.0",
|
|
34
34
|
"react-device-detect": "^2.2.3",
|
|
35
35
|
"react-dom": "^18.2.0",
|
|
36
36
|
"react-use-refs": "^1.0.1",
|
|
37
|
-
"three": "^0.
|
|
37
|
+
"three": "^0.160.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@types/react": "^18.2.
|
|
41
|
-
"@types/react-dom": "^18.2.
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
43
|
-
"@typescript-eslint/parser": "^6.
|
|
44
|
-
"@vanilla-extract/vite-plugin": "^3.9.
|
|
40
|
+
"@types/react": "^18.2.45",
|
|
41
|
+
"@types/react-dom": "^18.2.18",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
|
43
|
+
"@typescript-eslint/parser": "^6.15.0",
|
|
44
|
+
"@vanilla-extract/vite-plugin": "^3.9.3",
|
|
45
45
|
"@vitejs/plugin-react-swc": "^3.5.0",
|
|
46
|
-
"eslint": "^8.
|
|
46
|
+
"eslint": "^8.56.0",
|
|
47
47
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
48
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
48
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
49
49
|
"path": "^0.12.7",
|
|
50
50
|
"prettier": "^3.1.1",
|
|
51
|
-
"typescript": "^5.
|
|
52
|
-
"vite": "^5.0.
|
|
51
|
+
"typescript": "^5.3.3",
|
|
52
|
+
"vite": "^5.0.10"
|
|
53
53
|
},
|
|
54
54
|
"description": "Web 3D Character Controller and World Platform Library",
|
|
55
55
|
"repository": {
|