source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/src/materials/SpriteCanvasMaterial.js@ 28897

Last change on this file since 28897 was 28897, checked in by davidb, 10 years ago

GUI front-end to server base plus web page content

File size: 820 bytes
Line 
1/**
2 * @author mrdoob / http://mrdoob.com/
3 *
4 * parameters = {
5 * color: <hex>,
6 * program: <function>,
7 * opacity: <float>,
8 * blending: THREE.NormalBlending
9 * }
10 */
11
12THREE.SpriteCanvasMaterial = function ( parameters ) {
13
14 THREE.Material.call( this );
15
16 this.color = new THREE.Color( 0xffffff );
17 this.program = function ( context, color ) {};
18
19 this.setValues( parameters );
20
21};
22
23THREE.SpriteCanvasMaterial.prototype = Object.create( THREE.Material.prototype );
24
25THREE.SpriteCanvasMaterial.prototype.clone = function () {
26
27 var material = new THREE.SpriteCanvasMaterial();
28
29 THREE.Material.prototype.clone.call( this, material );
30
31 material.color.copy( this.color );
32 material.program = this.program;
33
34 return material;
35
36};
37
38// backwards compatibility
39
40THREE.ParticleCanvasMaterial = THREE.SpriteCanvasMaterial;
Note: See TracBrowser for help on using the repository browser.