feat(awareness): render the Global Context compass from a store

The awareness layer presents the compass ring, heading, cardinal labels and
contact bearing markers through subscribeDirectionOverlay(); the application
shell publishes them to the gev-awareness-direction store and the scene
chrome renders them in the viewer's container.
This commit is contained in:
Sameh Khamis committed 2026-10-31 22:01:56 -07:00
1 parent b22e138c55
commit b96cc37ab5
14 files changed
+389 -100

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
import { defineStore } from 'pinia';
import { shallowRef } from 'vue';
/**
* The Global Context compass and contact direction overlay as its view
* renders it. The awareness layer presents it through
* `subscribeDirectionOverlay()` and the application shell publishes it here.
*/
export const useAwarenessDirectionStore = defineStore(
'gev-awareness-direction',
() => {
/**
* `{container, hidden, ring, heading, labels, markers}`, or null while
* the layer has no overlay. `container` is the element it sits in.
*/
const overlay = shallowRef(null);
/**
* @param {?object} next A fresh presentation, frozen by the layer; every
* publish re-renders.
*/
function publish(next) {
overlay.value = next;
}
return { overlay, publish };
},
);