This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var connect = require('connect'), | |
dnode = require('dnode'), | |
config = require('./config'), | |
iface = require('./interface'); | |
var server = connect.createServer(); | |
server.use(connect.static(__dirname+'/static')); | |
dnode(function(client) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Widget = new Class({ | |
initialize: function(options) { | |
this.options = Object.merge(this.options, options); | |
}, | |
members: {}, | |
options: {}, | |
update: function() { | |
this.destroy(); | |
this.render(); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new Element('div', { | |
styles: { | |
fontWeight: 'bold', | |
position:'fixed', | |
top:'0px', | |
right:'0px', | |
display:'none' | |
} | |
}).inject($$("body")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jxl.init(); | |
Jxl.loader.load({ | |
'animals': ['image', 'examples/assets/animals.png'] | |
}, function() { | |
Jxl.state = new Jxl.State({ | |
members: [ | |
new Jxl.Sprite({ | |
x: 150, | |
y: 320, | |
graphic: Jxl.loader.get('animals'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jxl.init(function() { | |
Jxl.loader.load({ | |
'animals': ['image', 'examples/assets/animals.png'] | |
}, function() { | |
Jxl.state = new GameState(); | |
}); | |
Jxl.start(); | |
}); | |
var GameState = new Class({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jxl.init(function() { | |
Jxl.loader.load({ | |
'animals': ['image', 'examples/assets/animals.png'] | |
}, function() { | |
Jxl.state = new GameState(); | |
}); | |
Jxl.start(); | |
}); | |
var GameState = new Class({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.clear(); | |
self.render(self.scene.skyScene, self.scene.skyCamera); | |
self.render(fakeScene, fakeCamera); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<!--[if lt IE 7 ]> <html class="no-js ie6" lang="en"> <![endif]--> | |
<!--[if IE 7 ]> <html class="no-js ie7" lang="en"> <![endif]--> | |
<!--[if IE 8 ]> <html class="no-js ie8" lang="en"> <![endif]--> | |
<!--[if (gte IE 9)|!(IE)]><!--> <html class="no-js" lang="en" xmlns:fb="http://www.facebook.com/2008/fbml" xmlns:og="http://ogp.me/ns#"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<meta name='description' content='{MetaDescription}'> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@joints = {} | |
for key, value of zig.Joint | |
material = new THREE.MeshBasicMaterial | |
color: "0xFF0000" | |
@joints[value] = new THREE.Mesh (new THREE.SphereGeometry 50, 10, 10), material | |
@joints[value].position.set 0,0,0 | |
@body.add @joints[value] | |
engage = zig.EngageUsersWithSkeleton 1 | |
engage.addEventListener "userengaged", (user) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
WIDTH = window.innerWidth | |
HEIGHT = window.innerHeight | |
VIEW_ANGLE = 45 | |
ASPECT = WIDTH/HEIGHT | |
NEAR = 0.1 | |
FAR = 100000 | |
renderer = new THREE.WebGLRenderer() |
OlderNewer