@reearth/core 0.0.7-alpha.22 → 0.0.7-alpha.23
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 +12 -1
- package/dist/core.umd.cjs +2 -2
- package/package.json +1 -1
- package/src/engines/Cesium/Feature/Resource/utils.ts +21 -10
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import { Entity, PointGraphics, BillboardGraphics, JulianDate } from "cesium";
|
|
|
2
2
|
|
|
3
3
|
import { EvalFeature } from "../../..";
|
|
4
4
|
import { AppearanceTypes, ComputedFeature, ComputedLayer, Feature } from "../../../../mantle";
|
|
5
|
-
import { heightReference, shadowMode, toColor } from "../../common";
|
|
5
|
+
import { heightReference, shadowMode, toColor, classificationType } from "../../common";
|
|
6
6
|
import { getMarkerCoordinates, getGeometryFromEntity } from "../../helpers/getGeometryFromEntity";
|
|
7
7
|
import { convertEntityDescription, convertEntityProperties } from "../../utils/utils";
|
|
8
8
|
import { attachTag, extractSimpleLayer, getTag, Tag } from "../utils";
|
|
@@ -33,7 +33,7 @@ type EntityAppearanceKey<AName extends SupportedAppearanceKey> = AName extends "
|
|
|
33
33
|
? keyof Pick<Entity, "point" | "billboard" | "label">
|
|
34
34
|
: keyof Pick<Entity, CesiumEntityAppearanceKey>;
|
|
35
35
|
|
|
36
|
-
type AppearancePropertyKeyType = "color" | "heightReference" | "shadows";
|
|
36
|
+
type AppearancePropertyKeyType = "color" | "heightReference" | "shadows" | "classificationType";
|
|
37
37
|
|
|
38
38
|
export function attachProperties<
|
|
39
39
|
AName extends SupportedAppearanceKey,
|
|
@@ -87,6 +87,9 @@ export function attachProperties<
|
|
|
87
87
|
break;
|
|
88
88
|
case "heightReference":
|
|
89
89
|
value = heightReference(value);
|
|
90
|
+
break;
|
|
91
|
+
case "classificationType":
|
|
92
|
+
value = classificationType(value);
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
if (value === (entity[propertyName] as any)[entityPropertyKey]) {
|
|
@@ -160,10 +163,10 @@ export const attachStyle = (
|
|
|
160
163
|
name: "show",
|
|
161
164
|
...(computedFeature?.marker?.style
|
|
162
165
|
? {
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
166
|
+
override:
|
|
167
|
+
computedFeature?.marker?.style === "point" &&
|
|
168
|
+
(computedFeature?.marker.show ?? true),
|
|
169
|
+
}
|
|
167
170
|
: {}),
|
|
168
171
|
},
|
|
169
172
|
pixelSize: {
|
|
@@ -199,10 +202,10 @@ export const attachStyle = (
|
|
|
199
202
|
name: "show",
|
|
200
203
|
...(computedFeature?.marker?.style
|
|
201
204
|
? {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
205
|
+
override:
|
|
206
|
+
computedFeature?.marker?.style === "image" &&
|
|
207
|
+
(computedFeature?.marker.show ?? true),
|
|
208
|
+
}
|
|
206
209
|
: {}),
|
|
207
210
|
},
|
|
208
211
|
image: {
|
|
@@ -295,6 +298,10 @@ export const attachStyle = (
|
|
|
295
298
|
clampToGround: {
|
|
296
299
|
name: "clampToGround",
|
|
297
300
|
},
|
|
301
|
+
classificationType: {
|
|
302
|
+
name: "classificationType",
|
|
303
|
+
type: "classificationType",
|
|
304
|
+
},
|
|
298
305
|
});
|
|
299
306
|
}
|
|
300
307
|
return [feature, computedFeature];
|
|
@@ -356,6 +363,10 @@ export const attachStyle = (
|
|
|
356
363
|
extrudedHeight: {
|
|
357
364
|
name: "extrudedHeight",
|
|
358
365
|
},
|
|
366
|
+
classificationType: {
|
|
367
|
+
name: "classificationType",
|
|
368
|
+
type: "classificationType",
|
|
369
|
+
},
|
|
359
370
|
});
|
|
360
371
|
}
|
|
361
372
|
return [feature, computedFeature];
|