Browse Source

Fixed sprites in dynamic cubemap cars example.

alteredq 12 years ago
parent
commit
7f74694441
1 changed files with 8 additions and 2 deletions
  1. 8 2
      examples/webgl_materials_cubemap_dynamic.html

+ 8 - 2
examples/webgl_materials_cubemap_dynamic.html

@@ -306,7 +306,10 @@
 
 						var sprite = new THREE.Sprite( p );
 
-						sprite.scale.set( s, s, s );
+						var spriteWidth = 128;
+						var spriteHeight = 128;
+
+						sprite.scale.set( s * spriteWidth, s * spriteHeight, s );
 						sprite.position.set( x, y, z );
 
 						object.bodyMesh.add( sprite );
@@ -371,7 +374,10 @@
 
 						var sprite = new THREE.Sprite( p );
 
-						sprite.scale.set( s, s, s );
+						var spriteWidth = 128;
+						var spriteHeight = 128;
+
+						sprite.scale.set( s * spriteWidth, s * spriteHeight, s );
 						sprite.position.set( x, y, z );
 
 						object.bodyMesh.add( sprite );