Constructor
new LineShader(vertexShaderPath, fragmentShaderPath) → {LineShader}
Parameters:
| Name | Type | Description |
|---|---|---|
vertexShaderPath |
string | path to the vertex shader file |
fragmentShaderPath |
string | path to the fragment shader file |
- Source:
Returns:
a new LineShader instance
- Type
- LineShader
Extends
Methods
activate(pixelColor, trsMatrix, cameraMatrix)
Activate this LineShader to render a line
Parameters:
| Name | Type | Description |
|---|---|---|
pixelColor |
vec4 | [R,G,B,A] color array for the pixels of the line and vertices |
trsMatrix |
mat4 | translation, rotation, and scaling matrix for the line being rendered |
cameraMatrix |
mat4 | translation, rotation, and scaling matrix for the Camera |
- Overrides:
- Source:
cleanUp()
Detaches and removes the shader from webGL
- Inherited From:
- Source:
setPointSize(w)
Set the pixel diameter of line end points for this LineShader
Parameters:
| Name | Type | Description |
|---|---|---|
w |
integer | the pixel diameter |
- Source: