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
$stacheCachedTemplates = {} | |
# Over-ride stache gem, 1.0.0 | |
require 'mustache' | |
module Stache | |
module Mustache | |
class View < ::Mustache | |
# Redefine where Stache::View templates locate their partials |
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
comment update | |
username: "sassyann" | |
user_id: 38 | |
message: "commented on Which Movie Should I see" | |
votes update | |
pollID: | |
poll: {id: } | |
lastVoter{ | |
id: 123 |
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
comment update | |
username: "sassyann" | |
user_id: 38 | |
message: "commented on Which Movie Should I see" | |
votes update | |
pollID: 234 | |
caption: "Which Movie should I see" | |
imageURL: "..." | |
firstOption: |
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
# Example for how to remove an object: | |
obj = @world.addEntity( type: 'dynamic',radiusPixels: 30) # first, create the object | |
@world.removeEntity(obj) # now, remove it | |
# What "removeEntity" does: | |
removeEntity: (object) -> | |
@box2dWorld.DestroyBody(object.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
class window.GhostsAndMonstersGame | |
# to set up Easel-Box2d world | |
PIXELS_PER_METER = 30 | |
gravityX = 0 | |
gravityY = 10 | |
# game-specific | |
frameRate = 20 | |
forceMultiplier = 5 | |
constructor: (canvas, debugCanvas, statsCanvas) -> |