gaesup-world 0.0.766 → 0.0.768

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.
@@ -5,5 +5,5 @@ export default function normal(prop) {
5
5
  .clone()
6
6
  .add(V3(0, perspectiveCamera.YDistance, perspectiveCamera.XZDistance));
7
7
  state.camera.position.lerp(cameraPosition, 0.9);
8
- // state.camera.lookAt(activeState.position.clone());
8
+ state.camera.lookAt(activeState.position.clone());
9
9
  }
@@ -14,5 +14,5 @@ export default function orbit(prop) {
14
14
  .multiply(perspectiveCamera.isFront
15
15
  ? quat().setFromAxisAngle(V3(0, 1, 0), Math.PI)
16
16
  : quat()));
17
- // state.camera.lookAt(activeState.position);
17
+ state.camera.lookAt(activeState.position.clone());
18
18
  }
@@ -32,7 +32,7 @@ export default function initControllerProps(_a) {
32
32
  },
33
33
  });
34
34
  }
35
- }, [context.mode.controller, keyControl, context.control]);
35
+ }, [context === null || context === void 0 ? void 0 : context.mode.controller, keyControl, context === null || context === void 0 ? void 0 : context.control]);
36
36
  var groundRay = useMemo(function () {
37
37
  return {
38
38
  origin: vec3(),
@@ -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,
@@ -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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.0.766",
3
+ "version": "0.0.768",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",