forked from jhugheswebdev/sound-equalizer-threejs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThreePBR.js
58 lines (46 loc) · 1.59 KB
/
ThreePBR.js
1
2
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
var ThreePBR = function(){
this.normal_map = new THREE.TextureLoader().load( "assets/normal.jpg" );
this.normal_map.wrapS = THREE.ClampToEdgeWrapping;
this.normal_map.wrapT = THREE.ClampToEdgeWrapping;
this.normal_map.magFilter = THREE.LinearFilter;
this.normal_map.minFilter = THREE.LinearFilter;
this.roughness_map = new THREE.TextureLoader().load( "assets/roughness.jpg" );
this.roughness_map.wrapS = THREE.ClampToEdgeWrapping;
this.roughness_map.wrapT = THREE.ClampToEdgeWrapping;
this.roughness_map.magFilter = THREE.LinearFilter;
this.roughness_map.minFilter = THREE.LinearFilter;
this.metallic_map = new THREE.TextureLoader().load( "assets/metallic.jpg" );
this.metallic_map.wrapS = THREE.ClampToEdgeWrapping;
this.metallic_map.wrapT = THREE.ClampToEdgeWrapping;
this.metallic_map.magFilter = THREE.LinearFilter;
this.metallic_map.minFilter = THREE.LinearFilter;
this.normal = 1.;
this.roughness = .0;
this.metallic = 1.;
this.exposure = 2.;
this.gamma = 2.2;
};
ThreePBR.prototype.get_normal_map = function(){
return this.normal_map;
};
ThreePBR.prototype.get_roughness_map = function(){
return this.roughness_map;
};
ThreePBR.prototype.get_metallic_map = function(){
return this.metallic_map;
};
ThreePBR.prototype.get_normal = function(){
return this.normal;
};
ThreePBR.prototype.get_roughness = function(){
return this.roughness;
};
ThreePBR.prototype.get_metallic = function(){
return this.metallic;
};
ThreePBR.prototype.get_exposure = function(){
return this.exposure;
};
ThreePBR.prototype.get_gamma = function(){
return this.gamma;
};