Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
let ExitAnimation = (target, container)=>{
console.log('Exit animation...')
Anime.remove(target);
let animation = Anime.timeline()
animation.add({
targets: target,
opacity: [1, 0],
scale: [1, 0.9],
duration: 1000
})
}
setupAnime() {
if (this.options.loop) {
anime
.timeline({
targets: this.element,
loop: true,
duration: this.options.duration,
easing: 'linear'
})
.add({
translateY: [20, 0],
opacity: [0, 1],
endDelay: 700
})
.add({
translateY: [0, -20],
opacity: [1, 0]
})
} else {
enter: (e, done) => {
const path = animejs.path('#morphPath #reverse')
const timeline = animejs.timeline()
timeline
.add({
targets: e,
translateX: path('x'),
translateY: path('y'),
easing: 'linear',
duration: 1000,
complete: done
})
},
leave: (e, done) => {
setupAnime() {
if (this.options.loop) {
anime
.timeline({
targets: this.chars,
loop: true,
duration: this.options.duration,
easing: 'easeInOutQuad',
delay(el, i) {
return 60 * i
}
})
.add({
opacity: [0, 1],
endDelay: 700
})
.add({
opacity: [1, 0]
})
private animateMask(): IPromise {
const color = new Color({
r: 226,
g: 119,
b: 40,
a: 0,
});
const buildingColor = new Color({
r: 256,
g: 256,
b: 256,
});
const timeline = anime.timeline({
update: () => {
this.maskPolygon.symbol = maskPolygonSymbol(color);
this.app.scene.showMaskedBuildings(buildingColor);
},
}).add({
targets: [color, buildingColor],
r: 226,
g: 119,
b: 40,
a: 0.6,
duration: MASK_ANIMATION_DURATION / 2,
easing: "easeInOutCubic",
}).add({
targets: [color, buildingColor],
a: 0,
delay: 100,
beginQueue() {
this.animationQueue = anime.timeline({ autoplay: false });
}
const animateGridIn = gridContainer =>
anime
.timeline()
.add({
targets: gridContainer,
translateX: [-1000, 0],
opacity: createOpacityAnimationConfig(true),
easing
})
.add(
{
targets: gridContainer.querySelectorAll('.card'),
easing,
opacity: createOpacityAnimationConfig(true),
translateY: [-30, 0],
delay: anime.stagger(70)
},
'-=500'
this.$nextTick(() => {
this.openAnimation = anime.timeline({
autoplay: true,
loop: false,
duration: 200
});
this.openAnimation
.add({
targets: document.querySelector('#devise-admin-open'),
translateX: [0, 350],
easing: 'linear',
duration:100
})
.add({
targets: document.querySelector('#devise-admin'),
translateX: [-350, 0],
easing: 'easeOutQuad',