Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Simple stand-alone animation / tweening library. Currently works in node or in browsers w/ browserify.
var Animation = require("anymation");
var objectToAnimate = {
x: 40
};
var animation = new Animation({
object: objectToAnimate,
duration: 3000 // 3 seconds
}.tween("x", 40, 500); // Smoothly interpolate objectToAnimate.x between 40 and 500 over the course of the animation
// Your render loop is up to you
function render() {
animation.update();
// Draw / update what you need to based on objectToAnimate's properties
// ...
requestAnimationFrame(render);
}
render();
Anymation doesn't provide any built-in easing functions except for the trivial linear default. Specifying an easing function from a library like eases is super-easy though.
var Animation = require("anymation");
var eases = require("eases");
new Animation({
object: someObject,
easing: eases.elasticOut
});
Constructor for an Animation. Calling it with the new operator is optional. The animation starts immediately.
Smoothly change a numeric property between the start and end values. Shortcut for Animation.addProp(propertyName, { tween: [from, to] }).
Cycle a property through a specified list of values (of any type) over the course of the animation. Shortcut for Animation.addProp(propertyName, { discreteValues: array }).
Animate a property using a callback function returning a value of any type. Shortcut for Animation.addProp(propertyName, { valueFn: fn});
Animates a property during the course of the animation, specifying all options, many of which can override the animation's default options.
propertyName (string) - Name of the property on the object
options (object):
Updates all animated properties. Generally no need to pass the timeNow parameter.
Returns false if the animation is done (if timeNow >= the animation start time + the animation duration) otherwise true
FAQs
Simple & easy animation/tweener
We found that anymation 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.