mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 16:44:05 -05:00
Merge pull request #77 from AnalyticalGraphicsInc/tr
Treat alpha as 1.0 - Tr
This commit is contained in:
commit
1b9f54ef22
@ -66,7 +66,7 @@ function loadMtl(mtlPath) {
|
||||
material.alpha = parseFloat(value);
|
||||
} else if (/^Tr /i.test(line)) {
|
||||
value = line.substring(3).trim();
|
||||
material.alpha = parseFloat(value);
|
||||
material.alpha = 1.0 - parseFloat(value);
|
||||
} else if (/^map_Ka /i.test(line)) {
|
||||
material.ambientTexture = path.resolve(mtlDirectory, line.substring(7).trim());
|
||||
} else if (/^map_Ke /i.test(line)) {
|
||||
|
@ -9,7 +9,7 @@ Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.100000 0.100000 0.100000
|
||||
Ni 1.000000
|
||||
d 0.900000
|
||||
Tr 0.900000
|
||||
Tr 0.100000
|
||||
map_Ka ambient.gif
|
||||
map_Ke emission.jpg
|
||||
map_Kd diffuse.png
|
||||
|
Loading…
Reference in New Issue
Block a user