debug: лог в _spawnParticles и Lua onCommand для scene.particles

This commit is contained in:
min 2026-06-09 12:56:20 +03:00
parent 7384494c8f
commit 6fe249033e

View File

@ -326,6 +326,10 @@ export class GameRuntime {
} }
} catch (_) {} } catch (_) {}
} else { } else {
if (cmd === 'scene.particles' || cmd === 'ui.showText') {
// eslint-disable-next-line no-console
console.warn('[Lua onCommand]', cmd, JSON.stringify(payload));
}
this._handleCommand(null, cmd, payload); this._handleCommand(null, cmd, payload);
} }
}); });
@ -4868,6 +4872,8 @@ export class GameRuntime {
* Делегирует в BabylonScene._spawnParticleEffect, который знает о Babylon. * Делегирует в BabylonScene._spawnParticleEffect, который знает о Babylon.
*/ */
_spawnParticles(payload) { _spawnParticles(payload) {
// eslint-disable-next-line no-console
console.warn('[_spawnParticles] called with:', JSON.stringify(payload), 'scene3d=', !!this.scene3d, 'fn=', !!this.scene3d?._spawnParticleEffect);
if (!payload || !this.scene3d?._spawnParticleEffect) return; if (!payload || !this.scene3d?._spawnParticleEffect) return;
try { try {
this.scene3d._spawnParticleEffect(payload); this.scene3d._spawnParticleEffect(payload);