Changed little stuff

This commit is contained in:
Thomas FORGIONE 2015-06-15 10:01:33 +02:00
parent 5fca88ea8f
commit f7490e00b0
2 changed files with 5 additions and 6 deletions

View File

@ -222,7 +222,7 @@ geo.Face = function() {
} }
geo.Face.prototype.max = function() { geo.Face.prototype.max = function() {
if (this.d) { if (this.d !== undefined) {
return Math.max(this.a, this.b, this.c, this.d); return Math.max(this.a, this.b, this.c, this.d);
} else { } else {
return Math.max(this.a, this.b, this.c); return Math.max(this.a, this.b, this.c);
@ -239,7 +239,7 @@ geo.Face.prototype.maxTexture = function() {
geo.Face.prototype.toList = function() { geo.Face.prototype.toList = function() {
var l = ['f', this.a, this.b, this.c]; var l = ['f', this.a, this.b, this.c];
if (this.d) if (this.d !== undefined)
l.push(this.d); l.push(this.d);
if (this.aTexture !== undefined) { if (this.aTexture !== undefined) {
@ -248,14 +248,14 @@ geo.Face.prototype.toList = function() {
l.push(this.cTexture); l.push(this.cTexture);
} }
if (this.dTexture) if (this.dTexture !== undefined)
l.push(this.dTexture); l.push(this.dTexture);
return l; return l;
} }
geo.Face.prototype.toString = function() { geo.Face.prototype.toString = function() {
return 'f ' + this.a + ' ' + this.b + ' ' + this.c + (this.d ? ' ' + this.d : ''); return 'f ' + this.a + ' ' + this.b + ' ' + this.c + (this.d !== undefined ? ' ' + this.d : '');
} }
geo.Usemtl = function() { geo.Usemtl = function() {

View File

@ -54,7 +54,6 @@ function init() {
container.style.width = container_size.width() + 'px'; container.style.width = container_size.width() + 'px';
renderer.setSize(container_size.width(), container_size.height()); renderer.setSize(container_size.width(), container_size.height());
// renderer.setSize(container_size.width(), container_size.height()); // renderer.setSize(container_size.width(), container_size.height());
renderer.shadowMapEnabled = true;
renderer.setClearColor(0x87ceeb); renderer.setClearColor(0x87ceeb);
// Initialize previewer // Initialize previewer
@ -159,7 +158,7 @@ function render() {
cameras.map(function(camera) { if (camera instanceof RecommendedCamera) hide(camera); }); cameras.map(function(camera) { if (camera instanceof RecommendedCamera) hide(camera); });
// Update transparent elements // Update transparent elements
THREEx.Transparency.update(cameras.mainCamera()); // THREEx.Transparency.update(cameras.mainCamera());
// Render preview // Render preview
previewer.render(cameraSelecter.prev, container_size.width(), container_size.height()); previewer.render(cameraSelecter.prev, container_size.width(), container_size.height());