浏览代码

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

Mr.doob 14 年之前
父节点
当前提交
eb3c0d59d7
共有 1 个文件被更改,包括 2 次插入0 次删除
  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();