UNPKG

947 BJavaScriptView Raw
1/**
2 * @author alteredq / http://alteredqualia.com/
3 *
4 * parameters = {
5 * color: <hex>,
6 * opacity: <float>,
7 *
8 * linewidth: <float>,
9 *
10 * scale: <float>,
11 * dashSize: <float>,
12 * gapSize: <float>
13 * }
14 */
15
16import { LineBasicMaterial } from './LineBasicMaterial.js';
17
18function LineDashedMaterial( parameters ) {
19
20 LineBasicMaterial.call( this );
21
22 this.type = 'LineDashedMaterial';
23
24 this.scale = 1;
25 this.dashSize = 3;
26 this.gapSize = 1;
27
28 this.setValues( parameters );
29
30}
31
32LineDashedMaterial.prototype = Object.create( LineBasicMaterial.prototype );
33LineDashedMaterial.prototype.constructor = LineDashedMaterial;
34
35LineDashedMaterial.prototype.isLineDashedMaterial = true;
36
37LineDashedMaterial.prototype.copy = function ( source ) {
38
39 LineBasicMaterial.prototype.copy.call( this, source );
40
41 this.scale = source.scale;
42 this.dashSize = source.dashSize;
43 this.gapSize = source.gapSize;
44
45 return this;
46
47};
48
49
50export { LineDashedMaterial };