gaesup-world 0.8.48 → 0.8.51

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.
@@ -33,4 +33,5 @@ export declare const RigidBodyRef: import("react").ForwardRefExoticComponent<{
33
33
  rigidBodyProps?: import("@react-three/rapier").RigidBodyProps;
34
34
  outerGroupProps?: THREE.Group<THREE.Object3DEventMap>;
35
35
  innerGroupProps?: THREE.Group<THREE.Object3DEventMap>;
36
+ parts?: string[];
36
37
  } & import("./type").ridingType & import("../../passive/type").innerRefType & import("../../../controller/initialize/callback/type").callbackType & import("react").RefAttributes<RapierRigidBody>>;
@@ -33,4 +33,5 @@ export type passivePropsType = {
33
33
  rigidBodyProps?: RigidBodyProps;
34
34
  outerGroupProps?: THREE.Group;
35
35
  innerGroupProps?: THREE.Group;
36
+ parts?: string[];
36
37
  } & ridingType;
@@ -3,7 +3,7 @@ import * as THREE from "three";
3
3
  import { calcNorm } from "../../utils";
4
4
  export default function queue(prop) {
5
5
  var _a;
6
- var rigidBodyRef = prop.rigidBodyRef, state = prop.state, _b = prop.worldContext, clicker = _b.clicker, mode = _b.mode, clickerOption = _b.clickerOption;
6
+ var rigidBodyRef = prop.rigidBodyRef, state = prop.state, _b = prop.worldContext, clicker = _b.clicker, mode = _b.mode, clickerOption = _b.clickerOption, block = _b.block;
7
7
  var u = vec3((_a = rigidBodyRef.current) === null || _a === void 0 ? void 0 : _a.translation());
8
8
  var norm = calcNorm(u, clicker.point, false);
9
9
  if (clickerOption.autoStart) {
@@ -25,7 +25,16 @@ export default function queue(prop) {
25
25
  clicker.angle = newAngle;
26
26
  }
27
27
  else {
28
- Q();
28
+ var action = Q.action, beforeCB = Q.beforeCB, afterCB_1 = Q.afterCB, time = Q.time;
29
+ if (action === "stop") {
30
+ state.clock.stop();
31
+ beforeCB(state);
32
+ console.log();
33
+ setTimeout(function () {
34
+ state.clock.start();
35
+ afterCB_1(state);
36
+ }, time);
37
+ }
29
38
  }
30
39
  if (clickerOption.loop) {
31
40
  clickerOption.queue.push(Q);
@@ -1,5 +1,6 @@
1
1
  import { CSSProperties } from "react";
2
2
  import { actionsType, refsType } from "../../controller/type";
3
+ import { RootState } from "@react-three/fiber";
3
4
  import * as THREE from "three";
4
5
  import { rideableType } from "../../hooks/useRideable/type";
5
6
  import { joyStickInnerType } from "../../tools/joystick/type";
@@ -107,7 +108,14 @@ export type clickerType = {
107
108
  isOn: boolean;
108
109
  isRun: boolean;
109
110
  };
110
- export type queueItemtype = THREE.Vector3 | Function;
111
+ export type queueActionType = "stop";
112
+ export type queueFunctionType = {
113
+ action: queueActionType;
114
+ beforeCB: (state: RootState) => void;
115
+ afterCB: (state: RootState) => void;
116
+ time: number;
117
+ };
118
+ export type queueItemtype = THREE.Vector3 | queueFunctionType;
111
119
  export type queueType = queueItemtype[];
112
120
  export type clickerOptionType = {
113
121
  autoStart?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.8.48",
3
+ "version": "0.8.51",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",