|
@@ -12,7 +12,7 @@ THREE.JSONLoader = function ( showStatus ) {
|
|
|
};
|
|
|
|
|
|
THREE.JSONLoader.prototype = Object.create( THREE.Loader.prototype );
|
|
|
-THREE.JSONLoader.prototype.constructor = THREE.JSONLoader;
|
|
|
+THREE.JSONLoader.prototype.constructor = THREE.JSONLoader;
|
|
|
|
|
|
THREE.JSONLoader.prototype.load = function ( url, callback, texturePath ) {
|
|
|
|
|
@@ -43,6 +43,13 @@ THREE.JSONLoader.prototype.loadAjaxJSON = function ( context, url, callback, tex
|
|
|
|
|
|
var json = JSON.parse( xhr.responseText );
|
|
|
|
|
|
+ if ( json.metadata !== undefined && json.metadata.version >= 4 ) {
|
|
|
+
|
|
|
+ console.error( 'THREE.JSONLoader: "' + url + '" should be loaded with THREE.ObjectLoader instead.' );
|
|
|
+ return;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( json.metadata !== undefined && json.metadata.type === 'scene' ) {
|
|
|
|
|
|
console.error( 'THREE.JSONLoader: "' + url + '" seems to be a Scene. Use THREE.SceneLoader instead.' );
|