mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
feat: add declarative Director feature actions
This commit is contained in:
1 parent
a30c42322c
commit
80027756ef
22 files changed
+1150
-17
No files matched your search
@@ -11,8 +11,8 @@ export function renderPackGeometry({ asset, pack }, handle) {
|
||||
let lines;
|
||||
for (const feature of features) {
|
||||
const id = { packId: pack.id, featureId: feature.id };
|
||||
if (feature.type === 'Point')
|
||||
handle.add({
|
||||
if (feature.type === 'Point') {
|
||||
const entity = handle.add({
|
||||
name: `${pack.id} / ${feature.id}`,
|
||||
position: xyz(feature.coordinates),
|
||||
point: {
|
||||
@@ -22,7 +22,9 @@ export function renderPackGeometry({ asset, pack }, handle) {
|
||||
outlineWidth: 2,
|
||||
},
|
||||
});
|
||||
else if (feature.type === 'LineString') {
|
||||
handle.feature?.(id, entity);
|
||||
} else if (feature.type === 'LineString') {
|
||||
handle.feature?.(id, id);
|
||||
if (!lines) {
|
||||
lines = new Cesium.PolylineCollection();
|
||||
handle.primitive(lines);
|
||||
@@ -35,7 +37,8 @@ export function renderPackGeometry({ asset, pack }, handle) {
|
||||
color: Cesium.Color.CYAN,
|
||||
}),
|
||||
});
|
||||
} else
|
||||
} else {
|
||||
handle.feature?.(id, id);
|
||||
polygons.push(
|
||||
new Cesium.GeometryInstance({
|
||||
id,
|
||||
@@ -57,6 +60,7 @@ export function renderPackGeometry({ asset, pack }, handle) {
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (polygons.length)
|
||||
handle.primitive(
|
||||
|
||||
Reference in new issue
Block a user