Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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
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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.