UNPKG

s2maps-gpu

Version:

S2 Maps GPU - An open source, high-performance, and GPU-accelerated map engine for rendering large-scale, interactive maps.

36 lines (35 loc) 1.26 kB
import type Camera from 'ui/camera/index.js'; import type { Projector } from 'ui/camera/projector/index.js'; import type { SkyboxWorkflow as SkyboxWorkflowSpec } from './workflow.spec.js'; import type { StyleDefinition } from 'style/style.spec.js'; import type { UrlMap } from 'util/index.js'; import type { WebGPUContext } from '../context/index.js'; /** Skybox Workflow renders a user styled skybox to the GPU */ export default class SkyboxWorkflow implements SkyboxWorkflowSpec { #private; context: WebGPUContext; facesReady: number; ready: boolean; fov: number; angle: number; matrix: Float32Array; pipeline: GPURenderPipeline; /** @param context - The WebGPU context */ constructor(context: WebGPUContext); /** Setup the skybox workflow */ setup(): Promise<void>; /** Destroy the skybox workflow */ destroy(): void; /** * Update the skybox style * @param style - user defined style * @param camera - The camera * @param urlMap - The url map to properly resolve urls */ updateStyle(style: StyleDefinition, camera: Camera, urlMap?: UrlMap): void; /** * Draw the skybox * @param projector - The projector */ draw(projector: Projector): void; }