gaesup-world 0.3.4 → 0.3.6

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.
@@ -12,7 +12,7 @@ export default function useClicker() {
12
12
  var newAngle = Math.atan2(newPosition.z - originPoint.z, newPosition.x - originPoint.x);
13
13
  var norm = Math.sqrt(Math.pow(newPosition.z - originPoint.z, 2) +
14
14
  Math.pow(newPosition.x - originPoint.x, 2));
15
- if (norm < 1)
15
+ if (norm < 2)
16
16
  return;
17
17
  dispatch({
18
18
  type: "update",
@@ -26,6 +26,7 @@ export default function useClicker() {
26
26
  },
27
27
  });
28
28
  };
29
+ // const moveClicker = _.throttle(moveClick, 100);
29
30
  // 거리 계산
30
31
  useEffect(function () {
31
32
  if (mode.controller !== "clicker")
@@ -36,7 +36,7 @@ export function normalDirection(_a) {
36
36
  }
37
37
  else if (mode.controller === "clicker") {
38
38
  activeState.euler.y = Math.PI / 2 - clicker.angle;
39
- activeState.dir.set(-Math.sin(activeState.euler.y), 0, -Math.cos(activeState.euler.y));
39
+ activeState.dir.set(-Math.sin(activeState.euler.y), 1, -Math.cos(activeState.euler.y));
40
40
  }
41
41
  else {
42
42
  // 일반 컨트롤
@@ -32,7 +32,7 @@ export default function calculation(prop) {
32
32
  if (rigidBodyRef.current && innerGroupRef.current) {
33
33
  rigidBodyRef.current.lockRotations(false, true);
34
34
  activeState.euler.set(0, 0, 0);
35
- rigidBodyRef.current.setTranslation(activeState.position.clone().add(V3(0, 2, 0)), true);
35
+ rigidBodyRef.current.setTranslation(activeState.position.clone().add(V3(0, 5, 0)), true);
36
36
  }
37
37
  }, [mode.type]);
38
38
  useFrame(function (state, delta) {
@@ -3,7 +3,7 @@ import { createContext } from "react";
3
3
  import { V3 } from "../../utils/vector";
4
4
  export var gaesupWorldDefault = {
5
5
  activeState: {
6
- position: V3(0, 1, 5),
6
+ position: V3(0, 5, 5),
7
7
  impulse: vec3(),
8
8
  velocity: vec3(),
9
9
  acceleration: vec3(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.3.4",
3
+ "version": "0.3.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -25,6 +25,7 @@
25
25
  "@types/three": "^0.161.2",
26
26
  "gh-pages": "^6.1.1",
27
27
  "leva": "0.9.35",
28
+ "lodash": "^4.17.21",
28
29
  "node-fetch": "3.3.2",
29
30
  "react": "^18.2.0",
30
31
  "react-device-detect": "^2.2.3",