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.1 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 | *
|
---|
9 | * blending: THREE.NormalBlending,
|
---|
10 | * depthTest: <bool>,
|
---|
11 | * depthWrite: <bool>,
|
---|
12 | *
|
---|
13 | * linewidth: <float>,
|
---|
14 | * linecap: "round",
|
---|
15 | * linejoin: "round",
|
---|
16 | *
|
---|
17 | * vertexColors: <bool>
|
---|
18 | *
|
---|
19 | * fog: <bool>
|
---|
20 | * }
|
---|
21 | */
|
---|
22 |
|
---|
23 | THREE.LineBasicMaterial = function ( parameters ) {
|
---|
24 |
|
---|
25 | THREE.Material.call( this );
|
---|
26 |
|
---|
27 | this.color = new THREE.Color( 0xffffff );
|
---|
28 |
|
---|
29 | this.linewidth = 1;
|
---|
30 | this.linecap = 'round';
|
---|
31 | this.linejoin = 'round';
|
---|
32 |
|
---|
33 | this.vertexColors = false;
|
---|
34 |
|
---|
35 | this.fog = true;
|
---|
36 |
|
---|
37 | this.setValues( parameters );
|
---|
38 |
|
---|
39 | };
|
---|
40 |
|
---|
41 | THREE.LineBasicMaterial.prototype = Object.create( THREE.Material.prototype );
|
---|
42 |
|
---|
43 | THREE.LineBasicMaterial.prototype.clone = function () {
|
---|
44 |
|
---|
45 | var material = new THREE.LineBasicMaterial();
|
---|
46 |
|
---|
47 | THREE.Material.prototype.clone.call( this, material );
|
---|
48 |
|
---|
49 | material.color.copy( this.color );
|
---|
50 |
|
---|
51 | material.linewidth = this.linewidth;
|
---|
52 | material.linecap = this.linecap;
|
---|
53 | material.linejoin = this.linejoin;
|
---|
54 |
|
---|
55 | material.vertexColors = this.vertexColors;
|
---|
56 |
|
---|
57 | material.fog = this.fog;
|
---|
58 |
|
---|
59 | return material;
|
---|
60 |
|
---|
61 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.