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文字以内のものにしてください。

36 行
767B

  1. import {NESPainter} from "/app/js/NESPainter.js";
  2. import {NESPalette} from "/app/js/NESPalette.js";
  3. function initialize(DOC){
  4. var nespainter = new NESPainter(DOC.getElementById("painter"));
  5. //if (!canvas){
  6. // throw new Error("DOM Missing painter canvas.");
  7. //}
  8. //var ctx = canvas.getContext("2d");
  9. //if (!ctx){
  10. // throw new Error("Failed to obtain canvas context.");
  11. //}
  12. console.log(nespainter.scale);
  13. nespainter.scale_up(5);
  14. console.log(nespainter.scale);
  15. var nespal = new NESPalette();
  16. nespal.set_palette([
  17. 44,
  18. 11,12,13,
  19. 54,23,43,
  20. 23,18,11,
  21. 4,8,60,
  22. 63,0,11,
  23. 0,15,14,
  24. 9,0,32,
  25. 5,10,20
  26. ]);
  27. console.log(nespal.to_asm());
  28. }
  29. //console.log(document.getElementByID("painter"));
  30. initialize(document);