Browse files

Add more info to geo demo

  • Loading branch information...
1 parent c4d8767 commit a71ba5c716aca0f32cc76258ef58e1385f2345f0 David Humphrey committed Nov 11, 2011
Showing with 1 addition and 8 deletions.
  1. +1 −8 examples/processing-mobile/index.html
View
9 examples/processing-mobile/index.html
@@ -12,11 +12,6 @@
<p>New built-in types are added to Processing: motionX, motionY, motionZ. These are floats indicating the position of the device along the x, y, and z axis. Each has a value bewtween -1 and 1. Devices that do not support DeviceMotion events will have motionX == motionY == motionZ == 0 by default.</p>
<script type="text/processing" data-processing-target="sketch">
- // New values, motion{X|Y|Z} come from processing-mobile.js
- // and are floats (double) between -1 and 1, indicating position
- // along the axis of the device. If the device does not support
- // DeviceMotion events, 0 is used for all three.
-
int x, y;
float lastTheta = 0;
float easing = 0.1;
@@ -26,7 +21,7 @@
}
void locationChanged() {
- println(coords.latitude);
+ println(coords.longitude + ", " + coords.latitude);
}
void draw() {
@@ -54,8 +49,6 @@
int compassY = 100 * cos(radians(lastTheta));
ellipse(width/2 - compassX, height/2 - compassY, 20, 20);
}
-
-// println(motionX + ', ' + motionY + ', ' + motionZ);
}
</script>
<canvas id="sketch"></canvas>

0 comments on commit a71ba5c

Please sign in to comment.