diff options
author | tv <tv@shackspace.de> | 2014-12-20 23:50:33 +0100 |
---|---|---|
committer | tv <tv@shackspace.de> | 2014-12-20 23:50:33 +0100 |
commit | 5c7c7d242fa943ec7a96de4a43efa3fc6b1ef77a (patch) | |
tree | b0207325db6b66a9e346956e3793224022be0900 /K_belwagen/sin.js | |
parent | b7ea9e035a729186afb57894891d3bdec43aa9ae (diff) |
nixify Kübelwagen (without UTF-8 :/)
Diffstat (limited to 'K_belwagen/sin.js')
-rw-r--r-- | K_belwagen/sin.js | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/K_belwagen/sin.js b/K_belwagen/sin.js new file mode 100644 index 00000000..0f472715 --- /dev/null +++ b/K_belwagen/sin.js @@ -0,0 +1,37 @@ + + + +var x = 3000; + +var t = 0; +var i = 0; +var j = 0.00001; +var t0 = new Date(); +(function rec () { + + var t1 = new Date(); + console.error('dt = ' + (t1 - t0)); + t0 = t1; + + if (x === 3000) { + x = 1000; + } else { + x = 3000; + }; + + console.log('2000 50 0 50 2000 50 0 50 ' + x + ' 100 0 0'); + return setTimeout(rec, 1000); + + i += 0.01; + console.log((2000 + Math.sin(i) * 1000 | 0) + ' 0'); + return setTimeout(rec, 1); + + var f = Math.abs(1000 + 500 * Math.tan( t )); + var scale = 1; + + console.log(((f * scale)|0) + ' 0'); + + t++; + setTimeout(rec, 100); + //process.nextTick(rec); +})(); |