Transparent carpet

This commit is contained in:
Thomas FORGIONE 2015-04-15 17:01:17 +02:00
parent 618b56bba9
commit ebee998282
2 changed files with 22 additions and 20 deletions

View File

@ -2341,22 +2341,22 @@ f 460/561 377/560 461/563
f 462/564 336/565 463/562 f 462/564 336/565 463/562
f 336/565 462/564 337/566 f 336/565 462/564 337/566
usemtl Material.104 usemtl Material.104
f 735/107 468/108 470/109 # f 735/107 468/108 470/109
f 594/107 593/108 464/109 # f 594/107 593/108 464/109
f 593/107 595/108 464/109 # f 593/107 595/108 464/109
f 465/107 735/108 466/109 # f 465/107 735/108 466/109
f 733/107 735/108 465/109 # f 733/107 735/108 465/109
f 470/107 468/108 467/109 # f 470/107 468/108 467/109
f 468/107 734/108 467/109 # f 468/107 734/108 467/109
f 476/107 469/108 738/109 # f 476/107 469/108 738/109
f 466/107 735/108 470/109 # f 466/107 735/108 470/109
f 472/107 471/108 473/109 # f 472/107 471/108 473/109
f 738/107 472/108 473/109 # f 738/107 472/108 473/109
f 475/107 474/108 737/109 # f 475/107 474/108 737/109
f 736/107 475/108 737/109 # f 736/107 475/108 737/109
f 737/107 476/108 738/109 # f 737/107 476/108 738/109
f 589/107 587/108 477/109 # f 589/107 587/108 477/109
f 587/107 591/108 477/109 # f 587/107 591/108 477/109
usemtl Material.104_princess_peaches_cast usemtl Material.104_princess_peaches_cast
f 478/567 480/568 479/569 f 478/567 480/568 479/569
f 480/568 740/570 479/569 f 480/568 740/570 479/569

10
prototype/js/main.js vendored
View File

@ -76,6 +76,7 @@ function init() {
object.traverse(function (object) { object.traverse(function (object) {
if (object instanceof THREE.Mesh) { if (object instanceof THREE.Mesh) {
object.geometry.mergeVertices(); object.geometry.mergeVertices();
object.material.side = THREE.DoubleSide;
if (object.material.name === 'Material.103_princess_peaches_cast') { if (object.material.name === 'Material.103_princess_peaches_cast') {
console.log(object.material.name); console.log(object.material.name);
object.material.transparent = true; object.material.transparent = true;
@ -97,13 +98,14 @@ function init() {
object.up = new THREE.Vector3(0,0,1); object.up = new THREE.Vector3(0,0,1);
scene.add(object); scene.add(object);
object.traverse(function (object) { object.traverse(function (object) {
if (object instanceof THREE.Material){
console.log(object.material.transparent)
object.material.transparent = true;
}
if (object instanceof THREE.Mesh) { if (object instanceof THREE.Mesh) {
object.material.side = THREE.DoubleSide;
console.log(object.geometry.vertices.length); console.log(object.geometry.vertices.length);
object.geometry.mergeVertices(); object.geometry.mergeVertices();
if (object.material.name === 'Material.054_777F0E0B_c.bmp' ||
object.material.name === 'Material.061_5C3492AB_c.bmp' ) {
object.material.transparent = true;
}
} }
}); });
}, onProgress, onError ); }, onProgress, onError );