Skip to content

Commit

Permalink
mrdoob#9756 Worker code build: Removed need to adjust constructor and…
Browse files Browse the repository at this point in the history
… some new Object calls. Updated version to 1.0.3.
  • Loading branch information
kaisalmen committed Feb 16, 2017
1 parent ea06cde commit cbe33ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/js/loaders/OBJLoader2.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

if ( THREE.OBJLoader2 === undefined ) { THREE.OBJLoader2 = {} }
THREE.OBJLoader2.version = '1.0.2';
THREE.OBJLoader2.version = '1.0.3';

/**
* Use this class to load OBJ data from files or to parse OBJ data from arraybuffer or text
Expand Down
8 changes: 2 additions & 6 deletions examples/js/loaders/WWOBJLoader2.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'use strict';

if ( THREE.OBJLoader2 === undefined ) { THREE.OBJLoader2 = {} }
THREE.OBJLoader2.version = '1.0.2';
THREE.OBJLoader2.version = '1.0.3';

/**
* OBJ data will be loaded by dynamically created web worker.
Expand Down Expand Up @@ -815,10 +815,7 @@ THREE.OBJLoader2.WWOBJLoader2 = (function () {

var buildSingelton = function ( fullName, internalName, object ) {
var objectString = fullName + ' = (function () {\n\n';

var constructorString = object.prototype.constructor.toString();
constructorString = constructorString.replace( /function\s[a-z]/g, 'function ' + internalName );
objectString += '\t' + constructorString + '\n\n';
objectString += '\t' + object.prototype.constructor.toString() + '\n\n';

var funcString;
var objectPart;
Expand All @@ -828,7 +825,6 @@ THREE.OBJLoader2.WWOBJLoader2 = (function () {
if ( typeof objectPart === 'function' ) {

funcString = objectPart.toString();
funcString = funcString.replace( /new\s[a-z]/g, 'new ' + internalName );
objectString += '\t' + internalName + '.prototype.' + name + ' = ' + funcString + ';\n\n';

}
Expand Down

0 comments on commit cbe33ef

Please sign in to comment.