m0sk1t::engine - m0sk1t/m0sk1t-engine GitHub Wiki

Hello there! This is a yet another flexible library for HTML5 <canvas> tag manipilation (which also containing framework for fast development of 2d platformer games) named m0sk1t::engine.

###Description:### m0sk1t::engine consist of one base class named core and several helper classes. The util class containing some utils for common actions.

#####me.util.$()##### It's just a wrapper for querySelector() named $() as in jQuery library. Needed to provide fast finding DOM elements by ID, ClassName or TagName. So, this is an using example:

var canvas = me.util.$('.gameCAnvas'); //canvas is now equal the first <canvas> element with ClassName equal gameCanvas

#####me.util.rAF()##### Crossbrowser wrapper for requestAnimationFrame(aCallback) function. Needed for provide recursive call of updating and drawing functions. So, this is an using example:

var gameLoop = function() {
	updateGame();
	drawSprite();
	me.util.rAF(gameLoop());
}
gameLoop();
⚠️ **GitHub.com Fallback** ⚠️