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
// text coords | |
texts.push({x: Building.width/2, y:Building.length/2, obj: {name:Building.name}, attr:{'font-size':'15px'} }); | |
texts.push({x: Building.width/2, y:Building.length, obj: _.find(Building.surfaces, function(el){ return el.swa; }), attr:{'font-size':'10px'} }); | |
texts.push({x: 0, y:Building.length/2, obj: _.find(Building.surfaces, function(el){ return el.ewb; }), attr:{'font-size':'10px', rotate:-90} }); | |
texts.push({x: Building.width/2, y:0, obj: _.find(Building.surfaces, function(el){ return el.swc; }), attr:{'font-size':'10px'} }); | |
texts.push({x: Building.width, y:Building.length/2, obj: _.find(Building.surfaces, function(el){ return el.ewd; }), attr:{'font-size':'10px', rotate:90} }); | |
/// later used in |
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 express = require('express'), | |
app = express.createServer(), | |
io = require('socket.io'), | |
sio, | |
_ = require('underscore'); | |
// Configuration | |
app.configure(function() { | |
app.set('views', __dirname + '/views'); |
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
// 1. Write a class to support the following code: | |
function Person(name){ | |
this.name = name; | |
} | |
var thomas = new Person('Thomas'); | |
var amy = new Person('Amy'); | |
thomas.name // --> "Thomas" |
NewerOlder