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:
821 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * @author sroucheray / http://sroucheray.org/
|
---|
3 | * @author mrdoob / http://mrdoob.com/
|
---|
4 | */
|
---|
5 |
|
---|
6 | THREE.AxisHelper = function ( size ) {
|
---|
7 |
|
---|
8 | size = size || 1;
|
---|
9 |
|
---|
10 | var geometry = new THREE.Geometry();
|
---|
11 |
|
---|
12 | geometry.vertices.push(
|
---|
13 | new THREE.Vector3(), new THREE.Vector3( size, 0, 0 ),
|
---|
14 | new THREE.Vector3(), new THREE.Vector3( 0, size, 0 ),
|
---|
15 | new THREE.Vector3(), new THREE.Vector3( 0, 0, size )
|
---|
16 | );
|
---|
17 |
|
---|
18 | geometry.colors.push(
|
---|
19 | new THREE.Color( 0xff0000 ), new THREE.Color( 0xffaa00 ),
|
---|
20 | new THREE.Color( 0x00ff00 ), new THREE.Color( 0xaaff00 ),
|
---|
21 | new THREE.Color( 0x0000ff ), new THREE.Color( 0x00aaff )
|
---|
22 | );
|
---|
23 |
|
---|
24 | var material = new THREE.LineBasicMaterial( { vertexColors: THREE.VertexColors } );
|
---|
25 |
|
---|
26 | THREE.Line.call( this, geometry, material, THREE.LinePieces );
|
---|
27 |
|
---|
28 | };
|
---|
29 |
|
---|
30 | THREE.AxisHelper.prototype = Object.create( THREE.Line.prototype );
|
---|
Note:
See
TracBrowser
for help on using the repository browser.