-
-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement as build step #13
Comments
Well, this app is Also, rendering a realistic image takes a lot of time (more than you want in your buildstep), so you should limit the output to only 10 or so triangles. |
@ondras I wouldn't be worried about the time (I'd use it in a static site and cache the generated images). I wonder if there's a workaround using a node canvas without other dependencies. |
The canonical |
it's definitely do-able. the node-canvas package is a pain in the ass with the cairo dependency, but other than that, you can pretty freely pass it around in server-side code as a canvas node like you would client-side. i'm cruising through the primitive-js code, and i'm having a hard time seeing where you could make that swap cleanly. the source is geared pretty heavily toward a web output instead of a canvas output. but, it certainly looks possible. |
Note: I have not looked at the code for more than a year now. But: I believe that there is actually very little browser-specific code, mostly for the UI used to configure the whole operation. In particular, these files are relevant:
Remaining files are only necessary for the configuration UI. I strongly believe that porting to nodejs shall be straightforward once the Canvas stuff is fixed. |
Would it be hard/possible to convert this to a command line script that could be run in Node? I'd like to use it as a build step in Gulp/Webpack to create SVG placeholders.
I'd like to help if possible, but not sure where to start.
The text was updated successfully, but these errors were encountered: