Class PipelineTriangleFlat

Source
Expand description

PipelineTriangleFlat is a rendering pipeline for drawing flat triangles in 2D space. It uses WebGPU to render triangles based on the provided mesh data.

Constructors§

Source§

new PipelineTriangleFlat(renderer: Renderer): PipelineTriangleFlat

Constructor for PipelineTriangleFlat

Properties§

§protected _cameraBindGroup: GPUBindGroup

Camera bind group

§protected _cameraBindGroupLayout: GPUBindGroupLayout

Camera bind group layout

§protected _cMapTexture: GPUTexture

Color map texture

§protected _colorBuffer: GPUBuffer

Color uniform buffer

§protected _fragModule: GPUShaderModule

Fragment shader module.

§protected _highlightColorBuffer: GPUBuffer

Highlight color uniform buffer

§protected _highlightedBuffer: GPUBuffer

Buffer for highlighted data.

§protected _indicesBuffer: GPUBuffer

Buffer for primitive indices.

§protected _mviewBuffer: GPUBuffer

ModelView matrix uniform buffer

§protected _opacity: GPUBuffer

Opacity uniform buffer

§protected _pipeline: GPURenderPipeline

Render pipeline for drawing triangles.

§protected _positionBuffer: GPUBuffer

Position buffer for vertex data.

§protected _projcBuffer: GPUBuffer

Projection matrix uniform buffer

§protected _renderer: Renderer

Renderer reference

§protected _renderInfoBindGroup: GPUBindGroup

Render information bind group

§protected _renderInfoBindGroupLayout: GPUBindGroupLayout

Render information bind group layout

§protected _skippedBuffer: GPUBuffer

Buffer for skipped data.

§protected _thematicBuffer: GPUBuffer

Buffer for thematic data.

§protected _useColorMap: GPUBuffer

Use color map uniform buffer

§protected _useHighlight: GPUBuffer

Use highlight uniform buffer

§protected _vertModule: GPUShaderModule

Vertex shader module.

Methods§

Source§

build(mesh: VectorLayer): void

Builds the pipeline with the provided mesh data.

Source§

createCameraUniformBindGroup(): void

Creates the camera uniform bind group.

Source§

createColorUniformBindGroup(): void

Creates the color uniform bind group.

Source§

createPipeline(): void

Creates the render pipeline for drawing triangles.

Source§

createShaders(): void

Creates the vertex and fragment shaders for the pipeline.

Source§

createVertexBuffers(mesh: VectorLayer): void

Creates the vertex buffers for the pipeline.

Source§

renderPass(camera: Camera): void

Renders the triangle flat pipeline.

Source§

updateCameraUniforms(camera: Camera): void

Updates the camera uniform buffers with the current camera state.

Source§

updateColorUniforms(layer: Layer): void

Updates the color uniform buffers with the current layer state.

Source§

updateVertexBuffers(mesh: VectorLayer): void

Updates the vertex buffers with the provided mesh data.