Преглед на файлове

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 );