Arc Forumnew | comments | leaders | submitlogin
3 points by shawn 1870 days ago | link | parent

Yeah, it was worth the effort to make the drawing code client side. Someone showed up and made a software rasterizer.

Timelapse: https://www.youtube.com/watch?v=G0sG08jKCTI



2 points by krapp 1868 days ago | link

why not go all the way and render client-side in a canvas as well?

As it is, the more "pixels" you have, the slower the page loads. You could probably have just a single canvas and a single event handler.

You could preserve functionality for non-js users by using an imagemap (assuming browsers still even support those) or sticking the existing code in noscript tags.

-----

2 points by krapp 1867 days ago | link

OK... I don't know where I got "single event handler from," that obviously wouldn't be true, but it would still be simpler than having each pixel be a separate HTML form....

-----

1 point by shawn 1867 days ago | link

Wanna hop into discord and we can chat about the design? https://discord.gg/qaqkc9z

The repo's open, and I could help get you set up with it if you wanted to work on some of this. https://github.com/laarc/laarc

It should be a matter of:

  git clone https://github.com/laarc/laarc
  cd laarc
  make
  rlwrap bin/arc
  ((load "news.arc"))
and then http://localhost:8080/place

-----

2 points by krapp 1867 days ago | link

Let me actually see if I can come up with a POC first, at least for the canvas and javascript. Realistically, since it's just GET requests that don't need authentication, I shouldn't even need laarc running, I can just send the same requests by AJAX.

-----

2 points by shawn 1867 days ago | link

https://www.laarc.io/place.json is the API, by the way! I should probably mention that somewhere.

-----