Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any HTML5 UI frameworks that render to canvas instead of using HTML elements?

I realize that some people think it is crazy to re-implement all the UI functionality of HTML in a canvas-based framework (and there are some stackoverflow questions that suggest this), but is anyone actually working on a library like this?

To clarify, the library would render all UI elements like edit boxes, labels, buttons, combo boxes, list views, etc. on the canvas directly. There would be no HTML or CSS.

like image 777
MindJuice Avatar asked Oct 21 '11 01:10

MindJuice


People also ask

Is HTML5 canvas still used?

The HTML5 canvas has the potential to become a staple of the web, enjoying ubiquitous browser and platform support in addition to widespread webpage support, as nearly 90% of websites have ported to HTML5.

Which built in HTML5 object is used to draw on the canvas?

The HTML <canvas> element is used to draw graphics, on the fly, via JavaScript. The <canvas> element is only a container for graphics. You must use JavaScript to actually draw the graphics. Canvas has several methods for drawing paths, boxes, circles, text, and adding images.

Which is better SVG or canvas?

SVG gives better performance with smaller number of objects or larger surface. Canvas gives better performance with smaller surface or larger number of objects. SVG is vector based and composed of shapes. Canvas is raster based and composed of pixel.

Is canvas a form element in HTML5?

Unfortunately it's not possible to use <canvas> as input form, but what you can do is to draw into canvas, then after finishing the drawing operations "export" it's content into an <image> . Fortunately you can use image as a form. The standard way to draw canvas content into an image is by using canvas.


2 Answers

I stumbled upon this idea today. Found the library Zebra. Haven't tried it out yet.

https://zebkit.org/

For web apps I think this makes perfect sense. HTML/CSS is just not good enough to create stable apps easily. The DOM and layouts are just too quirky and the performance too low.

What we need is something like Silverlight but without the plugin. Stable components and a great framework.

Canvas apps could be made just as accessible as html web apps. Probably more so even.

Perhaps WebGL is even better, its performance is definitely better than Canvas if done properly.

like image 185
oldwizard Avatar answered Oct 02 '22 15:10

oldwizard


Thunderhead was a mozilla experiment built along with bespin (now skywriter).

From the project description:

Thunderhead is a Mozilla Labs experiment to explore a JavaScript-based GUI toolkit that works with DOM elements and canvas to render components.

The problem is accessibility, canvas just isn't.

like image 42
Jason Harwig Avatar answered Oct 02 '22 17:10

Jason Harwig