From a036bdb3530474d21172a10bfdcc93426338a390 Mon Sep 17 00:00:00 2001 From: Mugen87 Date: Mon, 17 Aug 2020 11:17:18 +0200 Subject: [PATCH] ColladaExporter: Fix runtime error when processing ImageBitmap. --- examples/js/exporters/ColladaExporter.js | 4 ++-- examples/jsm/exporters/ColladaExporter.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/js/exporters/ColladaExporter.js b/examples/js/exporters/ColladaExporter.js index d38bf70e1fcaba..6d30362b6fe8a6 100644 --- a/examples/js/exporters/ColladaExporter.js +++ b/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 ); diff --git a/examples/jsm/exporters/ColladaExporter.js b/examples/jsm/exporters/ColladaExporter.js index 3638f100f40810..df0d7cf71e8071 100644 --- a/examples/jsm/exporters/ColladaExporter.js +++ b/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 );