A pixel art painter geared specifically at NES pixel art. Includes export for .chr binary file as well as palette and namespace data.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

46 lines
1.4KB

  1. import GlobalEvents from "/app/js/common/EventCaller.js";
  2. import EmitterElements from "/app/js/ui/Emitters.js";
  3. import Input from "/app/js/ui/Input.js";
  4. import Modal from "/app/js/ui/Modal.js";
  5. import Tabs from "/app/js/ui/Tabs.js";
  6. import CTRLPalettes from "/app/js/ctrls/CTRLPalettes.js";
  7. import CTRLPainter from "/app/js/ctrls/CTRLPainter.js";
  8. import CTRLPalettesStore from "/app/js/ctrls/CTRLPalettesStore.js";
  9. import CTRLBanksStore from "/app/js/ctrls/CTRLBanksStore.js";
  10. import CTRLBankTools from "/app/js/ctrls/CTRLBankTools.js";
  11. import CTRLIO from "/app/js/ctrls/CTRLIO.js";
  12. import NESPalette from "/app/js/models/NESPalette.js";
  13. function TitlePainter(pal){
  14. var elist = document.querySelectorAll(".color-NES-random");
  15. if (elist){
  16. elist.forEach(function(el){
  17. var ca = Math.floor(Math.random() * 11) + 1;
  18. var cb = Math.floor(Math.random() * 3);
  19. var index = (cb*16)+ca;
  20. el.style.color = pal[index];
  21. el.style["background-color"] = "#000";
  22. });
  23. }
  24. }
  25. function initialize(DOC){
  26. // UI and View only controllers
  27. TitlePainter(NESPalette.SystemColor);
  28. EmitterElements.initialize();
  29. Tabs.initialize();
  30. // Controllers explicitly interface model data to view.
  31. CTRLPainter.initialize();
  32. CTRLBankTools.initialize();
  33. CTRLPalettesStore.initialize();
  34. CTRLBanksStore.initialize();
  35. CTRLIO.initialize();
  36. }
  37. initialize(document);