enchant.js
enchant.js ( GitHub: wise9 / enchant.js , License: MIT or GPL ) from Ubiquitous Entertainment Inc. is a new game engine that uses HTML5. It supports events, sprites, sounds, scenes, maps, and a whole host of other game-management classes. It also supports controls for touchscreen devices.
The game engine itself is designed around events, so from what I can tell it's mostly asynchronous. There's a plugin system for extending the engine itself, and some sample images are included which includes some font sprites.
…Mockjax ( GitHub: appendto / jquery-mockjax , License: MIT or GPL ) by Jonathan Sharp is a library for mocking jQuery's network requests. This can be useful when writing tests. It can mock the same data types that jQuery supports: text, HTML , JSON , JSONP , Script, and XML .
Mocking a request looks a lot like the ajax API :
$ . mockjax ({ url : '/restful/fortune' , responseTime : 750 , responseText : { status : 'success' …
kratko.js is licensed under MIT and is free for any kind of use (just leave attribution, please, and contribute if/what you can). The source is on github . So are unit tests. If you want to change, fix, or suggest something — I welcome any pull requests.
Use it to make your code better. Have fun!
[1] If you don't have "Refactoring" or "Clean Code" on a bookshelf, do yourself a favor and go get them now. This will be totally worth it. …
License Ender.js (the wrapper) is licensed under MIT - copyright 2011 Dustin Diaz For the individual submodules, see their respective licenses.
Building a custom platoon This is the part where it gets next-level future boss. We promise. Check out the Ender CLI video of this in action. The short explanation is that you can do this: $ ender -b qwery,bonzo,bean,underscore
Why all this?
Because in the browser - small, loosely coupled modules are the future, and large, tightly-bound …
…GitHub: jrburke / requirejs , License: new BSD and MIT ) by James Burke. RequireJS is very different to LABjs, with a large feature set:
Plugins
Server-side bundling and optimisation
Module support
Remote service dependencies ( JSONP )
Script order control (through a plugin)
Web Worker support
The basic usage looks a bit like LABjs:
<script src= "scripts/require.js" ></script> <script> require ([ 'script1.js' …
The Expander Plugin (License: MIT and GPL ) by Karl Swedberg can collapse part of an element's content and add ‘read more' links. Truncation is based on characters, and this can be changed along with many other things when invoking the plugin:
$ ( selector ). expander ({ slicePoint : 100 , preserveWords : true , expandText : 'read more' , expandPrefix : '… ' });
Marco Polo
Marco Polo (License: MIT , demo ) by Justin Stayton…
EventEmitter2 (License: MIT , npm: eventemitter2 ) by hij1nx is an alternative to EventEmitter that adds several unique features:
Namespaces
Wildcards
A many method, which is similar to once
Browser compatibility
Performance improvements over EventEmitter
Usage
Usage is basically the same as EventEmitter . The constructor takes a configuration object, where the namespace delimiter can be changed:
var server = EventEmitter2 ({ wildcard : true , …
…( GitHub: jeromeetienne / console4Worker , License: MIT ) by Jerome Etienne helps debug WebWorkers by making console.log (and other console methods) work inside workers in browsers that don't yet support this.
Some configuration within each worker is required first:
importScripts ( 'console4Worker-worker.js' ); console . log ( "console call made from inside a webworker" );
Then on the actual page:
// init the worker var worker = new Worker …
SockJS (License: MIT ) is a WebSocket emulation library that attempts to provide simple APIs for both server and clients, while remaining as close to the WebSocket API as possible. It's designed to work from behind restrictive corporate proxies, and browsers that don't support WebSocket. The project includes the server-side library, sockjs-node and client-side: sockjs-client .
Using sockets in the browser looks like this:
var sockjs = new …
…BoltJS ( GitHub: shaneosullivan / boltjs , License: MIT ) by Shane O'Sullivan (and Facebook apparently) is a client-side framework built on Javelin and CommonJS modules. It makes it possible to compose complex widgets from other widgets, then synchronise their data models. To do this, several core modules are used:
Builder - for managing views based on JSON data
Layout Views - includes horizontal and vertical view abstractions, …