@@ -12,7 +12,6 @@ export async function injectModel(
1212 const bytes = await readFile ( modelPath ) ;
1313 const base64 = bytes . toString ( "base64" ) ;
1414 const fileName = basename ( modelPath ) ;
15- console . log ( `[sprite-sheet-helper] File name: ${ fileName } ` ) ;
1615
1716 const uuid = await page . evaluate (
1817 async ( b64 : string , name : string ) => {
@@ -21,15 +20,12 @@ export async function injectModel(
2120
2221 const bytes = Uint8Array . from ( atob ( b64 ) , ( c ) => c . charCodeAt ( 0 ) ) ;
2322 const file = new File ( [ bytes ] , name ) ;
24- console . log ( "Injecting model passed: file" , name ) ;
2523
2624 const uuid = bridge . stores . entities . getState ( ) . addEntity ( "model" , name ) ;
2725 bridge . stores . transforms
2826 . getState ( )
2927 . initTransform ( uuid , { position : [ 0 , 0.8 , 0 ] } ) ;
3028
31- console . log ( "Injected model passed: uuid" , uuid ) ;
32-
3329 // const label = name ?? file.name ?? "Model";
3430 // const uuid = addEntity("model", label);
3531
@@ -50,11 +46,8 @@ export async function injectModel(
5046
5147 try {
5248 await bridge . stores . models . getState ( ) . loadFromFile ( uuid , file ) ;
53- console . log ( "Injected model passed: loadFromFile" , uuid ) ;
5449 bridge . stores . entities . getState ( ) . selectEntity ( uuid ) ;
55- console . log ( "Injected model passed: selectEntity" , uuid ) ;
5650 } catch ( err ) {
57- console . log ( "Injected model passed: loadFromFile failed" , err ) ;
5851 throw new Error (
5952 `loadFromFile failed: ${ ( err as Error ) ?. message ?? err } ` ,
6053 ) ;
@@ -66,8 +59,6 @@ export async function injectModel(
6659 fileName ,
6760 ) ;
6861
69- console . log ( `[sprite-sheet-helper] uuid: ${ uuid } ` ) ;
70-
7162 // Wait for the React component to emit MODEL_READY event
7263 await page . evaluate ( ( id : string ) => {
7364 return new Promise < void > ( ( resolve ) => {
0 commit comments