Constructor
new PointsMaterial(webglContext, optionsopt)
Parameters:
| Name |
Type |
Attributes |
Description |
webglContext |
WebGL2RenderingContext
|
|
WebGL2 rendering context used to compile shaders. |
options |
PointsMaterialOptions
|
<optional>
|
Material options. |
- Source:
Throws:
-
-
When inputs are invalid.
-
-
Type
-
TypeError
-
-
When numeric inputs are out of range.
-
-
Type
-
RangeError
Classes
- PointsMaterial
Members
color
- Source:
pointSize
- Source:
useVertexColors
- Source:
Methods
apply(matrix4)
Applies per-object uniforms.
Parameters:
| Name |
Type |
Description |
matrix4 |
Float32Array
|
Transformation matrix passed as `u_matrix`. |
- Source:
setColor(color)
Sets the RGB color.
Parameters:
| Name |
Type |
Description |
color |
Float32Array
|
Array.<number>
|
[red, green, blue] in [0..1] range. |
- Source:
Throws:
-
When color is invalid.
-
-
Type
-
TypeError
setPointSize(size)
Sets point size in pixels.
Parameters:
| Name |
Type |
Description |
size |
number
|
Point size (> 0). |
- Source:
Throws:
-
-
When size is not a finite number.
-
-
Type
-
TypeError
-
-
When size is not positive.
-
-
Type
-
RangeError
setUseVertexColors(enabled)
Enables or disables vertex colors.
Parameters:
| Name |
Type |
Description |
enabled |
boolean
|
When true, uses vertex colors. |
- Source:
Throws:
-
When enabled is not a boolean.
-
-
Type
-
TypeError