Spaces:
Runtime error
Runtime error
File size: 689 Bytes
6ffd0b5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import { app } from "../../scripts/app.js";
/*
Things that can be useful (generally as breakpoints) when debugging
*/
export function add_debug() {
var dirty_canvas = true;
Object.defineProperty(app.canvas, 'dirty_canvas', {
get : () => { return dirty_canvas },
set : (v) => { dirty_canvas = v;} // a breakpoint here catches the calls that mark the canvas as dirty
})
var dirty_bg_canvas = true;
Object.defineProperty(app.canvas, 'dirty_bg_canvas', {
get : () => { return dirty_bg_canvas },
set : (v) => { dirty_bg_canvas = v;} // a breakpoint here catches the calls that mark the background canvas as dirty
})
} |