Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
renderer.onParticleCreated = particle => {
const w = particle.radius || 60;
const h = Proton.MathUtil.randomAToB(100, 200, "int");
particle.data.w = w;
particle.data.h = h;
};
renderer.onParticleCreated = particle => {
particle.data.begin = Proton.MathUtil.randomAToB(1, 120);
particle.data.tha = Proton.MathUtil.randomAToB(0, Math.PI * 2);
};
renderer.onParticleCreated = function (particle) {
particle.data.begin = Proton.MathUtil.randomAToB(1, 120);
particle.data.tha = Proton.MathUtil.randomAToB(0, Math.PI * 2);
};
renderer.onParticleCreated = particle => {
particle.data.begin = Proton.MathUtil.randomAToB(1, 120);
particle.data.tha = Proton.MathUtil.randomAToB(0, Math.PI * 2);
};
renderer.onParticleUpdate = particle => {
context.save();
context.globalAlpha = particle.alpha;
context.fillStyle = particle.color;
context.translate(particle.p.x, particle.p.y);
context.rotate(Proton.MathUtil.degreeTransform(particle.rotation));
context.translate(-particle.p.x, -particle.p.y);
context.beginPath();
drawPolygon(particle, particle.data.count);
context.closePath();
context.fill();
context.globalAlpha = 1;
context.restore();
};
renderer.onParticleCreated = particle => {
particle.data.count = Proton.MathUtil.randomAToB(3, 10, true);
};
renderer.onParticleCreated = function (particle) {
var w = particle.radius || 60;
var h = Proton.MathUtil.randomAToB(100, 200, "int");
particle.data.w = w;
particle.data.h = h;
};
renderer.onParticleUpdate = particle => {
const w = particle.data.w;
const h = particle.data.h;
context.save();
context.globalAlpha = particle.alpha;
context.fillStyle = particle.color;
context.translate(particle.p.x, particle.p.y);
context.rotate(Proton.MathUtil.degreeTransform(particle.rotation));
context.translate(-particle.p.x, -particle.p.y);
context.beginPath();
context.rect(particle.p.x - w / 2, particle.p.y - h / 2, w, h);
context.closePath();
context.fill();
context.globalAlpha = 1;
context.restore();
};