summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'play.js')
-rw-r--r--play.js12
1 files changed, 12 insertions, 0 deletions
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)