OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / src / materials / LineBasicMaterial.js
1 import { Material } from './Material';
2 import { Color } from '../math/Color';
3
4 /**
5  * @author mrdoob / http://mrdoob.com/
6  * @author alteredq / http://alteredqualia.com/
7  *
8  * parameters = {
9  *  color: <hex>,
10  *  opacity: <float>,
11  *
12  *  linewidth: <float>,
13  *  linecap: "round",
14  *  linejoin: "round"
15  * }
16  */
17
18 function LineBasicMaterial( parameters ) {
19
20         Material.call( this );
21
22         this.type = 'LineBasicMaterial';
23
24         this.color = new Color( 0xffffff );
25
26         this.linewidth = 1;
27         this.linecap = 'round';
28         this.linejoin = 'round';
29
30         this.lights = false;
31
32         this.setValues( parameters );
33
34 }
35
36 LineBasicMaterial.prototype = Object.create( Material.prototype );
37 LineBasicMaterial.prototype.constructor = LineBasicMaterial;
38
39 LineBasicMaterial.prototype.isLineBasicMaterial = true;
40
41 LineBasicMaterial.prototype.copy = function ( source ) {
42
43         Material.prototype.copy.call( this, source );
44
45         this.color.copy( source.color );
46
47         this.linewidth = source.linewidth;
48         this.linecap = source.linecap;
49         this.linejoin = source.linejoin;
50
51         return this;
52
53 };
54
55
56 export { LineBasicMaterial };