gaesup-world 0.0.74 → 0.0.76

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.
@@ -56,7 +56,7 @@ export function usePlayActions() {
56
56
  export default function playCharacterActions(_a) {
57
57
  var groundRay = _a.groundRay;
58
58
  var _b = usePlayActions(), _c = _b.resultRef.character, actions = _c.actions, ref = _c.ref, play = _b.play, setAnimationName = _b.setAnimationName;
59
- var _d = useContext(GaesupWorldContext), states = _d.states, activeState = _d.activeState, animations = _d.animations, mode = _d.mode, freeze = _d.freeze;
59
+ var _d = useContext(GaesupWorldContext), states = _d.states, activeState = _d.activeState, animations = _d.animations, mode = _d.mode;
60
60
  var isNotMoving = states.isNotMoving, isMoving = states.isMoving, isJumping = states.isJumping, isRunning = states.isRunning, isAnimationOuter = states.isAnimationOuter, isOnTheGround = states.isOnTheGround;
61
61
  var dispatch = useContext(GaesupWorldDispatchContext);
62
62
  var control = useKeyboardControls()[1]();
@@ -74,16 +74,14 @@ export default function playCharacterActions(_a) {
74
74
  };
75
75
  }, []);
76
76
  useEffect(function () {
77
- if (!freeze) {
78
- animations.keyControl = control;
79
- dispatch({
80
- type: "update",
81
- payload: {
82
- animations: __assign({}, animations),
83
- },
84
- });
85
- }
86
- }, [control, freeze]);
77
+ animations.keyControl = control;
78
+ dispatch({
79
+ type: "update",
80
+ payload: {
81
+ animations: __assign({}, animations),
82
+ },
83
+ });
84
+ }, [control]);
87
85
  useEffect(function () {
88
86
  var _a;
89
87
  if (mode.type === "character") {
@@ -118,9 +116,9 @@ export default function playCharacterActions(_a) {
118
116
  // }
119
117
  // }
120
118
  // }
121
- if (groundRay.hit === null && activeState.velocity.y < 0) {
122
- playFall();
123
- }
119
+ // if (groundRay.hit === null && activeState.velocity.y < 0) {
120
+ // playFall();
121
+ // }
124
122
  }
125
123
  }
126
124
  });
@@ -22,7 +22,7 @@ export default function initControllerProps(_a) {
22
22
  var _b = useKeyboardControls(), _ = _b[0], getKeys = _b[1];
23
23
  var keyControl = getKeys();
24
24
  useEffect(function () {
25
- if (context && keyControl && context.control && !context.freeze) {
25
+ if (context && keyControl && context.control) {
26
26
  dispatch({
27
27
  type: "update",
28
28
  payload: {
@@ -32,7 +32,7 @@ export default function initControllerProps(_a) {
32
32
  },
33
33
  });
34
34
  }
35
- }, [context.mode.controller, keyControl, context.control, context.freeze]);
35
+ }, [context.mode.controller, keyControl, context.control]);
36
36
  var groundRay = useMemo(function () {
37
37
  return {
38
38
  origin: vec3(),
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
12
12
  import { useContext } from "react";
13
13
  import { GaesupWorldContext, GaesupWorldDispatchContext, } from "../../world/context";
14
14
  export function usePushKey() {
15
- var _a = useContext(GaesupWorldContext), control = _a.control, freeze = _a.freeze;
15
+ var control = useContext(GaesupWorldContext).control;
16
16
  var dispatch = useContext(GaesupWorldDispatchContext);
17
17
  var pushKey = function (key, value) {
18
18
  control[key] = value;
@@ -2,7 +2,6 @@ import { euler, quat, vec3 } from "@react-three/rapier";
2
2
  import { createContext } from "react";
3
3
  import { V3 } from "../../utils/vector";
4
4
  export var gaesupWorldDefault = {
5
- freeze: false,
6
5
  activeState: {
7
6
  position: V3(0, 1, 5),
8
7
  impulse: vec3(),
@@ -3,7 +3,6 @@ export declare function gaesupWorldReducer(props: gaesupWorldContextType, action
3
3
  type: string;
4
4
  payload?: Partial<gaesupWorldContextType>;
5
5
  }): {
6
- freeze: boolean;
7
6
  activeState: import("./type").activeStateType;
8
7
  characterCollider: import("./type").characterColliderType;
9
8
  vehicleCollider: import("./type").vehicleColliderType;
@@ -102,7 +102,6 @@ type KeyboardControlsState<T extends string = string> = {
102
102
  [K in T]: boolean;
103
103
  };
104
104
  export type gaesupWorldContextType = {
105
- freeze: boolean;
106
105
  activeState: activeStateType;
107
106
  characterCollider: characterColliderType;
108
107
  vehicleCollider: vehicleColliderType;
@@ -3,7 +3,6 @@ import { gaesupWorldPropsType } from "../type";
3
3
  export default function initGaesupWorld(props: gaesupWorldPropsType): {
4
4
  gaesupProps: {
5
5
  value: {
6
- freeze: boolean;
7
6
  activeState: import("../context/type").activeStateType;
8
7
  characterCollider: import("../context/type").characterColliderType;
9
8
  vehicleCollider: import("../context/type").vehicleColliderType;
@@ -17,7 +17,6 @@ import initColider from "./collider";
17
17
  export default function initGaesupWorld(props) {
18
18
  var _a = useReducer(gaesupWorldReducer, {
19
19
  debug: props.debug || gaesupWorldDefault.debug,
20
- freeze: props.freeze || false,
21
20
  activeState: gaesupWorldDefault.activeState,
22
21
  characterCollider: Object.assign(gaesupWorldDefault.characterCollider, props.characterCollider || {}),
23
22
  vehicleCollider: Object.assign(gaesupWorldDefault.vehicleCollider, props.vehicleCollider || {}),
@@ -9,7 +9,6 @@ export type gaesupWorldInitType = {
9
9
  export type gaesupWorldPropsType = {
10
10
  children: ReactNode;
11
11
  startPosition?: THREE.Vector3;
12
- freeze?: boolean;
13
12
  url?: urlType;
14
13
  characterCollider?: characterColliderType;
15
14
  vehicleCollider?: vehicleColliderType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "type": "commonjs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",