Generate Random SVG Waves Using JavaScript – wavery
Based on bezier-spline-js library to draw smooth curves passing through given points.
Load the core JavaScript wavery.min.js from the dist folder.
<script src="./dist/wavery.min.js"></script>
Create a container in which you’d like to draw the waves.
<div id="svg"></div>
Create a new Wavery instance and pass the configuration options as follows:
var wavery = new Wavery({
width: 800,
height: 600,
segmentCount: 20,
layerCount: 10,
variance: 0.75, // Decimal value between 0 and 1
strokeWidth: 0,
strokeColor: "none",
gradientColors: [
{
colorValue: "yellow",
position: 0
},
{
colorValue: "red",
position: 0.5
},
{
colorValue: "navy",
position: 1
}
]
}); Draw the waves in the container element you just created.
var svg = wavery.generateSvg();
var element = document.getElementById("svg");
element.appendChild(svg); v1.0.8 (02/22/2026)
The post Generate Random SVG Waves Using JavaScript – wavery appeared first on CSS Script.
ABILENE, Texas (KTAB/KRBC) – Texas State Technical College (TSTC) in Abilene is now offering specialized…
ABILENE, Texas (KTAB/KRBC) - An arrest has been made in connection with a north Abilene…
BIG COUNTRY, Texas (KTAB/KRBC) - In this episode of Carter and Kat’s Weather Chat, our…
ABILENE, Texas (KTAB/KRBC) - One person was injured in an accident in north Abilene on…
Nintendo has advised fans to ensure they have Resident Evil Requiem's day one patch installed…
The Marathon Server Slam is off to a quick start, with impressive player numbers on…
This website uses cookies.