The default material used by Points.


misc / controls / fly
WebGL / BufferGeometry / drawcalls
WebGL / BufferGeometry / points
WebGL / BufferGeometry / points / interleaved
WebGL / camera
WebGL / geometry / convex
WebGL / geometry / shapes
WebGL / interactive / raycasting / points
WebGL / multiple / elements / text
WebGL / points / billboards
WebGL / points / dynamic
WebGL / points / sprites
WebGL / trails

//This will add a starfield to the background of a scene var starsGeometry = new v3d.Geometry(); for (var i = 0; i < 10000; i++) { var star = new v3d.Vector3(); star.x = v3d.Math.randFloatSpread(2000); star.y = v3d.Math.randFloatSpread(2000); star.z = v3d.Math.randFloatSpread(2000); starsGeometry.vertices.push(star); } var starsMaterial = new v3d.PointsMaterial({ color: 0x888888 }); var starField = new v3d.Points(starsGeometry, starsMaterial); scene.add(starField);

PointsMaterial(parameters : Object)

parameters - (optional) an object with one or more properties defining the material's appearance. Any property of the material (including any property inherited from Material) can be passed in here.

The exception is the property color, which can be passed in as a hexadecimal string and is 0xffffff (white) by default. Color.set(color) is called internally.


See the base Material class for common properties.

.color : Color

Color of the material, by default set to white (0xffffff).

.isPointsMaterial : Boolean

Used to check whether this or derived classes are points materials. Default is true.

You should not change this, as it used internally for optimisation.

.map : Texture

Sets the color of the points using data from a Texture.

.morphTargets : Boolean

Define whether the material uses morphTargets. Default is false.

.size : Number

Sets the size of the points. Default is 1.0.

.sizeAttenuation : Boolean

Specify whether points' size is attenuated by the camera depth. (Perspective camera only.) Default is true.



For more info on how to obtain the source code of this module see this page.