Cammie controls
This commit is contained in:
parent
a2c7746161
commit
80f1602a14
2 changed files with 30 additions and 9 deletions
|
@ -12,6 +12,7 @@ debounce = (func, wait, initial = () -> ) ->
|
|||
timeout = setTimeout later, wait
|
||||
initial.apply context, args if callNow
|
||||
|
||||
# Display controls when moving mouse
|
||||
$ "#cammie-body"
|
||||
.mousemove debounce () ->
|
||||
$ this
|
||||
|
@ -19,3 +20,13 @@ $ "#cammie-body"
|
|||
, 3000, () ->
|
||||
$ this
|
||||
.addClass 'display'
|
||||
|
||||
# Cammie controls
|
||||
$ '.ctrl'
|
||||
.click ->
|
||||
$context = $ this
|
||||
$.ajax "//kelder.zeus.ugent.be/webcam/cgi/ptdc.cgi",
|
||||
data:
|
||||
command: 'set_relative_pos'
|
||||
posX: $context.data 'x'
|
||||
posY: $context.data 'y'
|
|
@ -31,26 +31,36 @@ title: Cammie
|
|||
|
||||
<div id="cammie-body">
|
||||
<div class="cammie-ctrls top-row row">
|
||||
<div class="column ctrl left">
|
||||
<div class="column ctrl left" data-x="-10" data-y="10">
|
||||
diag up left
|
||||
</div>
|
||||
<div class="column ctrl center">
|
||||
<div class="column ctrl center" data-x="-10" data-y="0">
|
||||
up
|
||||
</div>
|
||||
<div class="column ctrl right">
|
||||
<div class="column ctrl right" data-x="10" data-y="10">
|
||||
diag up right
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row middle-row cammie-ctrls">
|
||||
<div class="column ctrl left">left</div>
|
||||
<div class="column ctrl left" data-x="-10" data-y="0">
|
||||
left
|
||||
</div>
|
||||
<div class="column center"> </div>
|
||||
<div class="column ctrl right">right</div>
|
||||
<div class="column ctrl right" data-x="10" data-y="0">
|
||||
right
|
||||
</div>
|
||||
</div>
|
||||
<div class="row bottom-row cammie-ctrls">
|
||||
<div class="column ctrl left">diag down left</div>
|
||||
<div class="column ctrl center">down</div>
|
||||
<div class="column ctrl right">diag down right</div>
|
||||
<div class="column ctrl left" data-x="-10" data-y="-10">
|
||||
diag down left
|
||||
</div>
|
||||
<div class="column ctrl center" data-x="0" data-y="-10">
|
||||
down
|
||||
</div>
|
||||
<div class="column ctrl right" data-x="10" data-y="-10">
|
||||
diag down right
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Hero footer: will stick at the bottom -->
|
||||
|
|
Loading…
Reference in a new issue