Sfoglia il codice sorgente

Added some test code for EventWindow

dev-tmpl
Bryan Miller 6 anni fa
parent
commit
d595874629
1 ha cambiato i file con 7 aggiunte e 7 eliminazioni
  1. +7
    -7
      app/js/main.js

+ 7
- 7
app/js/main.js Vedi File

@@ -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);

Loading…
Annulla
Salva