A pixel art painter geared specifically at NES pixel art. Includes export for .chr binary file as well as palette and namespace data.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

40 行
1.2KB

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