cocopon / tweakpane

:control_knobs: Compact GUI for fine-tuning parameters and monitoring value changes
https://tweakpane.github.io/docs/
MIT License
3.57k stars 90 forks source link

Image input #343

Closed metehus closed 3 years ago

metehus commented 3 years ago

Is Image Input on the roadmap? It would be an awesome resource to use for changing textures, sprites, etc. It could be done with a file input and also via drag-and-drop. The result could be a HTMLImageElement content.

cocopon commented 3 years ago

I'm interested in this feature because HTMLImageElement is part of HTML standard.

At the moment, you can implement it yourself using the plugin system, or use existing third-party plugin (I haven't tried yet).

metehus commented 3 years ago

I'm interested in this feature because HTMLImageElement is part of HTML standard.

At the moment, you can implement it yourself using the plugin system, or use existing third-party plugin (I haven't tried yet).

Just found about plugins and about this one. It has some things missing so i think i'm gonna fork that

metehus commented 3 years ago

Also, one thing that I want to do is to accept URLs on the drop area in order to receive images from external places. For that, i would need to do HTTP requests, involving async stuff. Do you know a good way to do that on the current structure of plugins?

cocopon commented 3 years ago

Tweakpane adopts traditional MVC architecture. You can listen for view events by a controller and send a HTTP request by a model.

metehus commented 3 years ago

I have decided to turn this into a plugin. Thanks for the help!

cocopon commented 3 years ago

Great work! Thank you for sharing it.