pull/186/head
Cory LaViska 2020-08-11 18:47:02 -04:00
rodzic afc5e292c3
commit 63f6cfddf6
7 zmienionych plików z 160 dodań i 464 usunięć

Wyświetl plik

@ -2,34 +2,56 @@
[component-header:sl-animation]
Animate elements declaratively using the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API). Select from over 500 baked-in presets or roll your own with custom [keyframe formats](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats).
Animate elements declaratively with over 500 baked-in presets, or roll your own with custom keyframes. Powered by the [Web Animations API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API).
To animate an element, wrap it in `<sl-animation>` and set a `name` and `duration`.
```html preview
<div class="animation-overview">
<sl-animation
name="bounce"
easing="ease-in-out"
duration="2000"
delay="0"
>
<div style="width: 100px; height: 100px; background-color: var(--sl-color-primary-50);"></div>
<sl-animation name="bounce" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="jello" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="heart-beat" duration="2000"><div class="box"></div></sl-animation>
<sl-animation name="flip" duration="2000"><div class="box"></div></sl-animation>
</div>
<style>
.animation-overview .box {
display: inline-block;
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-50);
margin: 1.5rem;
}
</style>
```
?> The animation will only be applied to the first child element found in `<sl-animation>`.
## Examples
### Sandbox
This example shows all of the built-in animations and easings. You can also adjust the playback rate.
```html preview
<div class="animation-sandbox">
<sl-animation name="bounce" easing="ease-in-out" duration="2000">
<div class="box"></div>
</sl-animation>
<br>
<sl-select value="bounce"></sl-select>
<sl-range min="0" max="2" step=".5" value="1"></sl-range>
<sl-button circle><sl-icon name="pause"></sl-icon></sl-button>
<div class="controls">
<sl-select label="Animation" value="bounce"></sl-select>
<sl-select label="Easing" value="linear"></sl-select>
<sl-range min="0" max="2" step=".5" value="1"></sl-range>
</div>
</div>
<script>
const animation = document.querySelector('.animation-overview sl-animation');
const select = document.querySelector('.animation-overview sl-select');
const range = document.querySelector('.animation-overview sl-range');
const pauseButton = document.querySelector('.animation-overview sl-icon[name="pause"]').parentElement;
const pauseButtonIcon = pauseButton.querySelector('sl-icon');
const container = document.querySelector('.animation-sandbox');
const animation = container.querySelector('sl-animation');
const animationName = container.querySelector('.controls sl-select:nth-child(1)');
const easingName = container.querySelector('.controls sl-select:nth-child(2)');
const playbackRate = container.querySelector('sl-range');
animation.getAnimationNames().then(names => {
names.map(name => {
@ -37,24 +59,71 @@ Animate elements declaratively using the [Web Animations API](https://developer.
textContent: name,
value: name
});
select.appendChild(menuItem);
animationName.appendChild(menuItem);
});
});
select.addEventListener('slChange', () => animation.name = select.value);
animation.getEasingNames().then(names => {
names.map(name => {
const menuItem = Object.assign(document.createElement('sl-menu-item'), {
textContent: name,
value: name
});
easingName.appendChild(menuItem);
});
});
range.addEventListener('slChange', () => animation.playbackRate = range.value);
animation.addEventListener('slCancel', event => console.log(event));
animation.addEventListener('slFinish', event => console.log(event));
pauseButton.addEventListener('click', () => {
animation.pause = !animation.pause;
pauseButtonIcon.name = animation.pause ? 'play' : 'pause';
});
animationName.addEventListener('slChange', () => animation.name = animationName.value);
easingName.addEventListener('slChange', () => animation.easing = easingName.value);
playbackRate.addEventListener('slChange', () => animation.playbackRate = playbackRate.value);
playbackRate.tooltipFormatter = val => `Playback Rate = ${val}`;
</script>
<style>
.animation-sandbox .box {
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-50);
}
.animation-sandbox .controls {
max-width: 300px;
margin-top: 2rem;
}
.animation-sandbox .controls sl-select {
margin-bottom: 1rem;
}
</style>
```
## Examples
### Custom Keyframe Formats
Supply your own [keyframe formats](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Keyframe_Formats) to build custom animations.
```html preview
<div class="animation-keyframes">
<sl-animation easing="ease-in-out" duration="2000">
<div class="box"></div>
</sl-animation>
</div>
<script>
const animation = document.querySelector('.animation-keyframes sl-animation');
animation.keyframes = [
{ opacity: 1, easing: 'ease-out' },
{ opacity: 0.1, easing: 'ease-in' },
{ opacity: 0 }
];
</script>
<style>
.animation-keyframes .box {
width: 100px;
height: 100px;
background-color: var(--sl-color-primary-50);
}
</style>
```
[component-metadata:sl-animation]

