Selaa lähdekoodia

On THREE.Texture, if `image` is a canvas, chances are is already loaded.

Mr.doob 14 vuotta sitten
vanhempi
commit
eb3c0d59d7
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      src/materials/Texture.js

+ 2 - 0
src/materials/Texture.js

@@ -6,6 +6,8 @@
 
 THREE.Texture = function ( image, mapping, wrap_s, wrap_t, mag_filter, min_filter ) {
 
+	if ( image.getContext ) image.loaded = true;
+
 	this.image = image;
 
 	this.mapping = mapping !== undefined ? mapping : new THREE.UVMapping();