-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathapp.coffee
47 lines (34 loc) · 1.08 KB
/
app.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Pixelpulse controller
# (C) 2011 Nonolith Labs
# Author: Kevin Mehall <[email protected]>
# Distributed under the terms of the GNU GPLv3
pixelpulse = (window.pixelpulse ?= {})
pixelpulse.captureState = new Event()
pixelpulse.layoutChanged = new Event()
pixelpulse.triggeringChanged = new Event()
pixelpulse.channelviews = []
$(document).ready ->
session.parseFlags()
if flags.perfstat
$('#perfstat').show()
if flags.demohint
$('#info').show()
if not flags.webgl
window.nowebgl=true
session
app: "Pixelpulse"
model: "com.nonolithlabs.cee"
updateMessage: "You're missing <a href='http://www.nonolithlabs.com/blog/2012/09-19-software-features'>new features</a>"
reset: ->
pixelpulse.triggering = false
$(document.body).removeClass('triggering')
pixelpulse.destroyView()
updateDevsMenu: (l) ->
$('#switchDev').toggle(l.length>1)
initDevice: (dev) ->
dev.captureStateChanged.listen (s) ->
pixelpulse.captureState.notify(s)
deviceChanged: (dev) ->
pixelpulse.initView(dev)
pixelpulse.captureState.notify(dev.captureState)
deviceRemoved: ->