From 0d4bbee485a321bf157ed7122fdff980ab1bbcce Mon Sep 17 00:00:00 2001 From: tv Date: Tue, 26 Jul 2011 20:36:01 +0200 Subject: =?UTF-8?q?K=C3=BCbelwagen:=20initial=20import?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "K\303\274belwagen/sin.js" | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 "K\303\274belwagen/sin.js" (limited to 'Kübelwagen/sin.js') diff --git "a/K\303\274belwagen/sin.js" "b/K\303\274belwagen/sin.js" new file mode 100644 index 00000000..0f472715 --- /dev/null +++ "b/K\303\274belwagen/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); +})(); -- cgit v1.2.3