Skip to content

Instantly share code, notes, and snippets.

@kdzwinel kdzwinel/main.js
Created Sep 24, 2015

Embed
What would you like to do?
stroke effect generator
var color = 'white';
var r = 1.4;//circle readius
var x = -0.15;//circle center
var y = 0.15;
function getXY(angle) {
return {
x: r * Math.cos(angle) + x,
y: r * Math.sin(angle) + y
};
}
var shadow = '';
for(var a = 0; a<360; a+=60) {
var p = getXY(a);
shadow += `drop-shadow(${p.x}px ${p.y}px 0 ${color}) `;
}
// ready to use with `filter:`
return shadow;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.