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:
733 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @author mrdoob / http://mrdoob.com/
|
---|
3 | */
|
---|
4 |
|
---|
5 | THREE.Line = function ( geometry, material, type ) {
|
---|
6 |
|
---|
7 | THREE.Object3D.call( this );
|
---|
8 |
|
---|
9 | this.geometry = geometry !== undefined ? geometry : new THREE.Geometry();
|
---|
10 | this.material = material !== undefined ? material : new THREE.LineBasicMaterial( { color: Math.random() * 0xffffff } );
|
---|
11 |
|
---|
12 | this.type = ( type !== undefined ) ? type : THREE.LineStrip;
|
---|
13 |
|
---|
14 | };
|
---|
15 |
|
---|
16 | THREE.LineStrip = 0;
|
---|
17 | THREE.LinePieces = 1;
|
---|
18 |
|
---|
19 | THREE.Line.prototype = Object.create( THREE.Object3D.prototype );
|
---|
20 |
|
---|
21 | THREE.Line.prototype.clone = function ( object ) {
|
---|
22 |
|
---|
23 | if ( object === undefined ) object = new THREE.Line( this.geometry, this.material, this.type );
|
---|
24 |
|
---|
25 | THREE.Object3D.prototype.clone.call( this, object );
|
---|
26 |
|
---|
27 | return object;
|
---|
28 |
|
---|
29 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.