@reearth/core 0.0.7-alpha.36 → 0.0.7-alpha.38

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.
package/dist/core.js CHANGED
@@ -26199,7 +26199,7 @@ const rangeTypes = {
26199
26199
  }, layerIdField = "__reearth_layer_id", defaultImageSize = 50, drawIcon = (t, n, o, s = "none", c = !1, d = "rgba(0, 0, 0, 0.7)", h = 3, p = 0, y = 0) => {
26200
26200
  const S = document.createElement("canvas"), P = S.getContext("2d");
26201
26201
  if (!(!t || !P))
26202
- return P.save(), S.width = n + h, S.height = o + h, P.shadowBlur = h, P.shadowOffsetX = p, P.shadowOffsetY = y, P.globalCompositeOperation = "source-over", P.clearRect(0, 0, S.width, S.height), P.drawImage(t, (S.width - n) / 2, (S.height - o) / 2, n, o), s === "circle" ? (P.fillStyle = "black", P.globalCompositeOperation = "destination-in", P.arc(n / 2, o / 2, Math.min(n, o) / 2, 0, 2 * Math.PI), P.fill(), c && (P.shadowColor = d, P.globalCompositeOperation = "destination-over", P.fillStyle = "black", P.arc(n / 2, o / 2, Math.min(n, o) / 2, 0, 2 * Math.PI), P.fill())) : c && (P.shadowColor = d, P.globalCompositeOperation = "destination-over", P.fillStyle = "black", P.rect((S.width - n) / 2, (S.height - o) / 2, n, o), P.fill()), P.restore(), S.toDataURL();
26202
+ return P.save(), S.width = n + h * 2, S.height = o + h * 2, P.shadowBlur = h, P.shadowOffsetX = p, P.shadowOffsetY = y, P.globalCompositeOperation = "source-over", P.clearRect(0, 0, S.width, S.height), P.drawImage(t, (S.width - n) / 2, (S.height - o) / 2, n, o), s === "circle" ? (P.fillStyle = "black", P.globalCompositeOperation = "destination-in", P.arc(S.width / 2, S.height / 2, Math.min(n, o) / 2, 0, 2 * Math.PI), P.fill(), c && (P.shadowColor = d, P.globalCompositeOperation = "destination-over", P.fillStyle = "black", P.arc(S.width / 2, S.height / 2, Math.min(n, o) / 2, 0, 2 * Math.PI), P.fill())) : c && (P.shadowColor = d, P.globalCompositeOperation = "destination-over", P.fillStyle = "black", P.rect((S.width - n) / 2, (S.height - o) / 2, n, o), P.fill()), P.restore(), S.toDataURL();
26203
26203
  }, useIcon = ({
26204
26204
  image: t,
26205
26205
  imageSize: n,
@@ -26620,21 +26620,23 @@ function getCredits(t) {
26620
26620
  if (!n)
26621
26621
  return;
26622
26622
  const { lightboxCredits: o, screenCredits: s } = (n == null ? void 0 : n._currentFrameCredits) || {}, c = n._currentCesiumCredit;
26623
- return [
26624
- ...c != null && c.html ? [{ html: c.html }] : [],
26625
- ...Array.from((o == null ? void 0 : o._array) ?? []).map((h) => {
26623
+ return {
26624
+ engine: {
26625
+ cesium: c != null && c.html ? { html: c.html } : void 0
26626
+ },
26627
+ lightbox: Array.from((o == null ? void 0 : o._array) ?? []).map((h) => {
26626
26628
  var p;
26627
26629
  return {
26628
26630
  html: (p = h == null ? void 0 : h.credit) == null ? void 0 : p.html
26629
26631
  };
26630
26632
  }),
26631
- ...Array.from((s == null ? void 0 : s._array) ?? []).map((h) => {
26633
+ screen: Array.from((s == null ? void 0 : s._array) ?? []).map((h) => {
26632
26634
  var p;
26633
26635
  return {
26634
26636
  html: (p = h == null ? void 0 : h.credit) == null ? void 0 : p.html
26635
26637
  };
26636
26638
  })
26637
- ];
26639
+ };
26638
26640
  }
26639
26641
  function Globe({
26640
26642
  property: t,
@@ -85203,7 +85205,7 @@ const useIBL = ({
85203
85205
  const Tf = (bf = Ra.current) == null ? void 0 : bf.cesiumElement;
85204
85206
  if (!Tf || Tf.isDestroyed())
85205
85207
  return;
85206
- const rf = getCredits(Tf) ?? [];
85208
+ const rf = getCredits(Tf);
85207
85209
  Ru.current(rf);
85208
85210
  }, 3e3);
85209
85211
  }, []), Gd = useMemo(
@@ -91386,7 +91388,7 @@ function Error$1({ error: t, resetErrorBoundary: n }) {
91386
91388
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { style: { color: "#fff" }, onClick: n, children: "Retry" }) })
91387
91389
  ] });
91388
91390
  }
91389
- const version = "0.0.7-alpha.36", useCoreAPI = ({ viewerProperty: t }) => {
91391
+ const version = "0.0.7-alpha.38", useCoreAPI = ({ viewerProperty: t }) => {
91390
91392
  const n = useRef(t);
91391
91393
  n.current = t;
91392
91394
  const o = useMemo(