s2maps-gpu
Version:
S2 Maps GPU - An open source, high-performance, and GPU-accelerated map engine for rendering large-scale, interactive maps.
55 lines (54 loc) • 2.34 kB
TypeScript
import { Feature } from './workflow.js';
import type Context from '../context/context.js';
import type { SensorTextureDefinition } from 'ui/camera/timeCache.js';
import type { TileGL as Tile } from 'source/tile.spec.js';
import type { SensorWorkflowLayerGuide } from 'style/style.spec.js';
import type { SensorFeature as SensorFeatureSpec, SensorWorkflow as SensorWorkflowSpec } from './workflow.spec.js';
/** Sensor Feature is a standalone sensor render storage unit that can be drawn to the GPU */
export declare class SensorFeature extends Feature implements SensorFeatureSpec {
layerGuide: SensorWorkflowLayerGuide;
workflow: SensorWorkflowSpec;
featureCode: number[];
tile: Tile;
fadeStartTime: number;
parent?: Tile | undefined;
type: "sensor";
opacity?: number;
/**
* @param layerGuide - sensor layer guide for this feature
* @param workflow - the sensor workflow
* @param featureCode - the encoded feature code that tells the GPU how to compute it's properties
* @param tile - the tile that the feature is drawn on
* @param fadeStartTime - the start time of the "fade" to be applied
* @param parent - the parent tile
*/
constructor(layerGuide: SensorWorkflowLayerGuide, workflow: SensorWorkflowSpec, featureCode: number[], tile: Tile, fadeStartTime?: number, parent?: Tile | undefined);
/**
* Draw this feature to the GPU
* @param interactive - whether or not the feature is interactive for compute or render
*/
draw(interactive?: boolean): void;
/**
* Duplicate this feature
* @param tile - the tile that the feature is drawn on
* @param parent - the parent tile if applicable
* @returns the duplicated feature
*/
duplicate(tile: Tile, parent?: Tile): SensorFeature;
/**
* Get the sensor textures
* @returns the sensor textures
*/
getTextures(): SensorTextureDefinition;
/**
* Set the webgl1 attributes if the context is webgl1
* @param opacity - the opacity
*/
setWebGL1Attributes(opacity?: number): void;
}
/**
* Build the sensor workflow. This workflow is added to the painter modularly
* @param context - The WebGL(1|2) context
* @returns the sensor workflow
*/
export default function sensorWorkflow(context: Context): Promise<SensorWorkflowSpec>;