import { ICamera , IDENTIFIER , IScene , IView , IViewport , RendererSystem , } from '@antv/g-webgpu-core' ; import { inject , injectable , named } from 'inversify' ; @ injectable ( ) export class View implements IView { @ inject ( IDENTIFIER . Systems ) @ named ( IDENTIFIER . RendererSystem ) private readonly rendererSystem : RendererSystem ; private camera : ICamera ; private scene : IScene ; private viewport : IViewport = { x : 0 , y : 0 , width : 0 , height : 0 , } ; private clearColor : [ number , number , number , number ] = [ 1 , 1 , 1 , 1 ] ; public getCamera ( ) { return this . camera ; } public getScene ( ) { return this . scene ; } public getViewport ( ) { return this . viewport ; } public getClearColor ( ) { return this . clearColor ; } public setCamera ( camera ) { this . camera = camera ; return this ; } public setScene ( scene ) { this . scene = scene ; return this ; } public setViewport ( viewport ) { this . viewport = viewport ; return this ; } public setClearColor ( clearColor ) { this . clearColor = clearColor ; return this ; } public pick ( position ) { return this . rendererSystem . pick ( position , this ) ; } }