MarkTraceur has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/370680 )

Change subject: Skip extension check of input file
......................................................................


Skip extension check of input file

This is necessary for Thumbor support, since the temporary file for
STL input has no extension.

Change-Id: Iae903c78f8532f16d5d0e39131c0f007fd0577dd
---
M 3d2png.js
1 file changed, 4 insertions(+), 6 deletions(-)

Approvals:
  MarkTraceur: Verified; Looks good to me, approved
  Gilles: Looks good to me, but someone else must approve



diff --git a/3d2png.js b/3d2png.js
index da29b88..d63a488 100755
--- a/3d2png.js
+++ b/3d2png.js
@@ -64,12 +64,10 @@
  * @param {string} filePath Full path to the file
  * @returns {THREE.Loader} File loader
  */
-ThreeDtoPNG.prototype.getLoader = function( filePath ) {
-       if ( filePath.toLowerCase().endsWith( '.stl' ) ) {
-               return new THREE.STLLoader();
-       }
-
-       throw 'Unexpected model file extension, only STL is supported';
+ThreeDtoPNG.prototype.getLoader = function() {
+       // TODO XXX if more file formats are supported later, need a command 
line option
+       // to signify the expected format of the input file.
+       return new THREE.STLLoader();
 };
 
 /**

-- 
To view, visit https://gerrit.wikimedia.org/r/370680
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae903c78f8532f16d5d0e39131c0f007fd0577dd
Gerrit-PatchSet: 1
Gerrit-Project: 3d2png
Gerrit-Branch: master
Gerrit-Owner: MarkTraceur <mholmqu...@wikimedia.org>
Gerrit-Reviewer: Gilles <gdu...@wikimedia.org>
Gerrit-Reviewer: MarkTraceur <mholmqu...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to