From df3bd03c7be5b5f2b3226ddf7a5754945605d864 Mon Sep 17 00:00:00 2001 From: Marco Fugaro Date: Fri, 29 Oct 2021 13:27:55 +0200 Subject: [PATCH] GLTFLoader: add parseAsync --- examples/jsm/loaders/GLTFLoader.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/examples/jsm/loaders/GLTFLoader.js b/examples/jsm/loaders/GLTFLoader.js index 3d6543af13fcbd..a2f8d75d98cb29 100644 --- a/examples/jsm/loaders/GLTFLoader.js +++ b/examples/jsm/loaders/GLTFLoader.js @@ -385,6 +385,18 @@ class GLTFLoader extends Loader { } + parseAsync( data, path ) { + + const scope = this; + + return new Promise( function ( resolve, reject ) { + + scope.parse( data, path, resolve, reject ); + + } ); + + } + } /* GLTFREGISTRY */