@reearth/core 0.0.7-alpha.57 → 0.0.7-alpha.59

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.
@@ -7,7 +7,6 @@ import { Position3d } from "../../types";
7
7
  import { EngineRef, MouseEventCallback, MouseEventProps } from "../types";
8
8
 
9
9
  import { SketchInterpreter, sketchState } from "./hooks";
10
- import { Typegen0 } from "./sketchMachine.typegen";
11
10
  import {
12
11
  GeometryOptionsXYZ,
13
12
  SketchEditingFeature,
@@ -50,7 +49,7 @@ type Props = {
50
49
  sketchOptions: SketchOptions;
51
50
  };
52
51
 
53
- const movingStatus: Typegen0["matchesStates"][] = [
52
+ const movingStatus: string[] = [
54
53
  "editing.marker.moving",
55
54
  "editing.polyline.moving",
56
55
  "editing.polygon.moving",
@@ -205,7 +204,7 @@ export default ({
205
204
  setExtrudedPoint(extrudePoint);
206
205
  }
207
206
  }
208
- } else if (movingStatus.some(state.matches)) {
207
+ } else if (movingStatus.some(s => state.matches(s))) {
209
208
  if (state.context.catchedExtrudedPoint) {
210
209
  invariant(geometryOptions?.controlPoints != null);
211
210
  const extrudedHeight = engineRef.current?.getExtrudedHeight(
@@ -313,7 +312,7 @@ export default ({
313
312
  return;
314
313
  }
315
314
 
316
- if (movingStatus.some(state.matches)) {
315
+ if (movingStatus.some(s => state.matches(s))) {
317
316
  send({
318
317
  type: "RELEASE",
319
318
  controlPoints: state.context.controlPoints ?? [],
@@ -14,7 +14,7 @@ import {
14
14
  } from "@cesium/engine";
15
15
  import { DistanceDisplayCondition } from "cesium";
16
16
  import { merge, omit } from "lodash-es";
17
- import { type Feature } from "protomaps";
17
+ import { type Feature } from "protomaps-leaflet";
18
18
  import { memo, useCallback, useEffect, useMemo, useRef, type FC } from "react";
19
19
  import { useCesium } from "resium";
20
20
  import { suspend } from "suspend-react";
@@ -11,7 +11,7 @@ import {
11
11
  type TileDiscardPolicy,
12
12
  type TilingScheme,
13
13
  } from "@cesium/engine";
14
- import { TileCache, ZxySource } from "protomaps";
14
+ import { TileCache, ZxySource } from "protomaps-leaflet";
15
15
 
16
16
  import { getTileCoords, makeKey } from "./helpers";
17
17
 
@@ -114,7 +114,7 @@ export class JapanGSIOptimalBVmapLabelImageryProvider extends JapanGSIOptimalBVm
114
114
  this.maximumDataLevel = options.maximumDataLevel;
115
115
 
116
116
  const source = new ZxySource(options.url, false);
117
- this.tileCache = new TileCache(source, 1024);
117
+ this.tileCache = new TileCache(source, 256);
118
118
 
119
119
  this.image = document.createElement("canvas");
120
120
  this.image.width = 1;
@@ -1,4 +1,4 @@
1
- import { type Zxy } from "protomaps";
1
+ import { type Zxy } from "protomaps-leaflet";
2
2
 
3
3
  import { type ImageryCoords } from "./types";
4
4
 
@@ -246,7 +246,7 @@ const Cesium: React.ForwardRefRenderFunction<EngineRef, EngineProps> = (
246
246
  light={sceneLight}
247
247
  mode={sceneMode}
248
248
  msaaSamples={sceneMsaaSamples}
249
- useDepthPicking={false}
249
+ useDepthPicking={true}
250
250
  useWebVR={!!property?.scene?.vr || undefined} // NOTE: useWebVR={false} will crash Cesium
251
251
  debugShowFramesPerSecond={!!property?.debug?.showFramesPerSecond}
252
252
  verticalExaggerationRelativeHeight={property?.scene?.verticalExaggerationRelativeHeight}
@@ -43,7 +43,7 @@ export function computeAtom(cache?: typeof globalDataFeaturesCache) {
43
43
  });
44
44
 
45
45
  const layer = atom<Layer | undefined>(undefined);
46
- const overrides = atom<Record<string, any> | undefined, Record<string, any> | undefined>(
46
+ const overrides = atom<Record<string, any> | undefined, [Record<string, any> | undefined], void>(
47
47
  undefined,
48
48
  (_, set, value) => {
49
49
  set(overrides, pick(value, appearanceKeys));
@@ -308,7 +308,7 @@ export function computeAtom(cache?: typeof globalDataFeaturesCache) {
308
308
  await set(compute, { forceUpdateData: true });
309
309
  });
310
310
 
311
- return atom<ComputedLayer | undefined, Command>(
311
+ return atom<ComputedLayer | undefined, [Command], void>(
312
312
  g => g(get),
313
313
  async (_, s, value) => {
314
314
  switch (value.type) {