Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
setTimeout(() =>{
const updateAlpha = (v) => {
return item.handle.alpha = v;
}
tween({
from: item.handle.alpha,
to: item.enabled ? 1 : opacity,
duration: duration /*+ 1000*/,
ease: easing.backOut,
//flip: Infinity
}).start({
update: v => { updateAlpha(v) },
complete: () => {
if(index == this.driveTrayObjects.length - 1){
//this.initialized = true;
// Let the parent know class is ready.
this.events.next({name: "Ready"});
}
}
});
}, delay)
const tweenUp = (track, duration = 500, yFrom = 100) => ({
track,
duration,
from: { y: yFrom, opacity: 0 },
to: { y: 0, opacity: 1 },
ease: { y: easing.backOut, opacity: easing.linear }
});
};
var addActionDelay = function (delay$$1, transition) {
if (delay$$1 === void 0) {
delay$$1 = 0;
}
return chain(delay(delay$$1), transition);
};
var animationLookup = /*#__PURE__*/new Map([['tween', tween], ['spring', spring], ['decay', decay], ['keyframes', keyframes], ['physics', physics]]);
var easeIn = easing.easeIn,
easeOut = easing.easeOut,
easeInOut = easing.easeInOut,
circIn = easing.circIn,
circOut = easing.circOut,
circInOut = easing.circInOut,
backIn = easing.backIn,
backOut = easing.backOut,
backInOut = easing.backInOut,
anticipate = easing.anticipate;
var easingLookup = /*#__PURE__*/new Map([['easeIn', easeIn], ['easeOut', easeOut], ['easeInOut', easeInOut], ['circIn', circIn], ['circOut', circOut], ['circInOut', circInOut], ['backIn', backIn], ['backOut', backOut], ['backInOut', backInOut], ['anticipate', anticipate]]);
var getAction = function (v, _a, _b) {
var from = _b.from,
to = _b.to,
velocity = _b.velocity;
var _c = _a.type,
type = _c === void 0 ? 'tween' : _c,
ease = _a.ease,
def = __rest(_a, ["type", "ease"]);
invariant(animationLookup.has(type), "Invalid transition type '" + type + "'. Valid transition types are: tween, spring, decay, physics and keyframes.");
if (type === 'tween') {
var typeOfEase = typeof ease;
if (typeOfEase !== 'function') {
if (typeOfEase === 'string') {
transition: ({ from, to }) =>
tween({ from, to, ease: easing.backOut, duration: 800 })
},
startAnimation() {
this.animation = tween({
to: { x: 300, rotate: 180 },
duration: 1200,
ease: easing.backOut,
flip: Infinity
}).start(v => this.boxStyler.set(v));
}
animate: (_, onFinish) => {
tween({ from: 0, to: { x: 300 }, duration: 1000, ease: easing.backOut }).start({
complete: () => onFinish(),
update: elementStyler.current.set,
});
},
},