The actorify module turns any duplex stream into an actor.
This example demonstrates how you can associate callbacks with an actor message. That is, you can use actorify
for remote method invocation.
actor.send('get user', name, callback);
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2014 Simon Friis Vindum <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2014 Simon Friis Vindum <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
var componentsList = {}; | |
function Component(name, func) { | |
componentsList[name] = func; | |
} | |
//Components are created like this: | |
Component('flying', function(o) { | |
o.flying = true; | |
}); |
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- fiddle is here http://jsfiddle.net/ondras/hYfN3 --> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | |
<title>Tiny Excel-like app in vanilla JS - jsFiddle demo by ondras</title> | |
<script type='text/javascript' src='/js/lib/dummy.js'></script> | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2014 James Woglom <wogloms.com> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
dist: | |
browserify \ | |
--external lodash \ | |
--external moment \ | |
--require ./index.js:robot \ | |
> bundle.js | |
cat umd-head.js bundle.js umd-tail.js > robot.js |
The actorify module turns any duplex stream into an actor.
This example demonstrates how you can associate callbacks with an actor message. That is, you can use actorify
for remote method invocation.
actor.send('get user', name, callback);
// Components | |
// ---------- | |
function KeyboardController() {} | |
function AIController() {} | |
function Position(x, y) { | |
this.x = x || 0; | |
this.y = y || 0; | |
} |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |