Security News
The Unpaid Backbone of Open Source: Solo Maintainers Face Increasing Security Demands
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
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
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.
Security News
A developer is accusing Tencent of violating the GPL by modifying a Python utility and changing its license to BSD, highlighting the importance of copyleft compliance.