Is there any way to include external javascript in kode studio while debugging? I want to debug with the haxebullet library, but this requires ammo.js (or cpp) to be included.
-
Include ammo.js during html5 debug in kode studio
Something like this should do for both html5 and krom. It's eval() but so far good enough for me. ammo.js has to be included as an asset in khafile.js.
#if js static function loadJsLib(jsname:String, done:Void->Void) { kha.LoaderImpl.loadBlobFromDescription({ files: [jsname] }, function(b:kha.Blob) { untyped __js__("(1, eval)({0})", b.toString()); done(); }); } #end