4
src/components.d.ts vendored
Wyświetl plik

@ -1333,6 +1333,10 @@ declare namespace LocalJSX {
* Emitted when the animation finishes.
*/
"onSlFinish"?: (event: CustomEvent<any>) => void;
/**
* Emitted when the animation starts or restarts.
*/
"onSlStart"?: (event: CustomEvent<any>) => void;
/**
* Pauses the animation. The animation will resume when this prop is removed.
*/

Wyświetl plik

@ -15,6 +15,7 @@ import easings from './easings';
})
export class Animate {
animation: Animation;
hasStarted = false;
get element() {
const slot = this.host.shadowRoot.querySelector('slot');
@ -80,6 +81,11 @@ export class Animate {
@Watch('pause')
handlePauseChange() {
this.pause ? this.animation.pause() : this.animation.play();
if (!this.pause && !this.hasStarted) {
this.hasStarted = true;
this.slStart.emit();
}
}
@Watch('playbackRate')
@ -93,6 +99,9 @@ export class Animate {
/** Emitted when the animation finishes. */
@Event() slFinish: EventEmitter;
/** Emitted when the animation starts or restarts. */
@Event() slStart: EventEmitter;
connectedCallback() {
this.handleAnimationFinish = this.handleAnimationFinish.bind(this);
this.handleAnimationCancel = this.handleAnimationCancel.bind(this);
@ -135,6 +144,9 @@ export class Animate {
if (this.pause) {
this.animation.pause();
} else {
this.hasStarted = true;
this.slStart.emit();
}
}
@ -144,6 +156,7 @@ export class Animate {
this.animation.removeEventListener('cancel', this.handleAnimationCancel);
this.animation.removeEventListener('finish', this.handleAnimationFinish);
this.animation = null;
this.hasStarted = false;
}
}

Wyświetl plik

@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2020 Daniel Eden
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

Wyświetl plik

@ -1,3 +1,30 @@
/*
The animations herein were forked from Animate.css (https://animate.style/) and are subject to the following license.
---
The MIT License (MIT)
Copyright (c) 2020 Daniel Eden
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
export default {
bounce: [
{

Wyświetl plik

@ -1,9 +0,0 @@
FreeBSD License
COPYRIGHT 2017 ANA TRAVAS
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Wyświetl plik

@ -1,3 +1,18 @@
/*
The animations herein were forked from Animista (https://animista.net/) and are subject to the following license.
---
FreeBSD License
COPYRIGHT 2017 ANA TRAVAS
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
export default {
'scale-up-center': [
{
@ -7240,20 +7255,6 @@ export default {
opacity: 1
}
],
'text-focus-in': [
{
offset: 0,
easing: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
filter: 'blur(12px)',
opacity: 0
},
{
offset: 1,
easing: 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',
filter: 'blur(0px)',
opacity: 1
}
],
'focus-in-expand': [
{
offset: 0,
@ -7330,394 +7331,6 @@ export default {
opacity: 1
}
],
'text-shadow-drop-center': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '0 0 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-top': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '0 -6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-tr': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '6px -6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-right': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '6px 0 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-br': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '6px 6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-bottom': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '0 6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-bl': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '-6px 6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-left': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '-6px 0 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-drop-tl': [
{
offset: 0,
fillMode: 'both',
textShadow: '0 0 0 rgba(0, 0, 0, 0)'
},
{
offset: 1,
fillMode: 'both',
textShadow: '-6px -6px 18px rgba(0, 0, 0, 0.35)'
}
],
'text-shadow-pop-top': [
{
offset: 0,
fillMode: 'both',
transform: 'translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateY(8px)',
textShadow:
'0 -1px #555555, 0 -2px #555555, 0 -3px #555555, 0 -4px #555555, 0 -5px #555555, 0 -6px #555555, 0 -7px #555555, 0 -8px #555555'
}
],
'text-shadow-pop-tr': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0) translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(-8px) translateY(8px)',
textShadow:
'1px -1px #555555, 2px -2px #555555, 3px -3px #555555, 4px -4px #555555, 5px -5px #555555, 6px -6px #555555, 7px -7px #555555, 8px -8px #555555'
}
],
'text-shadow-pop-right': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(-8px)',
textShadow:
'1px 0 #555555, 2px 0 #555555, 3px 0 #555555, 4px 0 #555555, 5px 0 #555555, 6px 0 #555555, 7px 0 #555555, 8px 0 #555555'
}
],
'text-shadow-pop-br': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0) translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(-8px) translateY(-8px)',
textShadow:
'1px 1px #555555, 2px 2px #555555, 3px 3px #555555, 4px 4px #555555, 5px 5px #555555, 6px 6px #555555, 7px 7px #555555, 8px 8px #555555'
}
],
'text-shadow-pop-bottom': [
{
offset: 0,
fillMode: 'both',
transform: 'translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateY(-8px)',
textShadow:
'0 1px #555555, 0 2px #555555, 0 3px #555555, 0 4px #555555, 0 5px #555555, 0 6px #555555, 0 7px #555555, 0 8px #555555'
}
],
'text-shadow-pop-bl': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0) translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(8px) translateY(-8px)',
textShadow:
'-1px 1px #555555, -2px 2px #555555, -3px 3px #555555, -4px 4px #555555, -5px 5px #555555, -6px 6px #555555, -7px 7px #555555, -8px 8px #555555'
}
],
'text-shadow-pop-left': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(8px)',
textShadow:
'-1px 0 #555555, -2px 0 #555555, -3px 0 #555555, -4px 0 #555555, -5px 0 #555555, -6px 0 #555555, -7px 0 #555555, -8px 0 #555555'
}
],
'text-shadow-pop-tl': [
{
offset: 0,
fillMode: 'both',
transform: 'translateX(0) translateY(0)',
textShadow:
'0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555, 0 0 #555555'
},
{
offset: 1,
fillMode: 'both',
transform: 'translateX(8px) translateY(8px)',
textShadow:
'-1px -1px #555555, -2px -2px #555555, -3px -3px #555555, -4px -4px #555555, -5px -5px #555555, -6px -6px #555555, -7px -7px #555555, -8px -8px #555555'
}
],
'text-pop-up-top': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(-50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-tr': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0) translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(-50px) translateX(50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-right': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateX(50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-br': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0) translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(50px) translateX(50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-bottom': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-bl': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0) translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(50px) translateX(-50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-left': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateX(-50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'text-pop-up-tl': [
{
offset: 0,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(0) translateX(0)',
transformOrigin: '50% 50%',
textShadow: 'none'
},
{
offset: 1,
easing: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
fillMode: 'both',
transform: 'translateY(-50px) translateX(-50px)',
transformOrigin: '50% 50%',
textShadow:
'0 1px 0 #cccccc, 0 2px 0 #cccccc, 0 3px 0 #cccccc, 0 4px 0 #cccccc, 0 5px 0 #cccccc, 0 6px 0 #cccccc, 0 7px 0 #cccccc, 0 8px 0 #cccccc, 0 9px 0 #cccccc, 0 50px 30px rgba(0, 0, 0, 0.3)'
}
],
'vibrate-1': [
{
offset: 0,