Matthias Mullie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358905 )

Change subject: Fix in response to new three-stl-loader version
......................................................................

Fix in response to new three-stl-loader version

In 1.0.5, three-stl-loader will no longer export an
STLLoader object, but it will add it to THREE.

See 
https://github.com/enspiral-cherubi/three-stl-loader/commit/144cedb5ceb7422f79295c101b3e35abeff2c76c

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


  git pull ssh://gerrit.wikimedia.org:29418/3d2png refs/changes/05/358905/1

diff --git a/3d2png.js b/3d2png.js
index 1d99f4d..6cebb2a 100755
--- a/3d2png.js
+++ b/3d2png.js
@@ -3,10 +3,11 @@
 var Canvas = require( 'canvas' ),
        THREE = require( 'three' ),
        GL = require( 'gl' ),
-       ThreeSTLLoader = require( 'three-stl-loader' ),
-       STLLoader = ThreeSTLLoader( THREE ),
        fs = require( 'fs' ),
        yargs = require( 'yargs' );
+
+// Add THREE.STLLoader
+require( 'three-stl-loader' )( THREE );
 
 /**
  * Converts 3D files to PNG images
@@ -57,7 +58,7 @@
  */
 ThreeDtoPNG.prototype.getLoader = function( filePath ) {
        if ( filePath.toLowerCase().endsWith( '.stl' ) ) {
-               return new STLLoader();
+               return new THREE.STLLoader();
        }
 
        throw 'Unexpected model file extension, only STL is supported';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a25c4209eee09ebd1811831576786f71888df20
Gerrit-PatchSet: 1
Gerrit-Project: 3d2png
Gerrit-Branch: master
Gerrit-Owner: Matthias Mullie <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to