浏览代码

Added some test code for EventWindow

dev-tmpl
Bryan Miller 6 年前
父节点
当前提交
d595874629
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. +7
    -7
      app/js/main.js

+ 7
- 7
app/js/main.js 查看文件

@@ -1,3 +1,4 @@
import EventWindow from "/app/js/ui/EventWindow.js";
import {NESPainter} from "/app/js/NESPainter.js";
import {NESPalette} from "/app/js/NESPalette.js";

@@ -11,15 +12,14 @@ function on_palette_changed(e){
}
}

function on_click(e){
console.log(e.target);
}

function initialize(DOC){
EventWindow.listen("onclick", on_click);

var nespainter = new NESPainter(DOC.getElementById("painter"));
//if (!canvas){
// throw new Error("DOM Missing painter canvas.");
//}
//var ctx = canvas.getContext("2d");
//if (!ctx){
// throw new Error("Failed to obtain canvas context.");
//}

console.log(nespainter.scale);
nespainter.scale_up(5);

正在加载...
取消
保存