gaesup-world 0.6.87 → 0.6.89

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.
@@ -35,7 +35,7 @@ export function MiniMap(props) {
35
35
  upscale();
36
36
  else
37
37
  downscale();
38
- }, children: [_jsx("div", { className: "minimapOuter", style: objectStyle }), _jsxs("div", { className: "minimapInner", style: __assign({ transform: props.blockRotate
38
+ }, children: [_jsx("div", { className: "minimapOuter", style: objectStyle }), _jsxs("div", { className: "minimapInner", style: __assign({ transform: props.blockRotate || mode.control === "normal"
39
39
  ? "translate(-50%, -50%) rotate(180deg) "
40
40
  : "translate(-50%, -50%) rotate(".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, innerStyle), children: [" ", _jsx("div", { className: "east direction", style: __assign({ transform: props.blockRotate || mode.control === "normal"
41
41
  ? "translate(-50%, -50%) rotate(180deg) "
@@ -47,8 +47,12 @@ export function MiniMap(props) {
47
47
  ? "translate(-50%, -50%) rotate(180deg) "
48
48
  : "translate(-50%, -50%) rotate(-".concat((activeState.euler.y * 180) / Math.PI + 180, "deg) ") }, directionStyle), children: "N" }), "\u00E7", Object.values(minimap.props).map(function (_a, key) {
49
49
  var center = _a.center, size = _a.size, text = _a.text;
50
- var X = (center.x - activeState.position.x) * scale;
51
- var Z = (center.z - activeState.position.z) * scale;
50
+ var X = (center.x - activeState.position.x) *
51
+ (props.angle ? Math.cos(props.angle) : 1) *
52
+ scale;
53
+ var Z = (center.z - activeState.position.z) *
54
+ (props.angle ? -Math.sin(props.angle) : 1) *
55
+ scale;
52
56
  return (_jsxs("div", { children: [_jsx("div", { className: "minimapObject", style: __assign({ width: "".concat(size.x * scale, "rem"), height: "".concat(size.z * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50.1%, -50.1%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%", zIndex: 1 + key }, objectStyle) }, key), _jsx("div", { className: "imageObject", style: __assign({ width: "".concat(props.imageWidth * scale, "rem"), height: "".concat(props.imageHeight * scale, "rem"), top: "50%", left: "50%", transform: "translate(-50.1%, -50.1%) translate(".concat(-X, "rem, ").concat(-Z, "rem)"), transformOrigin: "50% 50%", zIndex: 1000 + key }, imageStyle) }, key + 10), _jsx("div", { className: "textObject", style: {
53
57
  width: "".concat(size.x * scale, "rem"),
54
58
  height: "".concat(size.z * scale, "rem"),
@@ -20,6 +20,7 @@ export type minimapType = {
20
20
  maxScale?: number;
21
21
  blockScale?: boolean;
22
22
  scale?: number;
23
+ angle?: number;
23
24
  blockRotate?: boolean;
24
25
  blockScaleControl?: boolean;
25
26
  isImage?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gaesup-world",
3
- "version": "0.6.87",
3
+ "version": "0.6.89",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",