Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
A javascript library for creating CSS3 animation.
<script src="./src/amo.js"></script>
//1. The node need to be animated
var node = document.getElementById('animate-node');
//2. Creating a css animation
var fadeAnim = Amo.keyframes({
'opacity': 0
}, {
'opacity': 1
}).animate({
//help: http://www.w3schools.com/css/css3_animations.asp
mode: 'forwards',
duration: 1000,
easing: 'ease',
time: 1,
delay: 1000,
direction: 'alternate'
});
//3. Running a css animation
fadeAnim.run(node, function() {
console.log('over');
});
Amo.keyframe is as same as css @keyframe
/* css */
@keyframes mymove {
from {top:0px;}
to {top:200px;}
}
==>
/* amo.js */
Amo.keyframes({
top: '0px'
}, {
top: '200px'
});
/* css */
@keyframes mymove {
0% {top:0px;}
50% {top:100px;}
100% {top:20px;}
}
==>
/* amo.js */
Amo.keyframes({
0: {
top: '0px'
},
50: {
top: '100px'
},
100: {
top: '200px'
}
});
you can create animate depend on keyframe
/* css */
@keyframes mymove {
0% {top:0px;}
50% {top:100px;}
100% {top:20px;}
}
#test {
animation: mymove 5s linear 2s infinite alternate;
}
=>
/* amo.js */
var mymove = Amo.keyframes({
0: {
top: '0px'
},
50: {
top: '100px'
},
100: {
top: '200px'
}
});
var myAnim = mymove.animate({
duration: 5000,
easing: 'linear',
delay: 2000,
time: -1,
direction: 'alternate'
});
//$('#test') => ok
//document.getElementById('test') => ok
myAnim.run($('#test'), function() {
console.log('animation over');
});
var myAnimIns = myAnim.run($('#test'), function() {
console.log('animation over');
});
//you can stop the animation
myAnimIns.stop();
//you can start the animation too
myAnimIns.start();
//reset the animation
myAnimIns.reset();
You do not need care about the css animation's class and keyframes's style, focusing on animation is the only thing you need to do.
FAQs
A javascript library for creating CSS3 animation
The npm package amo.js receives a total of 1 weekly downloads. As such, amo.js popularity was classified as not popular.
We found that amo.js 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.