processing / p5.js

p5.js is a client-side JS platform that empowers artists, designers, students, and anyone to learn to code and express themselves creatively on the web. It is based on the core principles of Processing. http://twitter.com/p5xjs —
http://p5js.org/
GNU Lesser General Public License v2.1
21.64k stars 3.32k forks source link

Axidraw p5 clean webusb interface #3315

Closed TiborUdvari closed 5 years ago

TiborUdvari commented 5 years ago

Nature of issue?

Most appropriate sub-area of p5.js?

New feature details:

I'm looking to create an API to control my axidraw through WebUSB (currently only working on Chrome) with p5. The communication works by sending simple serial messages. My idea is to have the usual functions like line, ellipse etc. behave normally, but in a certain state draw with the drawing machine instead of to the canvas.

I know this might be out of the scope of the general codebase, but I was wondering what would be a good entry point into the API as I would like to publish it as an optional addon/extensions to p5. I have thought of creating function decorators to the existing library with a global switch to toggle using the Axidraw.

I think ideally it would function something like a custom renderer class, that doesn't actually render anything on the screen. But again, I don't know how that would work, since I don't know if that would work with the paradigm since drawing with the physical machine would mean taking a significant time for each action.

Do you have any ideas on the subject?

lmccart commented 5 years ago

I think this plan sounds good as an addon. I don't know about the specifics of axidraw so it's hard to give advice here. I would suggest posting to the forum for more discussion. https://discourse.processing.org