Constructor
new WebGLRadarRenderer(gl, vertexShaderSource, fragmentShaderSource)
Create a new WebGLRadarRenderer
Parameters:
| Name | Type | Description |
|---|---|---|
gl |
WebGL2RenderingContext | |
vertexShaderSource |
string | |
fragmentShaderSource |
string |
- Source:
Classes
Members
dirty :boolean
check if the attributes are dirty and need to be updated
Type:
- boolean
- Source:
Methods
clear()
Clear the buffer and reset the allocated vertex count
- Source:
createShaderProgram()
Create the shaders the program and the buffer
- Source:
destroy()
Destroy the shaders, the program, the buffer and the allocated vertex count
- Source:
render(uniforms)
execute the WebGL draw operation
Parameters:
| Name | Type | Description |
|---|---|---|
uniforms |
Object |
- Source:
setAttributes(attributes, updateImmediately)
Set the attributes of the shader
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
attributes |
Object | ||
updateImmediately |
boolean | false |
- Source:
setColormap(colormap)
pass the colormap as a uniform to the shader
Parameters:
| Name | Type | Description |
|---|---|---|
colormap |
Array.<Array.<number>> |
- Source:
setMinMax(min, max)
pass the minimum and maximum values to the shader
Parameters:
| Name | Type | Description |
|---|---|---|
min |
number | |
max |
number |
- Source:
setOpacity(opacity)
set the opacity of the radar renderer
Parameters:
| Name | Type | Description |
|---|---|---|
opacity |
number |
- Source:
setUniforms(uniforms)
Set the uniforms of the shader
Parameters:
| Name | Type | Description |
|---|---|---|
uniforms |
Object |
- Source: