gaesup-world 0.8.45 → 0.8.47
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 +2 -2
- package/dist/gaesup/component/active/character/index.js +1 -1
- package/dist/gaesup/component/inner/common/RigidbodyRef.d.ts +2 -2
- package/dist/gaesup/component/inner/common/RigidbodyRef.js +1 -1
- package/dist/gaesup/component/inner/common/type.d.ts +2 -2
- package/dist/gaesup/component/passive/type.d.ts +2 -2
- package/dist/gaesup/controller/index.js +1 -1
- package/dist/gaesup/tools/rideable/type.d.ts +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { V3 } from "../../utils/vector";
|
|
2
2
|
export var makeNormalCameraPosition = function (activeState, cameraOption) {
|
|
3
|
-
var YDistance = cameraOption.YDistance, ZDistance = cameraOption.ZDistance;
|
|
3
|
+
var XDistance = cameraOption.XDistance, YDistance = cameraOption.YDistance, ZDistance = cameraOption.ZDistance;
|
|
4
4
|
var cameraPosition = activeState.position
|
|
5
5
|
.clone()
|
|
6
|
-
.add(V3(
|
|
6
|
+
.add(V3(XDistance, YDistance, ZDistance));
|
|
7
7
|
return cameraPosition;
|
|
8
8
|
};
|
|
9
9
|
export default function normal(prop) {
|
|
@@ -13,5 +13,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
13
|
import { CharacterInnerRef } from "../../inner/character";
|
|
14
14
|
export function CharacterRef(_a) {
|
|
15
15
|
var children = _a.children, props = _a.props, refs = _a.refs, urls = _a.urls;
|
|
16
|
-
return (_jsx(CharacterInnerRef, __assign({ url: urls.characterUrl, isActive: true, componentType: "character", rigidbodyType: "dynamic", controllerOptions: props.controllerOptions, groundRay: props.groundRay, onAnimate: props.onAnimate, onFrame: props.onFrame, onReady: props.onReady, onDestory: props.onDestory }, refs, { children: children })));
|
|
16
|
+
return (_jsx(CharacterInnerRef, __assign({ url: urls.characterUrl, isActive: true, componentType: "character", rigidbodyType: "dynamic", controllerOptions: props.controllerOptions, groundRay: props.groundRay, onAnimate: props.onAnimate, onFrame: props.onFrame, onReady: props.onReady, onDestory: props.onDestory, rigidBodyProps: props.rigidBodyProps }, refs, { children: children })));
|
|
17
17
|
}
|
|
@@ -9,7 +9,7 @@ export declare const RigidBodyRef: import("react").ForwardRefExoticComponent<{
|
|
|
9
9
|
isActive?: boolean;
|
|
10
10
|
ridingUrl?: string;
|
|
11
11
|
groundRay?: import("../../../controller/type").groundRayType;
|
|
12
|
-
rigidBodyProps?:
|
|
12
|
+
rigidBodyProps?: import("@react-three/rapier").RigidBodyProps;
|
|
13
13
|
} & {
|
|
14
14
|
children?: import("react").ReactNode;
|
|
15
15
|
groundRay?: import("../../../controller/type").groundRayType;
|
|
@@ -29,7 +29,7 @@ export declare const RigidBodyRef: import("react").ForwardRefExoticComponent<{
|
|
|
29
29
|
userData?: {
|
|
30
30
|
intangible: boolean;
|
|
31
31
|
};
|
|
32
|
-
rigidBodyProps?:
|
|
32
|
+
rigidBodyProps?: import("@react-three/rapier").RigidBodyProps;
|
|
33
33
|
outerGroupProps?: THREE.Group<THREE.Object3DEventMap>;
|
|
34
34
|
innerGroupProps?: THREE.Group<THREE.Object3DEventMap>;
|
|
35
35
|
} & import("./type").ridingType & import("../../passive/type").innerRefType & import("../../../controller/initialize/callback/type").callbackType & import("react").RefAttributes<RapierRigidBody>>;
|
|
@@ -85,5 +85,5 @@ export var RigidBodyRef = forwardRef(function (props, ref) {
|
|
|
85
85
|
});
|
|
86
86
|
return (_jsxs(RigidBody, __assign({ colliders: false, ref: ref, name: props.name, rotation: euler()
|
|
87
87
|
.set(0, ((_a = props.rotation) === null || _a === void 0 ? void 0 : _a.clone().y) || 0, 0)
|
|
88
|
-
.clone(), userData: props.userData, type: props.rigidbodyType || (props.isActive ? "dynamic" : "fixed"), sensor: props.sensor, onIntersectionEnter: props.onIntersectionEnter, onCollisionEnter: props.onCollisionEnter }, props.rigidBodyProps, { children: [_jsx(CapsuleCollider, { ref: props.colliderRef, args: [(size.y / 2 - size.x) * 1.2, size.x * 1.2], position: [0, (size.y / 2 + size.x / 2) * 1.2, 0] }),
|
|
88
|
+
.clone(), userData: props.userData, type: props.rigidbodyType || (props.isActive ? "dynamic" : "fixed"), sensor: props.sensor, onIntersectionEnter: props.onIntersectionEnter, onCollisionEnter: props.onCollisionEnter }, props.rigidBodyProps, { children: [_jsx(CapsuleCollider, { ref: props.colliderRef, args: [(size.y / 2 - size.x) * 1.2, size.x * 1.2], position: [0, (size.y / 2 + size.x / 2) * 1.2, 0] }), _jsx(InnerGroupRef, { objectNode: objectNode, animationRef: animationRef, nodes: nodes, ref: props.innerGroupRef, isActive: props.isActive, isRiderOn: props.isRiderOn, enableRiding: props.enableRiding, ridingUrl: props.ridingUrl, offset: props.offset, children: props.children })] })));
|
|
89
89
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collider } from "@dimforge/rapier3d-compat";
|
|
2
|
-
import {
|
|
2
|
+
import { RigidBodyProps, RigidBodyTypeString } from "@react-three/rapier";
|
|
3
3
|
import { MutableRefObject, RefObject } from "react";
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
import { callbackType } from "../../../controller/initialize/callback/type";
|
|
@@ -55,5 +55,5 @@ export type rigidBodyRefType = {
|
|
|
55
55
|
isActive?: boolean;
|
|
56
56
|
ridingUrl?: string;
|
|
57
57
|
groundRay?: groundRayType;
|
|
58
|
-
rigidBodyProps?:
|
|
58
|
+
rigidBodyProps?: RigidBodyProps;
|
|
59
59
|
} & passivePropsType & innerRefType & callbackType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Collider } from "@dimforge/rapier3d-compat";
|
|
2
|
-
import { CollisionEnterPayload, RapierRigidBody, RigidBodyTypeString } from "@react-three/rapier";
|
|
2
|
+
import { CollisionEnterPayload, RapierRigidBody, RigidBodyProps, RigidBodyTypeString } from "@react-three/rapier";
|
|
3
3
|
import { MutableRefObject } from "react";
|
|
4
4
|
import * as THREE from "three";
|
|
5
5
|
import { controllerOptionsType, groundRayType } from "../../controller/type";
|
|
@@ -30,7 +30,7 @@ export type passivePropsType = {
|
|
|
30
30
|
userData?: {
|
|
31
31
|
intangible: boolean;
|
|
32
32
|
};
|
|
33
|
-
rigidBodyProps?:
|
|
33
|
+
rigidBodyProps?: RigidBodyProps;
|
|
34
34
|
outerGroupProps?: THREE.Group;
|
|
35
35
|
innerGroupProps?: THREE.Group;
|
|
36
36
|
} & ridingType;
|
|
@@ -65,7 +65,7 @@ export function GaesupControllerInner(props) {
|
|
|
65
65
|
}, []);
|
|
66
66
|
var prop = __assign(__assign(__assign(__assign({}, initControllerProps({
|
|
67
67
|
refs: refs,
|
|
68
|
-
})), { children: props.children, groupProps: props.groupProps, controllerOptions: gaesupControl.value.controllerOptions }), gaesupControl.value.callbacks), refs);
|
|
68
|
+
})), { children: props.children, groupProps: props.groupProps, rigidBodyProps: props.rigidBodyProps, controllerOptions: gaesupControl.value.controllerOptions }), gaesupControl.value.callbacks), refs);
|
|
69
69
|
initDebug({
|
|
70
70
|
controllerContext: gaesupControl.value,
|
|
71
71
|
controllerDispatch: gaesupControl.dispatch,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RigidBodyProps } from "@react-three/rapier";
|
|
2
2
|
import * as THREE from "three";
|
|
3
3
|
import { controllerOptionsType } from "../../controller/type";
|
|
4
4
|
export type rideablePropType = {
|
|
@@ -19,7 +19,7 @@ export type rideablePropType = {
|
|
|
19
19
|
vehicleSize?: THREE.Vector3;
|
|
20
20
|
wheelSize?: THREE.Vector3;
|
|
21
21
|
airplaneSize?: THREE.Vector3;
|
|
22
|
-
rigidBodyProps?:
|
|
22
|
+
rigidBodyProps?: RigidBodyProps;
|
|
23
23
|
outerGroupProps?: THREE.Group;
|
|
24
24
|
innerGroupProps?: THREE.Group;
|
|
25
25
|
};
|