diff --git a/mods/electron/electron.js b/mods/electron/electron.js index bbd19230..30e93f2d 100644 --- a/mods/electron/electron.js +++ b/mods/electron/electron.js @@ -1,8 +1,8 @@ if (self.kiri && !self.kiri.electron) { self.kiri.electron = {}; self.kiri.load(api => { - console.log('ELECTRON MODULE RUNNING'); - api.event.on('load-done', () => { + console.log('ELECTRON MODULE LOADED'); + api.event.on('init-done', () => { $('app-name-text').innerText = "More Info"; $('top-sep').style.display = 'flex'; }); diff --git a/src/main/kiri.js b/src/main/kiri.js index 14ec062c..b68b0a90 100644 --- a/src/main/kiri.js +++ b/src/main/kiri.js @@ -6,12 +6,29 @@ import '../add/three.js'; import '../kiri/core/lang.js'; import '../kiri/core/lang-en.js'; +import { broker } from '../moto/broker.js'; import { run } from '../kiri/core/init.js'; +let traceload = location.search.indexOf('traceload') > 0; let load = []; +if (traceload) { + broker.subscribe([ + "init.one", + "init.two", + "init.lang", + "init-done", + "load-done", + ], (msg, topic) => { + console.log(topic, '->', msg); + }) +} + function safeExec(fn) { try { + if (traceload) { + console.log('kiri | exec |', fn); + } fn(kiri.api); } catch (error) { console.log('load error', fn, error);