laymur-animations 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Animator.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/Animator.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6077,7 +6077,7 @@ gsapWithCSS.core.Tween;
|
|
|
6077
6077
|
|
|
6078
6078
|
class Animator {
|
|
6079
6079
|
static appear(targets, options = {}) {
|
|
6080
|
-
const { ease = "back.out(1.7)", duration = 0.5, delay = 0, scale = 0.8, } = options;
|
|
6080
|
+
const { ease = "back.out(1.7)", duration = 0.5, delay = 0, scale = 0.8, opacity = 1, } = options;
|
|
6081
6081
|
const elements = Array.isArray(targets) ? targets : [targets];
|
|
6082
6082
|
const targetMicro = Object.assign(Object.assign(Object.assign({ ease,
|
|
6083
6083
|
duration }, (options.x && { x: 0 })), (options.y && { y: 0 })), (options.scale && { scaleX: 1, scaleY: 1 }));
|
|
@@ -6098,7 +6098,7 @@ class Animator {
|
|
|
6098
6098
|
const timeline = gsapWithCSS.timeline({ onComplete: resolve, delay });
|
|
6099
6099
|
for (const element of elements) {
|
|
6100
6100
|
timeline
|
|
6101
|
-
.to(element, { opacity
|
|
6101
|
+
.to(element, { opacity, ease: "power1.inOut", duration }, 0)
|
|
6102
6102
|
.to(element.micro, targetMicro, 0);
|
|
6103
6103
|
}
|
|
6104
6104
|
});
|