diff --git a/package.json b/package.json index 2ffcfe7f668..7d4fd32d93b 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "present": "0.0.6", "promise-polyfill": "^3.1.0", "style-attr": "^1.0.2", - "three": "^0.86.0", + "three": "^0.87.0", "three-bmfont-text": "^2.1.0", "webvr-polyfill": "^0.9.36" }, diff --git a/src/components/gltf-model.js b/src/components/gltf-model.js index 70bfbafc5f6..79147c72e31 100644 --- a/src/components/gltf-model.js +++ b/src/components/gltf-model.js @@ -9,7 +9,7 @@ module.exports.Component = registerComponent('gltf-model', { init: function () { this.model = null; - this.loader = new THREE.GLTF2Loader(); + this.loader = new THREE.GLTFLoader(); }, update: function () { diff --git a/src/lib/three.js b/src/lib/three.js index 127f38e1405..25e33f03607 100644 --- a/src/lib/three.js +++ b/src/lib/three.js @@ -19,7 +19,7 @@ if (THREE.Cache) { } // TODO: Eventually include these only if they are needed by a component. -require('three/examples/js/loaders/GLTF2Loader'); // THREE.GLTF2Loader +require('three/examples/js/loaders/GLTFLoader'); // THREE.GLTFLoader require('three/examples/js/loaders/OBJLoader'); // THREE.OBJLoader require('three/examples/js/loaders/MTLLoader'); // THREE.MTLLoader require('three/examples/js/loaders/ColladaLoader'); // THREE.ColladaLoader @@ -27,7 +27,7 @@ require('../../vendor/VRControls'); // THREE.VRControls require('../../vendor/VREffect'); // THREE.VREffect THREE.ColladaLoader.prototype.crossOrigin = 'anonymous'; -THREE.GLTF2Loader.prototype.crossOrigin = 'anonymous'; +THREE.GLTFLoader.prototype.crossOrigin = 'anonymous'; THREE.MTLLoader.prototype.crossOrigin = 'anonymous'; THREE.OBJLoader.prototype.crossOrigin = 'anonymous'; diff --git a/tests/components/gltf-model.test.js b/tests/components/gltf-model.test.js index 460ff9c5fc7..f729f54c67d 100644 --- a/tests/components/gltf-model.test.js +++ b/tests/components/gltf-model.test.js @@ -71,7 +71,7 @@ suite('gltf-model', function () { animations: animations }; - this.sinon.stub(THREE, 'GLTF2Loader', function MockGLTFLoader () { + this.sinon.stub(THREE, 'GLTFLoader', function MockGLTFLoader () { this.load = function (url, onLoad) { process.nextTick(onLoad.bind(null, gltfMock)); };