[whatwg] <model/>: A 3D Equivalent to <img/>
Brian Blakely
anewpage.media at gmail.com
Mon Nov 2 16:41:20 PST 2009
Spinning Cube Example
Integrating 3D Media Type with Current Techniques
-----------------------------------------------------------------------
(note: the only significant difference between this and
currently implemented technology is the media type
and additional CSS properties suited specifically for
3D presentation)
<style>
* Static presentation for cube
</style>
<model id="cube" src="cube.xml" />
<script>
var cube = document.getElementById('cube');
var rotDegree = 0;
var rotation = setInterval(function() {
cube.style.WebkitTransform = "rotateY("+rotDegree+"deg)";
cube.style.MozTransform = "rotateY("+rotDegree+"deg)";
rotDegree+=15;
if(rotDegree === 360) {
rotDegree = 0;
}
}, 20);
</script>
More information about the whatwg
mailing list