IvanK Lib: a WebGL based HTML5 engine

Posted 09:11AM on February 17 2012 by Pascal Rettig

IvanK Lib is a HTML5 Engine inspired by Flash (the tag line is actually "Like Flash, but faster" that uses the power of GPU accelerated WebGL to render 2d graphics on the screen.

Here's a sample of the code from the graphics demo on the site: 

 

<html>
<head>
     <script type="text/javascript" src="http://lib.ivank.net/ivank.js"></script>
     <script type="text/javascript">
          function Start()
          {
               var stage = new Stage("c");
               
               var sp = new Sprite();
               stage.addChild(sp);
               
               //	rectangles
               for(var i=0; i<50; i++)
               {
                    var color = Math.floor(Math.random()*0xffffff);
                    sp.graphics.beginFill(color, 0.6);
                    sp.graphics.drawRect(Math.random()*800, Math.random()*500, 70, 70);
               }
               
               //	line
               sp.graphics.lineStyle(2, 0xff0000);
               sp.graphics.moveTo(20, 20);
               sp.graphics.lineTo(400, 400);
          }
     </script>
</head>
<body onload="Start();"><canvas id="c"></canvas></body>
</html>

You can try a couple of projects made with the game below:

blog comments powered by Disqus