From 6f9278fe81c55978feca8e073618898f4433a98c Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Mon, 7 Mar 2022 13:14:16 +0100 Subject: Initial commit --- play.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 play.js (limited to 'play.js') diff --git a/play.js b/play.js new file mode 100644 index 0000000..70341ae --- /dev/null +++ b/play.js @@ -0,0 +1,12 @@ +const badapple = require("./badapple.json") + +const iv = setInterval(_ => { + const frame = badapple.frames.shift() + + if (frame) { + console.clear() + console.log(frame) + } else + clearInterval(iv) + +}, 1000 / badapple.fps) -- cgit v1.2.3