fc
AKA: fullscreen canvas
Install
npm install fc
or use the fc.min.js
file.
Use
var ctx = ; // put the canvas into a "render only when dirty" mode ctx; // to schedule a new frame ctx; // subsequent calls to dirty in the same tick will have no effect ctx; // to restart the auto-render mode ctxstart; // to fill the entire canvas with a color ctxclear'red'; // last but not least, to access the canvas ctxcanvas // only render when dirtied var ctx = ; // get the current 3x3 transformation matrix (2d only) var ctx = // transform a point from screen to world space var ctx =
note: fc will render one time even if autorun
is set false. During this initial render deltaTime
will be 0
License
MIT (see license.txt)