This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// because I just needed the function to run once, then assign it - | |
// I knew that I'd never need to run it manually again, so here I | |
// extended the Function prototype :) | |
Function.prototype.runReturn = function (scope) { | |
this.call(scope); | |
return this; | |
}; | |
// for example: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Canvas bootstrap</title> | |
<style>body { text-align: center; } canvas { border: 1px solid black; margin: auto;}</style> | |
<script src="raf.js"></script> | |
</head> | |
<body> | |
<canvas id="canvas" width="500" height="500"></canvas> | |
<script> | |
var helpers = { |