Corrected transparency on the fence

This commit is contained in:
Thomas FORGIONE 2015-04-15 09:56:19 +02:00
parent be1ccaab9c
commit fcf2ea6b22
5 changed files with 14 additions and 5 deletions

View File

@ -147,7 +147,7 @@ Ks 0.000000 0.000000 0.000000
Ni 1.000000
d 1.000000
illum 2
map_Kd 1FEE462_c.bmp
# map_Kd 1FEE462_c.bmp
newmtl Material.095

View File

@ -1935,6 +1935,7 @@ f 174/107 177/108 173/109
usemtl Material.095
f 175/107 177/108 174/109
f 176/107 173/108 177/109
# Flag in back left
usemtl Material.104
f 178/107 180/108 179/109
f 179/107 180/108 181/109

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@ -49,8 +49,6 @@ var PointerCamera = function() {
listenerTarget.addEventListener('mousemove', onMouseMove, false);
listenerTarget.addEventListener('mouseup', onMouseUp, false);
listenerTarget.addEventListener('mouseout', onMouseUp, false);
console.log(arguments[3]);
}
PointerCamera.prototype = Object.create(THREE.PerspectiveCamera.prototype);
PointerCamera.prototype.constructor = PointerCamera;

12
prototype/js/main.js vendored
View File

@ -24,6 +24,7 @@ function init() {
renderer.setSize(container_size.width, container_size.height);
renderer.shadowMapEnabled = true;
renderer.setClearColor(0x87ceeb);
renderer.sortObjects = false
// on initialise la scène
scene = new THREE.Scene();
@ -85,8 +86,13 @@ function init() {
scene.add(object);
object.traverse(function (object) {
if (object instanceof THREE.Material){
console.log(object.material.transparent)
object.material.transparent = true;
}
if (object instanceof THREE.Mesh) {
console.log(object.geometry.vertices.length);
object.geometry.mergeVertices();
}
});
}, onProgress, onError );
@ -98,9 +104,13 @@ function init() {
object.up = new THREE.Vector3(0,0,1);
scene.add(object);
object.traverse(function (object) {
if (object instanceof THREE.Material){
if (object instanceof THREE.Mesh) {
object.geometry.mergeVertices();
if (object.material.name === 'Material.103_princess_peaches_cast') {
console.log(object.material.name);
object.material.transparent = true;
}
}
});
}, onProgress, onError );