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

42 行
836B

  1. import GlobalEvents from "/app/js/common/EventCaller.js";
  2. import Utils from "/app/js/common/Utils.js";
  3. import NESBank from "/app/js/models/NESBank.js";
  4. import NESPalette from "/app/js/models/NESPalette.js";
  5. function HANDLE_DragOver(e){
  6. e.stopPropagation();
  7. e.preventDefault();
  8. e.dataTransfer.dropEffect = 'copy';
  9. };
  10. function HANDLE_FileDrop(e){
  11. e.stopPropagation();
  12. e.preventDefault();
  13. var files = e.dataTransfer.files;
  14. for (let i=0; i < files.length; i++){
  15. console.log(files[i]);
  16. }
  17. }
  18. class CTRLIO{
  19. constructor(){}
  20. initialize(){
  21. var e = document.querySelectorAll(".drop-zone");
  22. for (let i=0; i < e.length; e++){
  23. e[i].addEventListener("dragover", HANDLE_DragOver);
  24. e[i].addEventListener("drop", HANDLE_FileDrop);
  25. }
  26. }
  27. }
  28. const instance = new CTRLIO();
  29. export default instance;