gaesup-world 0.0.767 → 0.0.769

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export declare function GaeSupProps({ text, position, jumpPoint, children, }: {
3
- text: string;
3
+ text?: string;
4
4
  position?: [number, number, number];
5
5
  jumpPoint?: boolean;
6
6
  children: React.ReactNode;
@@ -31,7 +31,7 @@ export function GaeSupProps(_a) {
31
31
  useEffect(function () {
32
32
  if (jumpPoint && position) {
33
33
  points.push({
34
- text: text,
34
+ text: text || null,
35
35
  position: vec3().set(position[0], 5, position[2]),
36
36
  });
37
37
  dispatch({
@@ -44,9 +44,7 @@ export function GaeSupProps(_a) {
44
44
  if (groupRef.current) {
45
45
  var box = new THREE.Box3().setFromObject(groupRef.current);
46
46
  var size = vec3(box.getSize(new THREE.Vector3())).clone();
47
- // .multiplyScalar(minimap.ratio);
48
47
  var center = vec3(box.getCenter(new THREE.Vector3())).clone();
49
- // .multiplyScalar(minimap.ratio);
50
48
  var obj = {
51
49
  text: text,
52
50
  size: size,
@@ -1,5 +1,6 @@
1
1
  export { GameBoy } from "./gameboy";
2
2
  export { GamePad } from "./gamepad";
3
3
  export { JoyStick } from "./joystick";
4
+ export { JumpPortal } from "./jumpPoint";
4
5
  export { KeyBoardToolTip } from "./keyBoardToolTip";
5
6
  export { MiniMap } from "./minimap";
@@ -1,5 +1,6 @@
1
1
  export { GameBoy } from "./gameboy";
2
2
  export { GamePad } from "./gamepad";
3
3
  export { JoyStick } from "./joystick";
4
+ export { JumpPortal } from "./jumpPoint";
4
5
  export { KeyBoardToolTip } from "./keyBoardToolTip";
5
6
  export { MiniMap } from "./minimap";
@@ -1 +1,3 @@
1
+ import { pointType } from "../../world/context/type.js";
1
2
  export default function JumpPoint(): import("react/jsx-runtime").JSX.Element;
3
+ export declare function JumpPortal(props: pointType): import("react/jsx-runtime").JSX.Element;
@@ -12,3 +12,10 @@ export default function JumpPoint() {
12
12
  }, children: obj.text }, key));
13
13
  }) }));
14
14
  }
15
+ export function JumpPortal(props) {
16
+ var refs = useContext(GaesupWorldContext).refs;
17
+ return (_jsx("div", { className: style.jumpPoint, onClick: function () {
18
+ var _a, _b;
19
+ (_b = (_a = refs.rigidBodyRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.setTranslation(props.position, true);
20
+ }, children: props.text }));
21
+ }
@@ -48,7 +48,7 @@ export function MiniMap(props) {
48
48
  var center = _a.center, size = _a.size, text = _a.text;
49
49
  var X = (center.x - activeState.position.x) * scale;
50
50
  var Z = (center.z - activeState.position.z) * scale;
51
- return (_jsx("div", { className: style.minimapObject, style: assignInlineVars(__assign({ width: "".concat(size.x * scale, "rem"), height: "".concat(size.z * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50%, -50%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%" }, objectStyle)), children: _jsx("div", { className: style.text, style: assignInlineVars(textStyle), children: text }) }, key));
51
+ return (_jsx("div", { className: style.minimapObject, style: assignInlineVars(__assign({ width: "".concat(size.x * scale, "rem"), height: "".concat(size.z * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50%, -50%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%" }, objectStyle)), children: text && (_jsx("div", { className: style.text, style: assignInlineVars(textStyle), children: text })) }, key));
52
52
  }), _jsx("div", { className: style.avatar, style: assignInlineVars(avatarStyle) })] }), !props.blockScaleControl && (_jsxs("div", { className: style.scale, style: assignInlineVars(scaleStyle), children: [_jsx("div", { className: style.plusMinus, style: assignInlineVars(plusMinusStyle), onClick: function () {
53
53
  if (props.blockScale)
54
54
  return;
@@ -1,7 +1,7 @@
1
1
  import * as THREE from "three";
2
2
  import { VECssType } from "../type";
3
3
  export type minimapPropsType = {
4
- text: string;
4
+ text?: string;
5
5
  center: THREE.Vector3;
6
6
  size: THREE.Vector3;
7
7
  };
@@ -3,6 +3,7 @@ import { actionsType, animationTagType, refsType } from "../../controller/type";
3
3
  import { joyStickInnerType } from "../../tools/joystick/type";
4
4
  import { keyboardMapType } from "../../tools/keyBoardToolTip/type";
5
5
  import { minimapInnerType } from "../../tools/minimap/type";
6
+ import { VECssType } from "../../tools/type";
6
7
  import { dispatchType } from "../../utils/type";
7
8
  export type controlType = {
8
9
  forward: boolean;
@@ -15,8 +16,9 @@ export type keyControlType = {
15
16
  [key: string]: boolean;
16
17
  };
17
18
  export type pointType = {
18
- text: string;
19
+ text?: string;
19
20
  position: THREE.Vector3;
21
+ pointStlye?: Partial<VECssType>;
20
22
  };
21
23
  export type pointsType = pointType[];
22
24
  export type statesType = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.0.767",
3
+ "version": "0.0.769",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",