Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update demo links.

  • Loading branch information...
commit d15ae8b6c8142841dba8ecda86bbda99f3e431b3 1 parent 3e071ab
@Gozala authored
Showing with 10 additions and 4 deletions.
  1. +10 −4 demos/axis.html
View
14 demos/axis.html
@@ -1,7 +1,7 @@
<html>
<head>
<title>test</title>
- <script type="text/javascript" src="https://raw.github.com/Gozala/teleport/experimental/npm-1.x.x/teleport.js"></script>
+ <script type="text/javascript" src="http://jsm.io/jsm.js"></script>
<style>
head, body {
height: 100%;
@@ -38,13 +38,19 @@
<body>
<script type="text/javascript">
define('main', function(require, exports, module) {
- var streamer = require('https!raw.github.com/Gozala/streamer/master/streamer.js')
+ var streamer = require('https!raw.github.com/Gozala/streamer/master/core')
+
+ // Stream of mousemove events.
function mousemove(next, stop) {
document.addEventListener("mousemove", next, false);
}
- var axis = streamer.map(mousemove, function(element) {
+
+ // Stream of x, y pairs.
+ var axis = streamer.map(function(element) {
return [ element.clientX, element.clientY ]
- })
+ }, mousemove)
+
+
axis(function(position) {
var x = document.getElementById('x')
var y = document.getElementById('y')
Please sign in to comment.
Something went wrong with that request. Please try again.