diff --git a/src/loaders/ObjectLoader.js b/src/loaders/ObjectLoader.js index 89f66255f03a3d..ee1f27005a6f72 100644 --- a/src/loaders/ObjectLoader.js +++ b/src/loaders/ObjectLoader.js @@ -284,6 +284,21 @@ class ObjectLoader extends Loader { geometry = bufferGeometryLoader.parse( data ); break; + case 'Geometry': + + if ( 'THREE' in window && 'LegacyJSONLoader' in THREE ) { + + var geometryLoader = new THREE.LegacyJSONLoader(); + geometry = geometryLoader.parse( data, this.resourcePath ).geometry; + + + } else { + + console.error( 'THREE.ObjectLoader: You have to import LegacyJSONLoader in order load geometry data of type "Geometry".' ); + + } + break; + default: if ( data.type in Geometries ) {