From 6e55966f3f040c48442660562c0c398077397963 Mon Sep 17 00:00:00 2001 From: Andrew Ray Date: Sun, 28 Feb 2016 12:24:16 -0800 Subject: [PATCH] Removing crossOrigin for compatibility with three 0.74 Addresses issue #3 The loader API was volatile-ly changed in three@0.74 because of this ticket: https://github.com/mrdoob/three.js/issues/7568 The related commit: https://github.com/mrdoob/three.js/commit/a88a3e62d73b5964f57899eb60d5fd9291bae1f4#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) --- dist/index.js | 6 ------ package.json | 4 ++-- source/index.js | 7 ------- 3 files changed, 2 insertions(+), 15 deletions(-) diff --git a/dist/index.js b/dist/index.js index eccb271..7f0a519 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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'); diff --git a/package.json b/package.json index c02b28b..f8ed251 100644 --- a/package.json +++ b/package.json @@ -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": { @@ -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": {} } diff --git a/source/index.js b/source/index.js index 10033e1..3cf336b 100644 --- a/source/index.js +++ b/source/index.js @@ -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)); @@ -29,12 +28,6 @@ module.exports = function (THREE) { }, - setCrossOrigin: function (value) { - - this.crossOrigin = value; - - }, - parse: function (text) { console.time('OBJLoader');