svg.filter.js
svg.filter.js copied to clipboard
How to make source show under turbulence filter?
This is my current code:
const starGradient = draw.gradient("radial", add => {
add.stop(0.4, "gold");
add.stop(1, "gold", 0.2)
}).to(0,0).radius(1.5);
const star = draw.circle(100).fill(starGradient);
star.filterWith(add => {
let turb = add.turbulence(0.65, 3, 0, "stitch", "fractalNoise");
turb.composite(add.$source, "in");
});
This works as expected, creating a circle with a turbulence filter. However, the original color (gold) does not show underneath. Is there some way I could change the opacity of the turbulence filter to show some of the gold color?