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

Make a plug-in? #17

Closed
QuarkPixel opened this issue Aug 19, 2022 · 3 comments
Closed

Make a plug-in? #17

QuarkPixel opened this issue Aug 19, 2022 · 3 comments

Comments

@QuarkPixel
Copy link

I rally rally like this website!
In fact, I have never seen code outside Apple that can generate such pictures. Maybe I'm a little superficial, but this is the only place I know so far that I can generate such pictures.
So is it possible for this webpage to become a plug-in form that can be directly referenced by others? I tried to carry out this project myself, but I was not familiar with Svelte, so I gave up 😂
I would be very grateful if you could take some time to do this project ❤️

@anup-a
Copy link
Owner

anup-a commented Aug 20, 2022

Hi, @QuarkPixel Thanks.

Can you explain a bit more about your use case?

directly referenced by others

Do you mean a util library that generates a new mesh gradient on demand to inject into your website?

@QuarkPixel
Copy link
Author

QuarkPixel commented Aug 20, 2022

That's right, I mean just need to refer to one or more js files, and then use this generate function where I need it, and it can be generated where I want to generate it.
For example:
//generateMeshy(correspondingID,meshID,width,height,color1,color2,color3,color4) generateMeshy('meshyCanvas',238,1920,1080,'#2780c2','#ff00ff','#08f796', #09a654)
Then, it can generate picture in canvas with id for "meshyCanvas"

@anup-a
Copy link
Owner

anup-a commented Aug 20, 2022

Here you go https://github.com/anup-a/mesh-gradient.js.

Give it a shot, I have exposed the core code which generates mesh gradient.

As of now, API is not very clean, but feel free to contribute. PRs are always welcome 🙃.

@anup-a anup-a closed this as completed Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants