@almadar/ui 5.65.0 → 5.67.0

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.
@@ -2821,9 +2821,9 @@ var GameCanvas3D = forwardRef(
2821
2821
  const color = unit.faction === "player" ? 4491519 : unit.faction === "enemy" ? 16729156 : 16777028;
2822
2822
  const hasAtlas = unitAtlasUrl(unit) !== null;
2823
2823
  const initialFrame = hasAtlas ? resolveUnitFrame(unit.id) : null;
2824
- const modelScale = UNIT_BASE_MODEL_SCALE * unitScale;
2825
- const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale;
2826
- const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale;
2824
+ const modelScale = UNIT_BASE_MODEL_SCALE * unitScale * gridConfig.cellSize;
2825
+ const billboardHeight = UNIT_BASE_BILLBOARD_HEIGHT * unitScale * gridConfig.cellSize;
2826
+ const primitiveRadius = UNIT_BASE_PRIMITIVE_RADIUS * unitScale * gridConfig.cellSize;
2827
2827
  return /* @__PURE__ */ jsxs(
2828
2828
  "group",
2829
2829
  {
@@ -2870,7 +2870,7 @@ var GameCanvas3D = forwardRef(
2870
2870
  /* @__PURE__ */ jsx("meshStandardMaterial", { color })
2871
2871
  ] })
2872
2872
  ] }),
2873
- unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0, 1.2, 0], children: [
2873
+ unit.health !== void 0 && unit.maxHealth !== void 0 && /* @__PURE__ */ jsxs("group", { position: [0, billboardHeight, 0], children: [
2874
2874
  /* @__PURE__ */ jsxs("mesh", { position: [-0.25, 0, 0], children: [
2875
2875
  /* @__PURE__ */ jsx("planeGeometry", { args: [0.5, 0.05] }),
2876
2876
  /* @__PURE__ */ jsx("meshBasicMaterial", { color: 3355443 })
@@ -2899,7 +2899,7 @@ var GameCanvas3D = forwardRef(
2899
2899
  }
2900
2900
  );
2901
2901
  },
2902
- [selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale]
2902
+ [selectedUnitId, handleUnitClick, resolveUnitFrame, unitScale, gridConfig]
2903
2903
  );
2904
2904
  const DefaultFeatureRenderer = useCallback(
2905
2905
  ({
@@ -2987,7 +2987,7 @@ var GameCanvas3D = forwardRef(
2987
2987
  {
2988
2988
  ref: containerRef,
2989
2989
  className: cn("game-canvas-3d relative w-full overflow-hidden", className),
2990
- style: { height: "85vh" },
2990
+ style: { flex: "1 1 0", minHeight: "400px" },
2991
2991
  "data-orientation": orientation,
2992
2992
  "data-camera-mode": cameraMode,
2993
2993
  "data-overlay": overlay,