1 | import { Material } from './Material.js';
|
2 | import { MultiplyOperation } from '../constants.js';
|
3 | import { Color } from '../math/Color.js';
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 | function MeshBasicMaterial( parameters ) {
|
41 |
|
42 | Material.call( this );
|
43 |
|
44 | this.type = 'MeshBasicMaterial';
|
45 |
|
46 | this.color = new Color( 0xffffff );
|
47 |
|
48 | this.map = null;
|
49 |
|
50 | this.lightMap = null;
|
51 | this.lightMapIntensity = 1.0;
|
52 |
|
53 | this.aoMap = null;
|
54 | this.aoMapIntensity = 1.0;
|
55 |
|
56 | this.specularMap = null;
|
57 |
|
58 | this.alphaMap = null;
|
59 |
|
60 | this.envMap = null;
|
61 | this.combine = MultiplyOperation;
|
62 | this.reflectivity = 1;
|
63 | this.refractionRatio = 0.98;
|
64 |
|
65 | this.wireframe = false;
|
66 | this.wireframeLinewidth = 1;
|
67 | this.wireframeLinecap = 'round';
|
68 | this.wireframeLinejoin = 'round';
|
69 |
|
70 | this.skinning = false;
|
71 | this.morphTargets = false;
|
72 |
|
73 | this.lights = false;
|
74 |
|
75 | this.setValues( parameters );
|
76 |
|
77 | }
|
78 |
|
79 | MeshBasicMaterial.prototype = Object.create( Material.prototype );
|
80 | MeshBasicMaterial.prototype.constructor = MeshBasicMaterial;
|
81 |
|
82 | MeshBasicMaterial.prototype.isMeshBasicMaterial = true;
|
83 |
|
84 | MeshBasicMaterial.prototype.copy = function ( source ) {
|
85 |
|
86 | Material.prototype.copy.call( this, source );
|
87 |
|
88 | this.color.copy( source.color );
|
89 |
|
90 | this.map = source.map;
|
91 |
|
92 | this.lightMap = source.lightMap;
|
93 | this.lightMapIntensity = source.lightMapIntensity;
|
94 |
|
95 | this.aoMap = source.aoMap;
|
96 | this.aoMapIntensity = source.aoMapIntensity;
|
97 |
|
98 | this.specularMap = source.specularMap;
|
99 |
|
100 | this.alphaMap = source.alphaMap;
|
101 |
|
102 | this.envMap = source.envMap;
|
103 | this.combine = source.combine;
|
104 | this.reflectivity = source.reflectivity;
|
105 | this.refractionRatio = source.refractionRatio;
|
106 |
|
107 | this.wireframe = source.wireframe;
|
108 | this.wireframeLinewidth = source.wireframeLinewidth;
|
109 | this.wireframeLinecap = source.wireframeLinecap;
|
110 | this.wireframeLinejoin = source.wireframeLinejoin;
|
111 |
|
112 | this.skinning = source.skinning;
|
113 | this.morphTargets = source.morphTargets;
|
114 |
|
115 | return this;
|
116 |
|
117 | };
|
118 |
|
119 |
|
120 | export { MeshBasicMaterial };
|