Skip to content
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

Create a JS port of Primitive to remove the Golang dependency #6

Closed
technopagan opened this issue Sep 21, 2017 · 5 comments
Closed

Comments

@technopagan
Copy link
Collaborator

Currently, SQIP relies on Primitive (https://github.com/fogleman/primitive), which is written in Go, being installed. We could remove this unelegant dependency by porting Primitive to JS, maybe by basing our porting work on https://github.com/ondras/primitive.js.

@robinpokorny
Copy link

@ondras, how difficult you think this would be?

@ondras
Copy link

ondras commented Nov 13, 2017

Well, PrimitiveJS stands and falls with the 2D <canvas> DOM API. If the port is to be server-side, some corresponding lib/api has to be used.

As far as client side is concerned, PrimitiveJS is already a pretty close port of Primitive, using most of the algorithms from the initial Go implementation.

@Munter
Copy link

Munter commented Nov 21, 2017

Canvas exists for node, but has some other drawbacks of required installations: https://www.npmjs.com/package/canvas#installation

I used it in histrogram, which also works on node: https://github.com/Munter/node-histogram/blob/master/lib/index.js#L109-L122

@axe312ger
Copy link
Owner

I made #25 to work around this for now.

But ++ on a node version :)

@axe312ger
Copy link
Owner

This is out of scope of this project 🙃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants