Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>First example of the Game Framework</title>
</head>
<body>
</body>
</html>
 
var GF = function(){
    var mainLoop = function(){
        //main function, called each frame
        document.body.innerHTML = Math.random();
      
        // call the animation loop every 1/60th of second
        requestAnimationFrame(mainLoop);
    };
    var start = function(){
        requestAnimationFrame(mainLoop);
    };
    //our GameFramework returns a public API visible from outside its scope
    return {
        start: start
    };
};
var game = new GF();
game.start();
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
MichelBuffapro
0viewers