gaesup-world 0.0.764 → 0.0.766
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/camera/control/normal.js +1 -1
- 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/gaesupProps/index.js +2 -2
- package/dist/gaesup/tools/minimap/index.js +2 -2
- package/package.json +21 -21
|
@@ -5,5 +5,5 @@ export default function normal(prop) {
|
|
|
5
5
|
.clone()
|
|
6
6
|
.add(V3(0, perspectiveCamera.YDistance, perspectiveCamera.XZDistance));
|
|
7
7
|
state.camera.position.lerp(cameraPosition, 0.9);
|
|
8
|
-
state.camera.lookAt(activeState.position.clone());
|
|
8
|
+
// state.camera.lookAt(activeState.position.clone());
|
|
9
9
|
}
|
|
@@ -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);
|
|
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
|
});
|
|
@@ -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) {
|
|
@@ -61,5 +61,5 @@ export function GaeSupProps(_a) {
|
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
}, []);
|
|
64
|
-
return (_jsx("group", { ref: groupRef, position: position, children: children }));
|
|
64
|
+
return (_jsx(Suspense, { fallback: null, children: _jsx("group", { ref: groupRef, position: position, children: children }) }));
|
|
65
65
|
}
|
|
@@ -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,
|
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.766",
|
|
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": {
|