Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Slashdot Deals: Deal of the Day - Pay What You Want for the Learn to Code Bundle, includes AngularJS, Python, HTML5, Ruby, and more. ×

Submission + - 3D Teapot Classic Using Pure DHTM - who needs HTML5? (i-programmer.info)

mikejuk writes: This is a project of madness — but you have to admire it. Render the classic 3D Teapot using nothing but DHTML, i.e. JavaScript and HTML but no canvas, no CSS 3, no SVG? It sounds impossible — but it's not. The key is that you can take a div and, using JavaScript, you can assign it a color, size and position. This means you have a small rectangular graphics component that you can use to create other shapes. In other words DHTML (Dynamic HTML) already has a primitive vector graphics ability. You can even work with bitmap graphics if you shrink the div down to the size of a single pixel, but this might just overload the layout engine of a typical browser. The solution is to make use of a quirk of the div that does allow you to show a triangular area of color. Once you have a triangle the rest follows and soon you have a full 3D pipeline and the classic teapot fully rendered using nothing but old fashioned HTML. It all raises the question of do we actually need HTML5, let alone canvas or WebGL?
This discussion was created for logged-in users only, but now has been archived. No new comments can be posted.

3D Teapot Classic Using Pure DHTM - who needs HTML5?

Comments Filter:

The trouble with a lot of self-made men is that they worship their creator.