[page:Material] →

[name]

Create a material that can draw custom sprites using a 2d canvas.

Constructor

[name]( [page:Object parameters] )

parameters is an object that can be used to set up the default properties
color - the color of the sprite
program - the program used to draw the sprite

Properties

[property:Color color]

The color of the sprite. The material will set up the color for the context before calling the material's program.

Methods

[method:null program]([page:CanvasRenderingContext2D context], [page:Color color])

context -- The canvas context
color -- The color of the sprite
Define a program that will use the context to draw the sprite.

Source

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]