1 | import { Material } from './Material.js';
|
2 | import { Color } from '../math/Color.js';
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 | function PointsMaterial( parameters ) {
|
19 |
|
20 | Material.call( this );
|
21 |
|
22 | this.type = 'PointsMaterial';
|
23 |
|
24 | this.color = new Color( 0xffffff );
|
25 |
|
26 | this.map = null;
|
27 |
|
28 | this.size = 1;
|
29 | this.sizeAttenuation = true;
|
30 |
|
31 | this.lights = false;
|
32 |
|
33 | this.setValues( parameters );
|
34 |
|
35 | }
|
36 |
|
37 | PointsMaterial.prototype = Object.create( Material.prototype );
|
38 | PointsMaterial.prototype.constructor = PointsMaterial;
|
39 |
|
40 | PointsMaterial.prototype.isPointsMaterial = true;
|
41 |
|
42 | PointsMaterial.prototype.copy = function ( source ) {
|
43 |
|
44 | Material.prototype.copy.call( this, source );
|
45 |
|
46 | this.color.copy( source.color );
|
47 |
|
48 | this.map = source.map;
|
49 |
|
50 | this.size = source.size;
|
51 | this.sizeAttenuation = source.sizeAttenuation;
|
52 |
|
53 | return this;
|
54 |
|
55 | };
|
56 |
|
57 |
|
58 | export { PointsMaterial };
|