File tree 4 files changed +21
-18
lines changed
4 files changed +21
-18
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"configurations" : [
3
3
{
4
- "type" : " electron" ,
5
- "request" : " launch" ,
6
4
"name" : " HTML5-watch" ,
7
- "appDir" : " ${workspaceFolder}/build/debug-html5" ,
8
- "sourceMaps" : true ,
9
- "preLaunchTask" : " Build Electron-watch" ,
10
- "postDebugTask" : " postDebugKill"
11
- },
12
- {
13
- "type" : " electron" ,
14
5
"request" : " launch" ,
15
- "name" : " Kha: HTML5" ,
16
- "appDir" : " ${workspaceFolder}/build/debug-html5" ,
17
- "sourceMaps" : true ,
18
- "preLaunchTask" : " Kha: Build for Debug HTML5"
6
+ "type" : " pwa-chrome" ,
7
+ "cwd" : " ${workspaceFolder}/build/debug-html5" ,
8
+ "runtimeExecutable" : " ${command:kha.findKhaElectron}" ,
9
+ "runtimeArgs" : [
10
+ " --no-sandbox" ,
11
+ " ."
12
+ ],
13
+ "outFiles" : [
14
+ " ${workspaceFolder}/build/debug-html5/*.js"
15
+ ],
16
+ "preLaunchTask" : " Build Electron-watch" ,
17
+ "postDebugTask" : " postDebugKill" ,
18
+ "internalConsoleOptions" : " openOnSessionStart"
19
19
},
20
20
{
21
21
"type" : " krom" ,
22
22
"request" : " launch" ,
23
23
"name" : " Kha: Krom" ,
24
- "preLaunchTask" : " Kha: Build for Krom"
24
+ "preLaunchTask" : " Kha: Build for Krom" ,
25
+ "internalConsoleOptions" : " openOnSessionStart"
25
26
}
26
27
],
27
28
"compounds" : []
28
- }
29
+ }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ node Kha/make html5 --watch
19
19
- Add this block to ` khafile.js ` (before ` resolve(project); ` ):
20
20
``` js
21
21
if (process .argv .includes (" --watch" )) { // run only in watch mode
22
+ project .targetOptions .html5 .unsafeEval = true ; // allow eval in electron
22
23
let libPath = project .addLibrary (' hotml' ); // client code for code-patching
23
24
project .addDefine (' js_classic' ); // to support constructors patching, optional
24
25
// start websocket server that will send type diffs to client
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ project.addParameter('-dce full');
12
12
project . targetOptions . html5 . disableContextMenu = true ;
13
13
14
14
if ( process . argv . includes ( "--watch" ) ) {
15
+ project . targetOptions . html5 . unsafeEval = true ;
15
16
let libPath = project . addLibrary ( 'hotml' ) ;
16
17
project . addDefine ( 'js_classic' ) ;
17
18
const path = require ( 'path' ) ;
Original file line number Diff line number Diff line change @@ -27,9 +27,9 @@ class Game extends Screen {
27
27
final rects2 : Array <Rect2 > = [];
28
28
29
29
public function init () {
30
- // Assets.loadBlob("blob_txt", (blob) -> {
31
- // trace(blob);
32
- // });
30
+ Assets .loadBlob (" blob_txt" , (blob ) -> {
31
+ trace (blob );
32
+ });
33
33
}
34
34
35
35
override function onUpdate (): Void {
You can’t perform that action at this time.
0 commit comments