A pixel art painter geared specifically at NES pixel art. Includes export for .chr binary file as well as palette and namespace data.
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import GlobalEvents from "/app/js/common/EventCaller.js";
  2. function handle_emitter(event){
  3. if (this.hasAttribute("emit")){
  4. event.preventDefault();
  5. var args = [this.getAttribute("emit"), this];
  6. if (this.hasAttribute("emit-args")){
  7. try {
  8. var j = JSON.parse(this.getAttribute("emit-args"));
  9. if (j instanceof Array){
  10. args.concat(j);
  11. } else {
  12. args.push(j);
  13. }
  14. } catch (e) {
  15. console.log("Failed to emit '" + args[0] +"': " + e.toString());
  16. //console.log("Failed to emit '" + args[0] + "'. Attribute 'emit-args' contains malformed JSON.");
  17. }
  18. }
  19. GlobalEvents.emit.apply(GlobalEvents, args);
  20. }
  21. }
  22. export default {
  23. initialize: function(){
  24. var elist = document.querySelectorAll("[emit]");
  25. elist.forEach(function(el){
  26. el.addEventListener("click", handle_emitter);
  27. });
  28. },
  29. initialize_element: function(el){
  30. if (el.hasAttribute("emit")){
  31. el.addEventListener("click", handle_emitter);
  32. }
  33. }
  34. }