Skip to content

Commit

Permalink
Removing crossOrigin for compatibility with three 0.74
Browse files Browse the repository at this point in the history
Addresses issue sohamkamani#3

The loader API was volatile-ly changed in [email protected] because of this ticket:
mrdoob/three.js#7568

The related commit:
mrdoob/three.js@a88a3e6#diff-b04ba7bf9d62701ef06636159e4a75d9L30

The commit to this repo just ports that change over. It also changes the
semver for threejs to include versions above the current one (which
includes 0.74)
  • Loading branch information
AndrewRayCode committed Feb 28, 2016
1 parent 6b4bcce commit 6e55966
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,12 @@ module.exports = function (THREE) {
var scope = this;

var loader = new THREE.XHRLoader(scope.manager);
loader.setCrossOrigin(this.crossOrigin);
loader.load(url, function (text) {

onLoad(scope.parse(text));
}, onProgress, onError);
},

setCrossOrigin: function setCrossOrigin(value) {

this.crossOrigin = value;
},

parse: function parse(text) {

console.time('OBJLoader');
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "three-obj-loader",
"version": "1.0.1",
"version": "1.0.2",
"description": "NodeJS wrapper for Three.js' OBJLoader function",
"main": "dist/index.js",
"scripts": {
Expand Down Expand Up @@ -35,7 +35,7 @@
"jshint-stylish": "^2.1.0",
"remap-istanbul": "^0.4.0",
"source-map-support": "^0.3.3",
"three": "^0.73.0"
"three": ">=0.73.0"
},
"dependencies": {}
}
7 changes: 0 additions & 7 deletions source/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = function (THREE) {
var scope = this;

var loader = new THREE.XHRLoader(scope.manager);
loader.setCrossOrigin(this.crossOrigin);
loader.load(url, function (text) {

onLoad(scope.parse(text));
Expand All @@ -29,12 +28,6 @@ module.exports = function (THREE) {

},

setCrossOrigin: function (value) {

this.crossOrigin = value;

},

parse: function (text) {

console.time('OBJLoader');
Expand Down

0 comments on commit 6e55966

Please sign in to comment.