Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
ani-clipath
Advanced tools
For creating clip-path animation, Live Demo
<script src="https://unpkg.com/ani-clipath/dist/ani-clipath.min.js">
npm install --save ani-clipath
Need a container with width and height
<style>
.shapes{
width: 800px;
height: 600px;
}
</style>
...
<div class="shapes"></div>
Property | type | Description | default |
---|---|---|---|
el | String | DOM container | empty |
speed | Number | Animation speed of each triangle | 1500 |
delay | Number | Animation delay of each triangle | 30 |
autoplay | Number | Play automatically | true |
autoplayInterval | Number | Intervals of autoplay | 5000 |
shapes | Array | Data of shapes | Array |
Method | Description |
---|---|
next() | Switch to next shape |
previous() | Switch to previous shape |
<script>
var aniClipath = new AniClipath({
el: '.shapes',
speed: 1000,
delay: 30,
autoplay: true,
autoplayInterval: 5000,
shapes: data
})
setInterval(function(){
aniClipath.next()
},3000)
</script>
Data format of shapes
var data = [
[
// item of shapes
{
// color of item
c: '#1A1A1A',
// polygon position of item
p: [ { x: '50%', y: '30%' }, { x: '30%', y: '70%' }, { x: '70%', y: '70%' }]
}
],
[
{
c: '#E6E6E6',
p: [ { x: '50%', y: '70%' }, { x: '30%', y: '30%' }, { x: '70%', y: '30%' }]
}
]
]
FAQs
js to create css clip-path animation
The npm package ani-clipath receives a total of 0 weekly downloads. As such, ani-clipath popularity was classified as not popular.
We found that ani-clipath 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
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.