We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c21170b commit a76dc41Copy full SHA for a76dc41
1 file changed
js/sceneview.js
@@ -238,7 +238,8 @@
238
options = options || {};
239
return new Promise(function(resolve, reject) {
240
ensureFilament(function() {
241
- Filament.init([], function() {
+ // If Filament WASM is already initialized (Engine exists), skip init
242
+ function setup() {
243
try {
244
const canvas = typeof canvasOrId === 'string'
245
? document.getElementById(canvasOrId)
@@ -299,7 +300,13 @@
299
300
} catch (e) {
301
reject(e);
302
}
- });
303
+ }
304
+ // Check if Filament WASM is already ready
305
+ if (Filament.Engine) {
306
+ setup();
307
+ } else {
308
+ Filament.init([], setup);
309
310
});
311
312
0 commit comments