Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var ol_featureAnimation_Explode = function(options) {
options = options||{};
ol_featureAnimation.call(this, options);
this.radius = options.radius || 50;
// Create gradient
var c = document.createElement('canvas');
c.width=c.height=10;
var ctx=c.getContext("2d");
var gradient = this.gradient = ctx.createRadialGradient( 0, 0, 0, 0,0, this.radius );
function mask(value, mask) {
return ((value * mask / 255) | 0);
}
var color = ol_color_asArray(options.color||"#ebb")
var r=color[0], g=color[1], b=color[2], a=color[3];
gradient.addColorStop(0, 'rgba(' + [mask(r, 255), mask(g, 255), mask(b, 255), a] + ')');