gaesup-world 0.6.31 → 0.6.33
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.
|
@@ -67,33 +67,5 @@ export default function Camera(_a) {
|
|
|
67
67
|
cameraOption.position = makeNormalCameraPosition(activeState, cameraOption);
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
|
-
// lookat
|
|
71
|
-
// useEffect(() => {
|
|
72
|
-
// if (cameraRef.current) {
|
|
73
|
-
// const currentCamera = camera.position.clone();
|
|
74
|
-
// if (cameraOption.focus) {
|
|
75
|
-
// cameraRef.current.setLookAt(
|
|
76
|
-
// currentCamera.x,
|
|
77
|
-
// currentCamera.y,
|
|
78
|
-
// currentCamera.z,
|
|
79
|
-
// cameraOption.target.x,
|
|
80
|
-
// cameraOption.target.y,
|
|
81
|
-
// cameraOption.target.z,
|
|
82
|
-
// true
|
|
83
|
-
// );
|
|
84
|
-
// // 포커스 품
|
|
85
|
-
// } else if (!cameraOption.focus) {
|
|
86
|
-
// cameraRef.current.setLookAt(
|
|
87
|
-
// currentCamera.x,
|
|
88
|
-
// currentCamera.y,
|
|
89
|
-
// currentCamera.z,
|
|
90
|
-
// activeState.position.x,
|
|
91
|
-
// activeState.position.y,
|
|
92
|
-
// activeState.position.z,
|
|
93
|
-
// true
|
|
94
|
-
// );
|
|
95
|
-
// }
|
|
96
|
-
// }
|
|
97
|
-
// }, [cameraOption.focus]);
|
|
98
70
|
return _jsx(CameraControls, { ref: cameraRef });
|
|
99
71
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { vec3 } from "@react-three/rapier";
|
|
3
|
-
import { useContext } from "react";
|
|
3
|
+
import { useContext, useMemo } from "react";
|
|
4
4
|
import calculation from "../physics";
|
|
5
5
|
import { GaesupWorldContext } from "../world/context";
|
|
6
6
|
import { AirplaneRef } from "./active/airplane";
|
|
@@ -11,9 +11,12 @@ export function GaesupComponent(_a) {
|
|
|
11
11
|
var _b = useContext(GaesupWorldContext), mode = _b.mode, states = _b.states, rideable = _b.rideable;
|
|
12
12
|
var enableRiding = states.enableRiding, isRiderOn = states.isRiderOn, rideableId = states.rideableId;
|
|
13
13
|
calculation(props);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
var MemorizeComponent = useMemo(function () {
|
|
15
|
+
return (_jsxs(_Fragment, { children: [mode.type === "character" && (_jsx(CharacterRef, { props: props, refs: refs, urls: urls })), mode.type === "vehicle" && (_jsx(VehicleRef, { props: props, groundRay: props.groundRay, refs: refs, urls: urls, enableRiding: enableRiding, isRiderOn: isRiderOn, offset: rideableId && rideable[rideableId]
|
|
16
|
+
? rideable[rideableId].offset
|
|
17
|
+
: vec3(), children: props.children })), mode.type === "airplane" && (_jsx(AirplaneRef, { props: props, groundRay: props.groundRay, refs: refs, urls: urls, enableRiding: enableRiding, isRiderOn: isRiderOn, offset: rideableId && rideable[rideableId]
|
|
18
|
+
? rideable[rideableId].offset
|
|
19
|
+
: vec3(), children: props.children }))] }));
|
|
20
|
+
}, [mode.type]);
|
|
21
|
+
return (_jsx(_Fragment, { children: MemorizeComponent }));
|
|
19
22
|
}
|
|
@@ -22,7 +22,7 @@ export function PassiveCharacter(props) {
|
|
|
22
22
|
};
|
|
23
23
|
}, [props]), position = _a.position, euler = _a.euler;
|
|
24
24
|
useEffect(function () {
|
|
25
|
-
if (rigidBodyRef
|
|
25
|
+
if (rigidBodyRef && rigidBodyRef.current) {
|
|
26
26
|
rigidBodyRef.current.setEnabledRotations(false, false, false, false);
|
|
27
27
|
}
|
|
28
28
|
}, []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gaesup-world",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.33",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@dimforge/rapier3d": "^0.12.0",
|
|
21
21
|
"@dimforge/rapier3d-compat": "^0.12.0",
|
|
22
22
|
"@react-icons/all-files": "^4.1.0",
|
|
23
|
-
"@react-three/drei": "9.105.
|
|
24
|
-
"@react-three/fiber": "8.16.
|
|
23
|
+
"@react-three/drei": "9.105.4",
|
|
24
|
+
"@react-three/fiber": "8.16.2",
|
|
25
25
|
"@react-three/rapier": "^1.3.0",
|
|
26
26
|
"@types/three": "^0.163.0",
|
|
27
27
|
"gh-pages": "^6.1.1",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/lodash": "^4.17.0",
|
|
41
|
-
"@types/react": "^18.2.
|
|
42
|
-
"@types/react-dom": "^18.2.
|
|
41
|
+
"@types/react": "^18.2.78",
|
|
42
|
+
"@types/react-dom": "^18.2.25",
|
|
43
43
|
"@typescript-eslint/eslint-plugin": "^7.6.0",
|
|
44
44
|
"@typescript-eslint/parser": "^7.6.0",
|
|
45
45
|
"@vanilla-extract/css": "^1.14.2",
|