Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Think of GSAP as the Swiss Army Knife of animation...but better. It animates anything JavaScript can touch (CSS properties, canvas library objects, SVG, generic objects, whatever) and it solves lots of browser inconsistencies, all with blazing speed (up t
GSAP (GreenSock Animation Platform) is a powerful JavaScript library for creating high-performance animations that work in all major browsers. It is widely used for animating web elements, SVGs, and more, providing a rich set of features for developers to create complex animations with ease.
Basic Tweening
This feature allows you to animate any property of an element over a specified duration. In this example, the element with the class 'element' will move 100 pixels to the right over 1 second.
gsap.to('.element', { duration: 1, x: 100 });
Timeline Animations
Timelines allow you to sequence multiple animations. In this example, 'element1' will move 100 pixels to the right, and then 'element2' will move 100 pixels down, each over 1 second.
const tl = gsap.timeline();
tl.to('.element1', { duration: 1, x: 100 })
.to('.element2', { duration: 1, y: 100 });
Stagger Animations
Staggering allows you to animate multiple elements with a delay between each start. In this example, each element with the class 'elements' will move 100 pixels to the right, starting 0.2 seconds after the previous one.
gsap.to('.elements', { duration: 1, x: 100, stagger: 0.2 });
ScrollTrigger
ScrollTrigger allows you to create animations that are triggered by scrolling. In this example, the element with the class 'element' will move 100 pixels to the right when it enters the viewport.
gsap.registerPlugin(ScrollTrigger);
gsap.to('.element', { scrollTrigger: '.element', x: 100 });
Anime.js is a lightweight JavaScript animation library with a simple, yet powerful API. It supports CSS properties, SVG, DOM attributes, and JavaScript Objects. Compared to GSAP, Anime.js is more lightweight but may lack some of the advanced features and plugins that GSAP offers.
Velocity is an animation engine with the same API as jQuery's $.animate(). It works with and without jQuery. Velocity is known for its performance and ease of use, but it doesn't offer as many features and plugins as GSAP.
Popmotion is a functional, flexible JavaScript animation library. It provides a range of tools for creating animations and interactions. While it is highly modular and flexible, it may require more setup and understanding compared to GSAP's more straightforward API.
GSAP is a suite of tools for scripted, high-performance HTML5 animations that work in all major browsers. No other library delivers such advanced sequencing, API efficiency, and tight control while solving real-world problems that animators face. Stop wrestling with cumbersome CSS animations, stuttery jQuery.animate() calls, or a system that limits your creativity. GSAP can animate any numeric property of any JS object, not just CSS properties.
Think of GSAP as the Swiss Army Knife of animation...but better. It animates anything JavaScript can touch (CSS properties, canvas library objects, SVG, generic objects, whatever) and it solves countless browser inconsistencies, all with blazing speed (up to 20x faster than jQuery), including automatic GPU-acceleration of transforms. See the "Why GSAP?" article for details. Most other libraries only animate CSS properties. Plus, their sequencing abilities and runtime controls pale by comparison. Simply put, GSAP is the most flexible high-performance animation library on the planet, which is probably why Google recommends it for JS-based animations. And unlike monolithic frameworks that dictate how you structure your apps, GSAP simply affects the animation layer; sprinkle it wherever you want.
This is the public repository for GreenSock's JavaScript tools like GSAP and Draggable. "GSAP" describes all of the animation-related tools which include TweenLite, TweenMax, TimelineLite, TimelineMax, various plugins (like CSSPlugin for animating CSS properties of DOM elements), extra easing functions, etc.
Head over to the GreenSock forums which are an excellent resource for learning and getting your questions answered. Report any bugs there too please (it's also fine to file an issue on Github if you prefer)
Copyright (c) 2008-2015, GreenSock. All rights reserved.
License: GreenSock's standard "no charge" license can be viewed at http://greensock.com/standard-license. Club GreenSock members are granted additional rights, as described in the license that comes with their membership. For more information about licensing, see http://greensock.com/licensing/.
FAQs
GSAP is a framework-agnostic JavaScript animation library that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths,
The npm package gsap receives a total of 445,089 weekly downloads. As such, gsap popularity was classified as popular.
We found that gsap demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.