Skip to content

JavaScript WebGL library.

License

Notifications You must be signed in to change notification settings

code-charity/webgl.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

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