(path)
| 1304 | } |
| 1305 | }).finally(() => { |
| 1306 | const endTime = Date.now(); |
| 1307 | console.log(`[DEBUG] loadModel: Finished loading ${filePath}. Took ${endTime - startTime}ms.`); |
| 1308 | }); |
| 1309 | } catch (error) { |
| 1310 | console.error('loadModel error:', error); |
| 1311 | throw error; |
| 1312 | } |
| 1313 | } |
| 1314 | |
| 1315 | // Make loadModel available globally |
| 1316 | window.loadModel = loadModel; |
| 1317 | |
| 1318 | // Add these variables at the top |
| 1319 | let totalThumbnailsToGenerate = 0; |
| 1320 | let generatedThumbnailsCount = 0; |
| 1321 | |
| 1322 | // Add WebGL context management variables |
| 1323 | let sharedScene = null; |
| 1324 | let sharedCamera = null; |
| 1325 | let contextUseCount = 0; |
| 1326 | const MAX_CONTEXT_USES = 20; // Reset context after this many uses |
| 1327 | const MAX_CONTEXT_REUSE_COUNT = 100; // Add this missing constant |
no outgoing calls
no test coverage detected