mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
feat(ui): render the Display panel's 3D aircraft group from the store
This commit is contained in:
1 parent
1139d364c7
commit
926253e8a3
9 files changed
+126
-40
No files matched your search
@@ -2,9 +2,9 @@ import { defineStore } from 'pinia';
|
||||
import { markRaw, shallowRef } from 'vue';
|
||||
|
||||
/**
|
||||
* The Display panel as its view renders it. VisualSettings presents the
|
||||
* post-processing groups (`_presentDisplay()`) and publishes them here;
|
||||
* it keeps its listeners on the panel's controls.
|
||||
* The Display panel as its view renders it. VisualSettings presents its
|
||||
* groups (`_presentDisplay()`) and AircraftDisplay the 3D aircraft group,
|
||||
* and each publishes here; both keep their listeners on the controls.
|
||||
*/
|
||||
export const useDisplayStore = defineStore('gev-display', () => {
|
||||
/** The presented panel; null until VisualSettings first renders. */
|
||||
@@ -15,5 +15,13 @@ export const useDisplayStore = defineStore('gev-display', () => {
|
||||
view.value = markRaw(next);
|
||||
}
|
||||
|
||||
return { view, publish };
|
||||
/** The 3D aircraft group; null until AircraftDisplay first renders. */
|
||||
const models3d = shallowRef(null);
|
||||
|
||||
/** @param {object} next A fresh presentation of the 3D aircraft group. */
|
||||
function publishModels3d(next) {
|
||||
models3d.value = markRaw(next);
|
||||
}
|
||||
|
||||
return { view, publish, models3d, publishModels3d };
|
||||
});
|
||||
Reference in new issue
Block a user