A pixel art painter geared specifically at NES pixel art. Includes export for .chr binary file as well as palette and namespace data.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

43 lines
1.3KB

  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 NESPalette from "/app/js/models/NESPalette.js";
  12. function TitlePainter(pal){
  13. var elist = document.querySelectorAll(".color-NES-random");
  14. if (elist){
  15. elist.forEach(function(el){
  16. var ca = Math.floor(Math.random() * 11) + 1;
  17. var cb = Math.floor(Math.random() * 3);
  18. var index = (cb*16)+ca;
  19. el.style.color = pal[index];
  20. el.style["background-color"] = "#000";
  21. });
  22. }
  23. }
  24. function initialize(DOC){
  25. // UI and View only controllers
  26. TitlePainter(NESPalette.SystemColor);
  27. EmitterElements.initialize();
  28. Tabs.initialize();
  29. // Controllers explicitly interface model data to view.
  30. CTRLPainter.initialize();
  31. CTRLBankTools.initialize();
  32. CTRLPalettesStore.initialize();
  33. CTRLBanksStore.initialize();
  34. }
  35. initialize(document);