
Research
Security News
Malicious PyPI Package Exploits Deezer API for Coordinated Music Piracy
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
clip-rect
is an helper to create clip rect animation with Greensock.
Clip animations are nice, but sometimes they are hard to manage; clip-path: inset()
is not supported everywhere, and clip: rect()
is painful to handle and it doesn't supports percentage values.
This little helper aims to make rect animations easier w/Greensock GSAP.
npm install clip-rect
new ClipRect(HTMLElement[, options]);
It returns a GSAP TweenLite.to
call which can be used in GSAP timelines.
options
is an optional argument which can contain an object with different options:
Value | Default | Description |
---|---|---|
duration | 0.4 | Duration of the tween (in seconds) |
ease | TweenLite.defaultEase | GSAP easing function |
from | ClipRect.RIGHT | Direction of the start of the tweening |
to | ClipRect.LEFT | Direction of the start of the tweening |
clearProps | true | Whether remove the inline style after the animation |
reverse | false | Reverse the animation (for animateOut) |
var el = document.getElementById('box');
new ClipRect(el, {
from: ClipRect.RIGHT,
to: ClipRect.LEFT,
duration: 1,
reverse: true,
clearProps: false
});
var el = document.getElementById('box');
var tl = new TimelineLite();
tl.to(el, 1, { backgroundColor: 'blue' });
tl.add(new ClipRect(el, {
from: ClipRect.TOP,
to: ClipRect.BOTTOM,
duration: 1,
reverse: true,
clearProps: false
}));
tl.add(new ClipRect(el, {
from: ClipRect.LEFT,
to: ClipRect.RIGHT,
duration: 1
}));
tl.add(new ClipRect(el, {
from: ClipRect.TOP,
to: ClipRect.BOTTOM,
reverse: true,
clearProps: false
}));
FAQs
Helper to create clip rect animation with gsap
The npm package clip-rect receives a total of 3 weekly downloads. As such, clip-rect popularity was classified as not popular.
We found that clip-rect demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.
Security News
Newly introduced telemetry in devenv 1.4 sparked a backlash over privacy concerns, leading to the removal of its AI-powered feature after strong community pushback.