Skip to content

Additional documentation #5

@MrBlenny

Description

@MrBlenny

Hey,

I've got an inclination to build a HTML5 canvas -> laser dock converter. This would be a chrome extension which find the canvas on a webpage, load some simple game-specific config and start sampling it and converting the canvas shapes/paths to the laserdock format. This would allow for a variety of simple web based games to be played, for example:

Is there additional documentation?

My current thinking:

  1. Chrome extension modifies how the html5 canvas is rendered, removing background textures, changing shapes to outlines etc. Client side js is specific to each game and liable to break.
  2. toDataURL is used to convert canvas to an image
  3. Images are converted to svg using something like imagetracerjs
  4. Svgs are then sent to a python process to be encoded using svg2ild

I have not used these libs before so performance will be questionable. I suspect the bottleneck will be vectorising the rasters - this could be multi-threaded in node if need be. Does laserdocklib bring anything to the table here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions