@reearth/core 0.0.7-alpha.33 → 0.0.7-alpha.35

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
@@ -71906,7 +71906,7 @@ function Model({
71906
71906
  }) {
71907
71907
  var ff, mf, hf, of, gf, Ef;
71908
71908
  const p = extractSimpleLayerData(d), y = (p == null ? void 0 : p.type) === "gltf", S = useMemo(
71909
- () => (c == null ? void 0 : c.type) === "Point" ? c.coordinates : o != null && o.location ? [o.location.lng, o.location.lat, o.height ?? 0] : void 0,
71909
+ () => (c == null ? void 0 : c.type) === "Point" ? (o == null ? void 0 : o.height) === void 0 ? c.coordinates : [...c.coordinates.slice(0, 2), o.height] : o != null && o.location ? [o.location.lng, o.location.lat, o.height ?? 0] : void 0,
71910
71910
  [c == null ? void 0 : c.coordinates, c == null ? void 0 : c.type, o == null ? void 0 : o.height, o == null ? void 0 : o.location]
71911
71911
  ), P = useMemo(() => S ? Cartesian3$1.fromDegrees(S[0], S[1], S[2]) : Cartesian3$1.ZERO, [S]), {
71912
71912
  show: L = !0,
@@ -82802,11 +82802,13 @@ const useDrawClipping = ({
82802
82802
  }, [nt]);
82803
82803
  const Cf = useMemo(() => pu !== "google-photorealistic" || !o ? null : (async () => {
82804
82804
  try {
82805
- return (await createGooglePhotorealistic3DTileset(Vd)).resource;
82805
+ return Vd ? (await createGooglePhotorealistic3DTileset(Vd)).resource : IonResource.fromAssetId(2275207, {
82806
+ accessToken: h == null ? void 0 : h.cesiumIonAccessToken
82807
+ });
82806
82808
  } catch (Ff) {
82807
82809
  throw console.error(`Error loading Photorealistic 3D Tiles tileset: ${Ff}`), Ff;
82808
82810
  }
82809
- })(), [pu, o, Vd]), pf = useMemo(() => pu === "osm-buildings" && o ? IonResource.fromAssetId(96188, {
82811
+ })(), [pu, o, Vd, h == null ? void 0 : h.cesiumIonAccessToken]), pf = useMemo(() => pu === "osm-buildings" && o ? IonResource.fromAssetId(96188, {
82810
82812
  accessToken: h == null ? void 0 : h.cesiumIonAccessToken
82811
82813
  }) : Cf && o ? Cf : pu === "3dtiles" && o ? Nl ?? W : null, [pu, o, h == null ? void 0 : h.cesiumIonAccessToken, Cf, Nl, W]), _f = useMemo(() => {
82812
82814
  var Qf, ep, Bf, tp, qf, ip, rp, Tf, rf, bf;
@@ -91384,7 +91386,7 @@ function Error$1({ error: t, resetErrorBoundary: n }) {
91384
91386
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { children: /* @__PURE__ */ jsxRuntimeExports.jsx("button", { style: { color: "#fff" }, onClick: n, children: "Retry" }) })
91385
91387
  ] });
91386
91388
  }
91387
- const version = "0.0.7-alpha.33", useCoreAPI = ({ viewerProperty: t }) => {
91389
+ const version = "0.0.7-alpha.35", useCoreAPI = ({ viewerProperty: t }) => {
91388
91390
  const n = useRef(t);
91389
91391
  n.current = t;
91390
91392
  const o = useMemo(