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:
973 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @author alteredq / http://alteredqualia.com/
|
---|
3 | *
|
---|
4 | * parameters = {
|
---|
5 | * color: <hex>,
|
---|
6 | * opacity: <float>,
|
---|
7 | * map: new THREE.Texture( <Image> ),
|
---|
8 | *
|
---|
9 | * blending: THREE.NormalBlending,
|
---|
10 | * depthTest: <bool>,
|
---|
11 | * depthWrite: <bool>,
|
---|
12 | *
|
---|
13 | * uvOffset: new THREE.Vector2(),
|
---|
14 | * uvScale: new THREE.Vector2(),
|
---|
15 | *
|
---|
16 | * fog: <bool>
|
---|
17 | * }
|
---|
18 | */
|
---|
19 |
|
---|
20 | THREE.SpriteMaterial = function ( parameters ) {
|
---|
21 |
|
---|
22 | THREE.Material.call( this );
|
---|
23 |
|
---|
24 | // defaults
|
---|
25 |
|
---|
26 | this.color = new THREE.Color( 0xffffff );
|
---|
27 | this.map = null;
|
---|
28 |
|
---|
29 | this.rotation = 0;
|
---|
30 |
|
---|
31 | this.fog = false;
|
---|
32 |
|
---|
33 | // set parameters
|
---|
34 |
|
---|
35 | this.setValues( parameters );
|
---|
36 |
|
---|
37 | };
|
---|
38 |
|
---|
39 | THREE.SpriteMaterial.prototype = Object.create( THREE.Material.prototype );
|
---|
40 |
|
---|
41 | THREE.SpriteMaterial.prototype.clone = function () {
|
---|
42 |
|
---|
43 | var material = new THREE.SpriteMaterial();
|
---|
44 |
|
---|
45 | THREE.Material.prototype.clone.call( this, material );
|
---|
46 |
|
---|
47 | material.color.copy( this.color );
|
---|
48 | material.map = this.map;
|
---|
49 |
|
---|
50 | material.rotation = this.rotation;
|
---|
51 |
|
---|
52 | material.fog = this.fog;
|
---|
53 |
|
---|
54 | return material;
|
---|
55 |
|
---|
56 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.