feat: 3 scene rendering setup
This commit is contained in:
@@ -14,28 +14,26 @@ export function createViewerControllers(host: any) {
|
||||
getWorldSeed: () => host.world?.seed ?? 1,
|
||||
getWorldTimeSyncMs: () => host.worldTimeSyncMs,
|
||||
getWorldPresentationContext: () => host.createWorldPresentationContext(),
|
||||
systemGroup: host.systemGroup,
|
||||
spatialNodeGroup: host.spatialNodeGroup,
|
||||
bubbleGroup: host.bubbleGroup,
|
||||
nodeGroup: host.nodeGroup,
|
||||
stationGroup: host.stationGroup,
|
||||
claimGroup: host.claimGroup,
|
||||
constructionSiteGroup: host.constructionSiteGroup,
|
||||
shipGroup: host.shipGroup,
|
||||
selectableTargets: host.selectableTargets,
|
||||
presentationEntries: host.presentationEntries,
|
||||
getActiveSystemId: () => host.activeSystemId,
|
||||
galaxySystemGroup: host.galaxyLayer.systemGroup,
|
||||
systemScene: host.systemLayer.scene,
|
||||
celestialGroup: host.systemLayer.celestialGroup,
|
||||
nodeGroup: host.systemLayer.nodeGroup,
|
||||
stationGroup: host.systemLayer.stationGroup,
|
||||
claimGroup: host.systemLayer.claimGroup,
|
||||
constructionSiteGroup: host.systemLayer.constructionSiteGroup,
|
||||
shipGroup: host.systemLayer.shipGroup,
|
||||
galaxySelectableTargets: host.galaxyLayer.selectableTargets,
|
||||
systemSelectableTargets: host.systemLayer.selectableTargets,
|
||||
systemVisuals: host.systemVisuals,
|
||||
systemSummaryVisuals: host.systemSummaryVisuals,
|
||||
planetVisuals: host.planetVisuals,
|
||||
orbitLines: host.orbitLines,
|
||||
spatialNodeVisuals: host.spatialNodeVisuals,
|
||||
bubbleVisuals: host.bubbleVisuals,
|
||||
celestialVisuals: host.celestialVisuals,
|
||||
nodeVisuals: host.nodeVisuals,
|
||||
stationVisuals: host.stationVisuals,
|
||||
claimVisuals: host.claimVisuals,
|
||||
constructionSiteVisuals: host.constructionSiteVisuals,
|
||||
shipVisuals: host.shipVisuals,
|
||||
registerPresentation: host.registerPresentation.bind(host),
|
||||
});
|
||||
|
||||
const navigationController = new ViewerNavigationController({
|
||||
@@ -45,6 +43,9 @@ export function createViewerControllers(host: any) {
|
||||
setActiveSystemId: (value) => {
|
||||
host.activeSystemId = value;
|
||||
},
|
||||
onActiveSystemChanged: (oldId, newId) => {
|
||||
sceneDataController.onActiveSystemChanged(oldId, newId);
|
||||
},
|
||||
getCameraMode: () => host.cameraMode,
|
||||
setCameraMode: (value) => {
|
||||
host.cameraMode = value;
|
||||
@@ -54,12 +55,13 @@ export function createViewerControllers(host: any) {
|
||||
host.cameraTargetShipId = value;
|
||||
},
|
||||
getCurrentDistance: () => host.currentDistance,
|
||||
getZoomLevel: () => host.zoomLevel,
|
||||
getPovLevel: () => host.povLevel,
|
||||
getSelectedItems: () => host.selectedItems,
|
||||
getOrbitYaw: () => host.orbitYaw,
|
||||
galaxyFocus: host.galaxyFocus,
|
||||
systemFocusLocal: host.systemFocusLocal,
|
||||
camera: host.camera,
|
||||
galaxyAnchor: host.galaxyAnchor,
|
||||
systemAnchor: host.systemAnchor,
|
||||
galaxyCamera: host.galaxyLayer.camera,
|
||||
systemCamera: host.systemLayer.camera,
|
||||
shipVisuals: host.shipVisuals,
|
||||
nodeVisuals: host.nodeVisuals,
|
||||
planetVisuals: host.planetVisuals,
|
||||
@@ -76,9 +78,12 @@ export function createViewerControllers(host: any) {
|
||||
|
||||
const presentationController = new ViewerPresentationController({
|
||||
renderer: host.renderer,
|
||||
scene: host.scene,
|
||||
camera: host.camera,
|
||||
ambienceGroup: host.ambienceGroup,
|
||||
galaxyScene: host.galaxyLayer.scene,
|
||||
galaxyCamera: host.galaxyLayer.camera,
|
||||
systemCamera: host.systemLayer.camera,
|
||||
galaxyAnchor: host.galaxyAnchor,
|
||||
systemAnchor: host.systemAnchor,
|
||||
ambienceGroup: host.universeLayer.ambienceGroup,
|
||||
gameSummaryEl: host.gameSummaryEl,
|
||||
networkSummaryEl: host.networkSummaryEl,
|
||||
performanceSummaryEl: host.performanceSummaryEl,
|
||||
@@ -94,14 +99,11 @@ export function createViewerControllers(host: any) {
|
||||
getActiveSystemId: () => host.activeSystemId,
|
||||
getCameraMode: () => host.cameraMode,
|
||||
getCameraTargetShipId: () => host.cameraTargetShipId,
|
||||
getZoomLevel: () => host.zoomLevel,
|
||||
getPovLevel: () => host.povLevel,
|
||||
getSelectedItems: () => host.selectedItems,
|
||||
getWorldTimeSyncMs: () => host.worldTimeSyncMs,
|
||||
getCurrentDistance: () => host.currentDistance,
|
||||
systemFocusLocal: host.systemFocusLocal,
|
||||
planetVisuals: host.planetVisuals,
|
||||
systemSummaryVisuals: host.systemSummaryVisuals,
|
||||
presentationEntries: host.presentationEntries,
|
||||
orbitLines: host.orbitLines,
|
||||
systemVisuals: host.systemVisuals,
|
||||
createWorldPresentationContext: () => host.createWorldPresentationContext(),
|
||||
@@ -128,35 +130,33 @@ export function createViewerControllers(host: any) {
|
||||
setCurrentStreamScopeKey: (value) => {
|
||||
host.currentStreamScopeKey = value;
|
||||
},
|
||||
getZoomLevel: () => host.zoomLevel,
|
||||
getPovLevel: () => host.povLevel,
|
||||
getActiveSystemId: () => host.activeSystemId,
|
||||
getSelectedItems: () => host.selectedItems,
|
||||
getCameraMode: () => host.cameraMode,
|
||||
getCameraTargetShipId: () => host.cameraTargetShipId,
|
||||
getNetworkStats: () => host.networkStats,
|
||||
getSystemSummaryVisuals: () => host.systemSummaryVisuals,
|
||||
getSystemSummaryVisuals: () => new Map(),
|
||||
errorEl: host.errorEl,
|
||||
opsStripEl: host.opsStripEl,
|
||||
detailTitleEl: host.detailTitleEl,
|
||||
detailBodyEl: host.detailBodyEl,
|
||||
worldLabel: () => host.world?.label ?? "",
|
||||
rebuildSystems: (systems) => sceneDataController.rebuildSystems(systems),
|
||||
syncSpatialNodes: (nodes) => sceneDataController.syncSpatialNodes(nodes),
|
||||
syncLocalBubbles: (bubbles) => sceneDataController.syncLocalBubbles(bubbles),
|
||||
syncCelestials: (celestials) => sceneDataController.syncCelestials(celestials),
|
||||
syncNodes: (nodes) => sceneDataController.syncNodes(nodes),
|
||||
syncStations: (stations) => sceneDataController.syncStations(stations),
|
||||
syncClaims: (claims) => sceneDataController.syncClaims(claims),
|
||||
syncConstructionSites: (sites) => sceneDataController.syncConstructionSites(sites),
|
||||
syncShips: (ships, tickIntervalMs) => sceneDataController.syncShips(ships, tickIntervalMs),
|
||||
applySpatialNodeDeltas: (nodes) => sceneDataController.applySpatialNodeDeltas(nodes),
|
||||
applyLocalBubbleDeltas: (bubbles) => sceneDataController.applyLocalBubbleDeltas(bubbles),
|
||||
applyCelestialDeltas: (celestials) => sceneDataController.applyCelestialDeltas(celestials),
|
||||
applyNodeDeltas: (nodes) => sceneDataController.applyNodeDeltas(nodes),
|
||||
applyStationDeltas: (stations) => sceneDataController.applyStationDeltas(stations),
|
||||
applyClaimDeltas: (claims) => sceneDataController.applyClaimDeltas(claims),
|
||||
applyConstructionSiteDeltas: (sites) => sceneDataController.applyConstructionSiteDeltas(sites),
|
||||
applyShipDeltas: (ships, tickIntervalMs) => sceneDataController.applyShipDeltas(ships, tickIntervalMs),
|
||||
refreshHistoryWindows: () => host.refreshHistoryWindows(),
|
||||
resolveFocusedBubbleId: () => host.resolveFocusedBubbleId(),
|
||||
resolveFocusedCelestialId: () => host.resolveFocusedCelestialId(),
|
||||
updateSystemSummaries: () => host.updateSystemSummaries(),
|
||||
applyZoomPresentation: () => presentationController.applyZoomPresentation(),
|
||||
updateNetworkPanel: () => presentationController.updateNetworkPanel(),
|
||||
@@ -193,14 +193,16 @@ export function createViewerControllers(host: any) {
|
||||
renderer: host.renderer,
|
||||
raycaster: host.raycaster,
|
||||
mouse: host.mouse,
|
||||
camera: host.camera,
|
||||
selectableTargets: host.selectableTargets,
|
||||
galaxyCamera: host.galaxyLayer.camera,
|
||||
systemCamera: host.systemLayer.camera,
|
||||
galaxySelectableTargets: host.galaxyLayer.selectableTargets,
|
||||
systemSelectableTargets: host.systemLayer.selectableTargets,
|
||||
hoverLabelEl: host.hoverLabelEl,
|
||||
marqueeEl: host.marqueeEl,
|
||||
keyState: host.keyState,
|
||||
getWorld: () => host.world,
|
||||
getActiveSystemId: () => host.activeSystemId,
|
||||
getZoomLevel: () => host.zoomLevel,
|
||||
getPovLevel: () => host.povLevel,
|
||||
getSelectedItems: () => host.selectedItems,
|
||||
setSelectedItems: (items) => {
|
||||
host.selectedItems = items;
|
||||
|
||||
Reference in New Issue
Block a user