APE-Planet 0.1.2
- Extendeds APE.Client
Provides methods to synchronize data and UI elements between users. It keeps all data on the server in channel.properties to synchronize and update newly joined users.
Details
- Author
- Enrique Erne
- Current version
- 0.1.2
- GitHub
- eerne/APE-Planet
- Downloads
- 1081
- Category
- Realtime
- Tags
- Report
- GitHub Issues
How to use
Serverside
Register ape.planet.ss.js in scripts/main.ape.js
Ape.addEvent('init', function(){
include('framework/mootools.js');
include('framework/userslist.js');
include('examples/nickname.js');
include('ape.planet.ss.js');
});
Clientside
You need a running APE server and a configured APE Client!
Instantiate APE-Planet, just the same as APE-Client
var planet = new APE.Planet();
planet.load({
'channel': 'apePlanetDemo',
'connectOptions': {
'name': 'user' + $random(0, 1234567890)
}
});
Send/synchronize data with other users.
planet.addEvent('ready', function(){
planet.send('foo', {
'bar': 123,
'more': 'this is a string',
'also': [1, 2, 3, 'lala']
});
});
Receive data sent by other users.
planet.addEvent('ready', function(){
planet.addEvent('update', function(key, value){
if (key == 'foo') console.log(value);
});
});
Dependencies
- MooTools Core 1.2.x one example uses More Slider
- APE (Ajax Push Engine) only tested with 1.01dev
Discuss
A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.
Found a bug in this plugin? Please report it this repository's Github Issues.
blog comments powered by Disqus