浏览代码

Merge pull request #20049 from Mugen87/dev51

ColladaExporter: Fix runtime error when processing ImageBitmap.
Mr.doob 5 年之前
父节点
当前提交
0ff40ec576
共有 2 个文件被更改,包括 4 次插入4 次删除
  1. 2 2
      examples/js/exporters/ColladaExporter.js
  2. 2 2
      examples/jsm/exporters/ColladaExporter.js

+ 2 - 2
examples/js/exporters/ColladaExporter.js

@@ -100,8 +100,8 @@ THREE.ColladaExporter.prototype = {
 			canvas = canvas || document.createElement( 'canvas' );
 			ctx = ctx || canvas.getContext( '2d' );
 
-			canvas.width = image.naturalWidth;
-			canvas.height = image.naturalHeight;
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			ctx.drawImage( image, 0, 0 );
 

+ 2 - 2
examples/jsm/exporters/ColladaExporter.js

@@ -109,8 +109,8 @@ ColladaExporter.prototype = {
 			canvas = canvas || document.createElement( 'canvas' );
 			ctx = ctx || canvas.getContext( '2d' );
 
-			canvas.width = image.naturalWidth;
-			canvas.height = image.naturalHeight;
+			canvas.width = image.width;
+			canvas.height = image.height;
 
 			ctx.drawImage( image, 0, 0 );