Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 570 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 570 Bytes

webgl.js

Manipulate WebGL in the same way as the DOM.

Usage

<!doctype html>
<html>
    <head>...</head>
    <body>
        <canvas></canvas>

    	<script src="webgl.js"></script>
    	<script>
    	    var element = WEBGL.createElement('plane');

    	    element.style.width = 100;
    	    element.style.height = 100;
    	    element.style.backgroundColor = 0xFFFFFF;
    	</script>
    </body>
</html>

Supported styles

  • left
  • top
  • width
  • height
  • background-color
  • background-image
  • scale
  • rotation