1 | import { Material } from './Material.js';
|
2 | import { Vector2 } from '../math/Vector2.js';
|
3 |
|
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 | function MeshNormalMaterial( parameters ) {
|
31 |
|
32 | Material.call( this );
|
33 |
|
34 | this.type = 'MeshNormalMaterial';
|
35 |
|
36 | this.bumpMap = null;
|
37 | this.bumpScale = 1;
|
38 |
|
39 | this.normalMap = null;
|
40 | this.normalScale = new Vector2( 1, 1 );
|
41 |
|
42 | this.displacementMap = null;
|
43 | this.displacementScale = 1;
|
44 | this.displacementBias = 0;
|
45 |
|
46 | this.wireframe = false;
|
47 | this.wireframeLinewidth = 1;
|
48 |
|
49 | this.fog = false;
|
50 | this.lights = false;
|
51 |
|
52 | this.skinning = false;
|
53 | this.morphTargets = false;
|
54 | this.morphNormals = false;
|
55 |
|
56 | this.setValues( parameters );
|
57 |
|
58 | }
|
59 |
|
60 | MeshNormalMaterial.prototype = Object.create( Material.prototype );
|
61 | MeshNormalMaterial.prototype.constructor = MeshNormalMaterial;
|
62 |
|
63 | MeshNormalMaterial.prototype.isMeshNormalMaterial = true;
|
64 |
|
65 | MeshNormalMaterial.prototype.copy = function ( source ) {
|
66 |
|
67 | Material.prototype.copy.call( this, source );
|
68 |
|
69 | this.bumpMap = source.bumpMap;
|
70 | this.bumpScale = source.bumpScale;
|
71 |
|
72 | this.normalMap = source.normalMap;
|
73 | this.normalScale.copy( source.normalScale );
|
74 |
|
75 | this.displacementMap = source.displacementMap;
|
76 | this.displacementScale = source.displacementScale;
|
77 | this.displacementBias = source.displacementBias;
|
78 |
|
79 | this.wireframe = source.wireframe;
|
80 | this.wireframeLinewidth = source.wireframeLinewidth;
|
81 |
|
82 | this.skinning = source.skinning;
|
83 | this.morphTargets = source.morphTargets;
|
84 | this.morphNormals = source.morphNormals;
|
85 |
|
86 | return this;
|
87 |
|
88 | };
|
89 |
|
90 |
|
91 | export { MeshNormalMaterial };
|