![]() |
|
[Source] HTML 5 Canvas Open Source Library - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Coders Lounge (https://hackforums.net/forumdisplay.php?fid=5) +---- Thread: [Source] HTML 5 Canvas Open Source Library (/showthread.php?tid=5227882) |
HTML 5 Canvas Open Source Library - Dredd - Apr 5, 2016 https://jsfiddle.net/mnhut500 Here is something I chucked together quickly let me know if people would find this kind of library useful and I'll turn it into an open source GitHub project where others can contribute. Currently it allows you to add very basic buttons and a slightly customizable progress bar. Thanks, 🎉 * - SIM-1725686 - Apr 5, 2016 Ahoy, matey. Good work. However, I don't really think it will be practical to continue this, as this is what CSS frameworks like Bootstrap or MDL are made for. It's hard to uproot those. But it looks nice, nevertheless. The main thing I think you should know is that visual styling is really the job of CSS, not Javascript. * - Dredd - Apr 5, 2016 (Apr 5, 2016 04:41 PM)regiostech Wrote: Ahoy, matey. Good work. Yes I fully understand where you're coming from I'm actually a web developer by trade but HTML 5 Canvas is still fairly new and CSS and HTML does not apply inside of Canvas everything has to be done manually this library is for people who want to make canvas based applications. I was also looking around and it doesn't seem there are too many libraries for canvas either especially ones that contain basic components such as buttons and such which will allow you to create menus and UIs. Slightly updated a few things, also added a dispose function to delete elements E.g. button1.dispose() also added the ability to declare custom element names so instead of typign buttons[0].text you can now declare btn1.text. https://jsfiddle.net/mnhut500/2/ |