Skip to content

Commit

Permalink
Editor: Add missing manager to GLTFLoader. (#27336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Dec 7, 2023
1 parent 0e05430 commit 9abdebb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions editor/js/Loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ function Loader( editor ) {

const contents = event.target.result;

const loader = await createGLTFLoader();
const loader = await createGLTFLoader( manager );

loader.parse( contents, '', function ( result ) {

Expand Down Expand Up @@ -987,7 +987,7 @@ function Loader( editor ) {

}

async function createGLTFLoader() {
async function createGLTFLoader( manager ) {

const { GLTFLoader } = await import( 'three/addons/loaders/GLTFLoader.js' );
const { DRACOLoader } = await import( 'three/addons/loaders/DRACOLoader.js' );
Expand All @@ -1002,7 +1002,7 @@ function Loader( editor ) {

editor.signals.rendererDetectKTX2Support.dispatch( ktx2Loader );

const loader = new GLTFLoader();
const loader = new GLTFLoader( manager );
loader.setDRACOLoader( dracoLoader );
loader.setKTX2Loader( ktx2Loader );
loader.setMeshoptDecoder( MeshoptDecoder );
Expand Down

0 comments on commit 9abdebb

Please sign in to comment.