You are reading a single comment by @allObjects and its replies. Click here to read the full conversation.
  • I had a different thought... why not use the interface that the context of a html canvas has... the application talks in JS the same way to this interface whether running in a browser or in a dedicated micro controller.

    Based on that idea - but with the give Graphics library and the given's of @russdx's lcd panel controller api - I was thinking of an adapter that has on one side - the application side - the context api of the browser canvas and on the other side it speaks to the Espruino Graphics lib or the LED panel controller interface. For example: how much can the api for drawing a line (in a 2D context) be semantically different between any of the environments? Lets wrap the setting of fonts in an api as well that requires only to pass an ID and let the dedicated implementations - which are loaded with ID matching profiles - do the settings. Yes, it adds layers, but @russdx would like to run the very same (high) level application code on just any platform... @Gordon, no adversary thoughts here, just a question: could you imagine the Espruino graphics have the same api as the 2D context of an html canvas?

About

Avatar for allObjects @allObjects started