From 33d9c57fe405b567295bb29fff22585cf6465dd2 Mon Sep 17 00:00:00 2001 From: Josh Beckwith <1918844+positlabs@users.noreply.github.com> Date: Mon, 9 Dec 2019 11:40:33 -0500 Subject: [PATCH] Add module exports This allows this file to be required into the main script file, since we have that capability now --- spark-tween.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spark-tween.js b/spark-tween.js index bd94a2b..7ca391b 100644 --- a/spark-tween.js +++ b/spark-tween.js @@ -77,10 +77,11 @@ function Tween(startVal, endVal, duration, loopCount, mirror, ease, completeCall return Animation.animate(driver, sampler); } - +module.exports = {Tween, Ease} //EXAMPLE USAGE /* + const {Tween, Ease} = require('./spark-tween') anim.transform.rotationZ = Tween(-.1, .1, 6, 10000, true, Ease.LINEAR, null); anim.transform.y = Tween(-27, 8, 8, 1, true, Ease.LINEAR, OnRaiseUpComplete); anim.transform.x = Tween(-17, -15, 4, 1000, true, Ease.LINEAR, null);