gaesup-world 0.4.3 → 0.4.4
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.d.ts +6 -5
- package/dist/gaesup/camera/type.d.ts +1 -0
- package/dist/gaesup/component/active/airplane/index.d.ts +1 -0
- package/dist/gaesup/component/active/vehicle/index.d.ts +1 -0
- package/dist/gaesup/component/inner/character/index.d.ts +1 -0
- package/dist/gaesup/component/inner/common/OuterGroupRef.d.ts +2 -1
- package/dist/gaesup/component/inner/common/RigidbodyRef.d.ts +1 -0
- package/dist/gaesup/component/inner/common/type.d.ts +1 -0
- package/dist/gaesup/component/inner/vehicle/collider.d.ts +1 -0
- package/dist/gaesup/component/inner/vehicle/wheels.d.ts +1 -0
- package/dist/gaesup/component/passive/airplane/index.d.ts +1 -0
- package/dist/gaesup/component/passive/character/index.d.ts +1 -0
- package/dist/gaesup/component/passive/vehicle/index.d.ts +1 -0
- package/dist/gaesup/component/type.d.ts +1 -0
- package/dist/gaesup/controller/context/type.d.ts +1 -0
- package/dist/gaesup/controller/initialize/callback/index.d.ts +1 -0
- package/dist/gaesup/controller/initialize/callback/type.d.ts +1 -0
- package/dist/gaesup/hooks/useFocus/index.d.ts +1 -0
- package/dist/gaesup/hooks/useFocus/index.js +70 -80
- package/dist/gaesup/hooks/useTeleport/index.d.ts +1 -0
- package/dist/gaesup/physics/type.d.ts +1 -0
- package/dist/gaesup/tools/jumpPortal/index.d.ts +1 -0
- package/dist/gaesup/tools/zoomButton/index.d.ts +1 -0
- package/dist/gaesup/utils/debug.d.ts +1 -0
- package/dist/gaesup/world/context/type.d.ts +1 -0
- package/dist/gaesup/world/type.d.ts +1 -0
- package/package.json +18 -18
- package/yarn-error.log +0 -12152
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Ref } from "react";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
import { AnimationAction, AnimationClip, AnimationMixer, Object3D, Object3DEventMap } from "three";
|
|
3
4
|
import { groundRayType } from "../controller/type";
|
|
4
5
|
export type Api<T extends AnimationClip> = {
|
|
@@ -29,17 +30,17 @@ export type playResultType = {
|
|
|
29
30
|
};
|
|
30
31
|
export declare function subscribeActions({ type, groundRay, animations, }: subscribeActionsType): {
|
|
31
32
|
animationResult: {
|
|
32
|
-
ref: import("react").MutableRefObject<Object3D<Object3DEventMap>>;
|
|
33
|
-
clips: AnimationClip[];
|
|
34
|
-
mixer: AnimationMixer;
|
|
33
|
+
ref: import("react").MutableRefObject<THREE.Object3D<THREE.Object3DEventMap>>;
|
|
34
|
+
clips: THREE.AnimationClip[];
|
|
35
|
+
mixer: THREE.AnimationMixer;
|
|
35
36
|
names: string[];
|
|
36
37
|
actions: {
|
|
37
|
-
[x: string]: AnimationAction;
|
|
38
|
+
[x: string]: THREE.AnimationAction;
|
|
38
39
|
};
|
|
39
40
|
};
|
|
40
41
|
};
|
|
41
42
|
export default function playActions({ type, animationResult, currentAnimation, }: playActionsType): {
|
|
42
|
-
animationRef: import("react").MutableRefObject<Object3D<Object3DEventMap>>;
|
|
43
|
+
animationRef: import("react").MutableRefObject<THREE.Object3D<THREE.Object3DEventMap>>;
|
|
43
44
|
currentAnimation: string;
|
|
44
45
|
};
|
|
45
46
|
export declare const setAnimation: ({ currentAnimation, actions, type, }: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
import { controllerInnerType, groundRayType, refsType } from "../../../controller/type";
|
|
3
4
|
import { urlsType } from "../../../world/context/type";
|
|
4
5
|
export declare function AirplaneRef({ children, props, groundRay, enableRiding, isRiderOn, offset, refs, urls, }: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
import { controllerInnerType, groundRayType, refsType } from "../../../controller/type";
|
|
3
4
|
import { urlsType } from "../../../world/context/type";
|
|
4
5
|
export declare function VehicleRef({ children, props, groundRay, enableRiding, isRiderOn, offset, refs, urls, }: {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { refsType } from "../../../controller/type";
|
|
2
2
|
import { ReactNode, Ref } from "react";
|
|
3
|
+
import * as THREE from "three";
|
|
3
4
|
import { Object3D, Object3DEventMap } from "three";
|
|
4
5
|
import { urlsType } from "../../../world/context/type";
|
|
5
6
|
export declare const calcCharacterColliderProps: (characterSize: THREE.Vector3) => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
export declare const OuterGroupRef: import("react").ForwardRefExoticComponent<{
|
|
3
4
|
children: ReactNode;
|
|
4
|
-
} & import("react").RefAttributes<
|
|
5
|
+
} & import("react").RefAttributes<THREE.Group<THREE.Object3DEventMap>>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { CollisionEnterPayload } from "@react-three/rapier";
|
|
3
|
+
import * as THREE from "three";
|
|
3
4
|
import { refsType } from "../../../controller/type";
|
|
4
5
|
import { urlsType } from "../../../world/context/type";
|
|
5
6
|
export type refPropsType = {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Collider } from "@dimforge/rapier3d-compat";
|
|
3
|
+
import * as THREE from "three";
|
|
3
4
|
import { urlsType } from "../../../world/context/type";
|
|
4
5
|
export declare const VehicleWheelCollider: import("react").ForwardRefExoticComponent<{
|
|
5
6
|
urls: urlsType;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RootState } from "@react-three/fiber";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
import { cameraRayType } from "../../../camera/type";
|
|
3
4
|
import { activeStateType, animationAtomType, animationStateType, keyControlType, statesType } from "../../../world/context/type";
|
|
4
5
|
import { actionsType, groundRayType } from "../../type";
|
|
@@ -102,91 +102,81 @@ export function useFocus() {
|
|
|
102
102
|
return [2 /*return*/];
|
|
103
103
|
});
|
|
104
104
|
}); };
|
|
105
|
-
var focus = function (_a) {
|
|
106
|
-
var zoom =
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return [2 /*return*/];
|
|
114
|
-
});
|
|
105
|
+
var focus = function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
106
|
+
var zoom = _b.zoom, target = _b.target, position = _b.position;
|
|
107
|
+
return __generator(this, function (_c) {
|
|
108
|
+
if (zoom)
|
|
109
|
+
cameraOption.zoom = zoom;
|
|
110
|
+
cameraOption.position.lerp(position, 0.1);
|
|
111
|
+
cameraOption.target.lerp(target, 0.1);
|
|
112
|
+
return [2 /*return*/];
|
|
115
113
|
});
|
|
116
|
-
};
|
|
117
|
-
var free = function (_a) {
|
|
118
|
-
var zoom =
|
|
119
|
-
return
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
return [2 /*return*/];
|
|
126
|
-
});
|
|
114
|
+
}); };
|
|
115
|
+
var free = function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
116
|
+
var zoom = _b.zoom;
|
|
117
|
+
return __generator(this, function (_c) {
|
|
118
|
+
if (zoom)
|
|
119
|
+
cameraOption.zoom = zoom;
|
|
120
|
+
cameraOption.position.lerp(makeNormalCameraPosition(activeState, cameraOption), 0.1);
|
|
121
|
+
cameraOption.target.lerp(activeState.position.clone(), 0.1);
|
|
122
|
+
return [2 /*return*/];
|
|
127
123
|
});
|
|
128
|
-
};
|
|
129
|
-
var move = function (_a) {
|
|
130
|
-
var newPosition =
|
|
131
|
-
return
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return [2 /*return*/];
|
|
135
|
-
});
|
|
124
|
+
}); };
|
|
125
|
+
var move = function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
126
|
+
var newPosition = _b.newPosition;
|
|
127
|
+
return __generator(this, function (_c) {
|
|
128
|
+
cameraOption.position.lerp(newPosition.clone(), 0.1);
|
|
129
|
+
return [2 /*return*/];
|
|
136
130
|
});
|
|
137
|
-
};
|
|
138
|
-
var focusOn = function (_a) {
|
|
139
|
-
var zoom =
|
|
140
|
-
return
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
});
|
|
131
|
+
}); };
|
|
132
|
+
var focusOn = function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
133
|
+
var zoom = _b.zoom, target = _b.target, position = _b.position;
|
|
134
|
+
return __generator(this, function (_c) {
|
|
135
|
+
switch (_c.label) {
|
|
136
|
+
case 0: return [4 /*yield*/, close()];
|
|
137
|
+
case 1:
|
|
138
|
+
_c.sent();
|
|
139
|
+
return [4 /*yield*/, on()];
|
|
140
|
+
case 2:
|
|
141
|
+
_c.sent();
|
|
142
|
+
return [4 /*yield*/, move({ newPosition: position })];
|
|
143
|
+
case 3:
|
|
144
|
+
_c.sent();
|
|
145
|
+
return [4 /*yield*/, focus({ zoom: zoom, target: target, position: position })];
|
|
146
|
+
case 4:
|
|
147
|
+
_c.sent();
|
|
148
|
+
return [4 /*yield*/, dispatchAsync()];
|
|
149
|
+
case 5:
|
|
150
|
+
_c.sent();
|
|
151
|
+
return [2 /*return*/];
|
|
152
|
+
}
|
|
161
153
|
});
|
|
162
|
-
};
|
|
163
|
-
var focusOff = function (_a) {
|
|
164
|
-
var zoom =
|
|
165
|
-
return
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
});
|
|
154
|
+
}); };
|
|
155
|
+
var focusOff = function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
156
|
+
var zoom = _b.zoom;
|
|
157
|
+
return __generator(this, function (_c) {
|
|
158
|
+
switch (_c.label) {
|
|
159
|
+
case 0: return [4 /*yield*/, open()];
|
|
160
|
+
case 1:
|
|
161
|
+
_c.sent();
|
|
162
|
+
return [4 /*yield*/, off()];
|
|
163
|
+
case 2:
|
|
164
|
+
_c.sent();
|
|
165
|
+
return [4 /*yield*/, move({
|
|
166
|
+
newPosition: makeNormalCameraPosition(activeState, cameraOption),
|
|
167
|
+
})];
|
|
168
|
+
case 3:
|
|
169
|
+
_c.sent();
|
|
170
|
+
return [4 /*yield*/, free({ zoom: zoom })];
|
|
171
|
+
case 4:
|
|
172
|
+
_c.sent();
|
|
173
|
+
return [4 /*yield*/, dispatchAsync()];
|
|
174
|
+
case 5:
|
|
175
|
+
_c.sent();
|
|
176
|
+
return [2 /*return*/];
|
|
177
|
+
}
|
|
188
178
|
});
|
|
189
|
-
};
|
|
179
|
+
}); };
|
|
190
180
|
return {
|
|
191
181
|
open: open,
|
|
192
182
|
close: close,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RootState } from "@react-three/fiber";
|
|
2
2
|
import { World } from "@dimforge/rapier3d-compat";
|
|
3
|
+
import * as THREE from "three";
|
|
3
4
|
import { gaesupControllerType } from "../controller/context/type";
|
|
4
5
|
import { controllerInnerType, refsType } from "../controller/type";
|
|
5
6
|
import { dispatchType } from "../utils/type";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from "react";
|
|
2
2
|
import { actionsType, refsType } from "../../controller/type";
|
|
3
|
+
import * as THREE from "three";
|
|
3
4
|
import { joyStickInnerType } from "../../tools/joyStick/type";
|
|
4
5
|
import { keyboardMapType } from "../../tools/keyBoardToolTip/type";
|
|
5
6
|
import { minimapInnerType } from "../../tools/miniMap/type";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
+
import * as THREE from "three";
|
|
2
3
|
import { keyboardMapType } from "../tools/keyBoardToolTip/type";
|
|
3
4
|
import { dispatchType } from "../utils/type";
|
|
4
5
|
import { blockType, cameraOptionType, gaesupWorldContextType, modeType, urlsType } from "./context/type";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaesup-world",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@dimforge/rapier3d": "^0.12.0",
|
|
21
21
|
"@react-icons/all-files": "^4.1.0",
|
|
22
|
-
"@react-three/drei": "9.
|
|
23
|
-
"@react-three/fiber": "8.
|
|
24
|
-
"@react-three/rapier": "^1.
|
|
25
|
-
"@types/three": "^0.
|
|
22
|
+
"@react-three/drei": "9.102.6",
|
|
23
|
+
"@react-three/fiber": "8.16.1",
|
|
24
|
+
"@react-three/rapier": "^1.3.0",
|
|
25
|
+
"@types/three": "^0.162.0",
|
|
26
26
|
"gh-pages": "^6.1.1",
|
|
27
27
|
"leva": "0.9.35",
|
|
28
28
|
"node-fetch": "3.3.2",
|
|
@@ -31,29 +31,29 @@
|
|
|
31
31
|
"react-dom": "^18.2.0",
|
|
32
32
|
"react-icons": "^5.0.1",
|
|
33
33
|
"react-use-refs": "^1.0.1",
|
|
34
|
-
"three": "^0.
|
|
34
|
+
"three": "^0.163.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/react": "^18.2.
|
|
38
|
-
"@types/react-dom": "^18.2.
|
|
39
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
40
|
-
"@typescript-eslint/parser": "^
|
|
41
|
-
"@vanilla-extract/css": "^1.14.
|
|
37
|
+
"@types/react": "^18.2.73",
|
|
38
|
+
"@types/react-dom": "^18.2.23",
|
|
39
|
+
"@typescript-eslint/eslint-plugin": "^7.4.0",
|
|
40
|
+
"@typescript-eslint/parser": "^7.4.0",
|
|
41
|
+
"@vanilla-extract/css": "^1.14.2",
|
|
42
42
|
"@vanilla-extract/dynamic": "^2.1.0",
|
|
43
|
-
"@vanilla-extract/recipes": "^0.5.
|
|
43
|
+
"@vanilla-extract/recipes": "^0.5.2",
|
|
44
44
|
"@vanilla-extract/sprinkles": "^1.6.1",
|
|
45
|
-
"@vanilla-extract/vite-plugin": "^4.0.
|
|
45
|
+
"@vanilla-extract/vite-plugin": "^4.0.7",
|
|
46
46
|
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
47
47
|
"copyfiles": "^2.4.1",
|
|
48
48
|
"css-loader": "^6.10.0",
|
|
49
|
-
"eslint": "^8.
|
|
49
|
+
"eslint": "^8.57.0",
|
|
50
50
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
51
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
51
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
52
52
|
"path": "^0.12.7",
|
|
53
|
-
"prettier": "^3.2.
|
|
53
|
+
"prettier": "^3.2.5",
|
|
54
54
|
"rimraf": "^5.0.5",
|
|
55
|
-
"typescript": "^5.
|
|
56
|
-
"vite": "^5.
|
|
55
|
+
"typescript": "^5.4.3",
|
|
56
|
+
"vite": "^5.2.7",
|
|
57
57
|
"vite-plugin-svgr": "^4.2.0"
|
|
58
58
|
},
|
|
59
59
|
"description": "Web 3D Character Controller and World Platform Library",
|