gaesup-world 0.6.76 → 0.6.78
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.
|
@@ -9,10 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { useFrame } from "@react-three/fiber";
|
|
14
14
|
import { quat } from "@react-three/rapier";
|
|
15
|
-
import {
|
|
15
|
+
import { useRef } from "react";
|
|
16
16
|
import { AirplaneInnerRef } from "../../inner/airplane";
|
|
17
17
|
export function PassiveAirplane(props) {
|
|
18
18
|
var rigidBodyRef = useRef(null);
|
|
@@ -39,13 +39,10 @@ export function PassiveAirplane(props) {
|
|
|
39
39
|
: 0.1, false);
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, props, refs, { children: props.children })));
|
|
49
|
-
}, [props.position, props.rotation, props.currentAnimation]);
|
|
50
|
-
return _jsx(_Fragment, { children: memorized });
|
|
42
|
+
return (_jsx(AirplaneInnerRef, __assign({ isActive: false, componentType: "airplane", name: "airplane", controllerOptions: props.controllerOptions || {
|
|
43
|
+
lerp: {
|
|
44
|
+
cameraTurn: 1,
|
|
45
|
+
cameraPosition: 1,
|
|
46
|
+
},
|
|
47
|
+
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, props, refs, { children: props.children })));
|
|
51
48
|
}
|
|
@@ -9,8 +9,8 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
13
|
-
import { useEffect,
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useEffect, useRef } from "react";
|
|
14
14
|
import { CharacterInnerRef } from "../../inner/character";
|
|
15
15
|
export function PassiveCharacter(props) {
|
|
16
16
|
var rigidBodyRef = useRef(null);
|
|
@@ -28,13 +28,10 @@ export function PassiveCharacter(props) {
|
|
|
28
28
|
rigidBodyRef.current.setEnabledRotations(false, false, false, false);
|
|
29
29
|
}
|
|
30
30
|
}, []);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, refs, props, { children: props.children })));
|
|
38
|
-
}, [props.position, props.rotation, props.currentAnimation]);
|
|
39
|
-
return _jsx(_Fragment, { children: memorized });
|
|
31
|
+
return (_jsx(CharacterInnerRef, __assign({ isActive: false, componentType: "character", controllerOptions: props.controllerOptions || {
|
|
32
|
+
lerp: {
|
|
33
|
+
cameraTurn: 1,
|
|
34
|
+
cameraPosition: 1,
|
|
35
|
+
},
|
|
36
|
+
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, refs, props, { children: props.children })));
|
|
40
37
|
}
|
|
@@ -9,12 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx
|
|
13
|
-
import {
|
|
14
|
-
import { GaesupWorldContext } from "../../../world/context";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { useRef } from "react";
|
|
15
14
|
import { VehicleInnerRef } from "../../inner/vehicle";
|
|
16
15
|
export function PassiveVehicle(props) {
|
|
17
|
-
var states = useContext(GaesupWorldContext).states;
|
|
18
16
|
var rigidBodyRef = useRef(null);
|
|
19
17
|
var outerGroupRef = useRef(null);
|
|
20
18
|
var innerGroupRef = useRef(null);
|
|
@@ -25,13 +23,10 @@ export function PassiveVehicle(props) {
|
|
|
25
23
|
innerGroupRef: innerGroupRef,
|
|
26
24
|
colliderRef: colliderRef,
|
|
27
25
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, props, refs, { children: props.children })));
|
|
35
|
-
}, [props.position, props.rotation, props.currentAnimation]);
|
|
36
|
-
return _jsx(_Fragment, { children: memorized });
|
|
26
|
+
return (_jsx(VehicleInnerRef, __assign({ isActive: false, componentType: "vehicle", name: "vehicle", controllerOptions: props.controllerOptions || {
|
|
27
|
+
lerp: {
|
|
28
|
+
cameraTurn: 1,
|
|
29
|
+
cameraPosition: 1,
|
|
30
|
+
},
|
|
31
|
+
}, position: props.position.clone(), rotation: props.rotation.clone(), currentAnimation: props.currentAnimation }, props, refs, { children: props.children })));
|
|
37
32
|
}
|
|
@@ -55,7 +55,26 @@ export default function initGaesupWorld(props) {
|
|
|
55
55
|
},
|
|
56
56
|
});
|
|
57
57
|
}, []);
|
|
58
|
-
var gaesupProps = useMemo(function () { return ({ value: value, dispatch: dispatch }); }, [
|
|
58
|
+
var gaesupProps = useMemo(function () { return ({ value: value, dispatch: dispatch }); }, [
|
|
59
|
+
value,
|
|
60
|
+
value.activeState,
|
|
61
|
+
value.mode,
|
|
62
|
+
value.urls,
|
|
63
|
+
value.states,
|
|
64
|
+
value.rideable,
|
|
65
|
+
value.debug,
|
|
66
|
+
value.minimap,
|
|
67
|
+
value.joystick,
|
|
68
|
+
value.control,
|
|
69
|
+
value.clicker,
|
|
70
|
+
value.animationState,
|
|
71
|
+
value.keyBoardMap,
|
|
72
|
+
value.moveTo,
|
|
73
|
+
value.block,
|
|
74
|
+
value.sizes,
|
|
75
|
+
value.callback,
|
|
76
|
+
dispatch,
|
|
77
|
+
]);
|
|
59
78
|
initDebug({ value: gaesupProps.value, dispatch: dispatch });
|
|
60
79
|
return {
|
|
61
80
|
gaesupProps: gaesupProps,
|