source: other-projects/playing-in-the-street/summer-2013/trunk/Playing-in-the-Street-WPF/Content/Web/mrdoob-three.js-4862f5f/src/materials/ParticleSystemMaterial.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: 1.2 KB
Line 
1/**
2 * @author mrdoob / http://mrdoob.com/
3 * @author alteredq / http://alteredqualia.com/
4 *
5 * parameters = {
6 * color: <hex>,
7 * opacity: <float>,
8 * map: new THREE.Texture( <Image> ),
9 *
10 * size: <float>,
11 *
12 * blending: THREE.NormalBlending,
13 * depthTest: <bool>,
14 * depthWrite: <bool>,
15 *
16 * vertexColors: <bool>,
17 *
18 * fog: <bool>
19 * }
20 */
21
22THREE.ParticleSystemMaterial = function ( parameters ) {
23
24 THREE.Material.call( this );
25
26 this.color = new THREE.Color( 0xffffff );
27
28 this.map = null;
29
30 this.size = 1;
31 this.sizeAttenuation = true;
32
33 this.vertexColors = false;
34
35 this.fog = true;
36
37 this.setValues( parameters );
38
39};
40
41THREE.ParticleSystemMaterial.prototype = Object.create( THREE.Material.prototype );
42
43THREE.ParticleSystemMaterial.prototype.clone = function () {
44
45 var material = new THREE.ParticleSystemMaterial();
46
47 THREE.Material.prototype.clone.call( this, material );
48
49 material.color.copy( this.color );
50
51 material.map = this.map;
52
53 material.size = this.size;
54 material.sizeAttenuation = this.sizeAttenuation;
55
56 material.vertexColors = this.vertexColors;
57
58 material.fog = this.fog;
59
60 return material;
61
62};
63
64// backwards compatibility
65
66THREE.ParticleBasicMaterial = THREE.ParticleSystemMaterial;
Note: See TracBrowser for help on using the repository browser.