mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-17 00:32:21 +00:00
Draw scene data packs through the draw port and take their geometry and presentation off the Cesium list
Pack points, lines, polygons, image overlays and media markers are draw sets now, one per pack resource and kind. Feature picks match the click's draw hit by set and item id, and item ids are namespaced so code that reads a bare pick id never takes a pack feature for a live contact. An image pack draws its decoded pixels from a canvas: the Cesium draw port now fills unclamped shapes with images, as the contract's fills allow, and frees their materials with the set. The ./scenes export joins the entries whose caller loads the unbound renderer factories.
This commit is contained in:
1 parent
dbf1647572
commit
71ff682c7f
9 files changed
+526
-175
No files matched your search
@@ -9,6 +9,7 @@ import { createPinia } from 'pinia';
|
||||
import { useDataPacksStore } from '../../ui/stores/dataPacks.js';
|
||||
import DataPacks from '../../ui/views/panels/DataPacks.vue';
|
||||
import { createPackPresentations } from './presentation.js';
|
||||
import { bindFakeDraw } from '../../testSupport/fakeDrawPort.mjs';
|
||||
|
||||
const overlayHost = { setEntries() {}, clearSource() {} };
|
||||
|
||||
@@ -25,17 +26,17 @@ function fixture(t) {
|
||||
const pinia = createPinia();
|
||||
const app = createApp(DataPacks).use(pinia);
|
||||
app.mount(document.body.appendChild(document.createElement('div')));
|
||||
const viewer = {
|
||||
container,
|
||||
scene: { requestRender() {} },
|
||||
entities: { add: (spec) => spec, remove() {} },
|
||||
};
|
||||
const viewer = { container };
|
||||
const { unbind } = bindFakeDraw(viewer);
|
||||
const store = useDataPacksStore(pinia);
|
||||
const presentations = createPackPresentations(viewer, new Map(), {
|
||||
store,
|
||||
overlayHost,
|
||||
});
|
||||
t.after(() => app.unmount());
|
||||
t.after(() => {
|
||||
app.unmount();
|
||||
unbind();
|
||||
});
|
||||
const settle = async () => {
|
||||
for (let flush = 0; flush < 4; flush += 1) await nextTick();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user