mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 12:28:50 +03:00
Fix minor lint problems
This commit is contained in:
parent
82b782cdb9
commit
77ce8a9e39
2 changed files with 18 additions and 17 deletions
|
@ -21,37 +21,37 @@ export type FireworksOptions = {
|
||||||
/**
|
/**
|
||||||
* max fireworks count
|
* max fireworks count
|
||||||
*/
|
*/
|
||||||
maxCount: number,
|
maxCount: number;
|
||||||
/**
|
/**
|
||||||
* gravity value that firework adds to shift from it's start position
|
* gravity value that firework adds to shift from it's start position
|
||||||
*/
|
*/
|
||||||
gravity: number,
|
gravity: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
type FireworksParticle = {
|
type FireworksParticle = {
|
||||||
/**
|
/**
|
||||||
* color
|
* color
|
||||||
*/
|
*/
|
||||||
color: string,
|
color: string;
|
||||||
/**
|
/**
|
||||||
* x,y are the point where the particle starts to position on canvas
|
* x,y are the point where the particle starts to position on canvas
|
||||||
*/
|
*/
|
||||||
x: number,
|
x: number;
|
||||||
y: number,
|
y: number;
|
||||||
/**
|
/**
|
||||||
* vx,vy shift values from x and y
|
* vx,vy shift values from x and y
|
||||||
*/
|
*/
|
||||||
vx: number,
|
vx: number;
|
||||||
vy: number,
|
vy: number;
|
||||||
/**
|
/**
|
||||||
* the alpha opacity of the firework particle (between 0 and 1, where 1 is opaque and 0 is invisible)
|
* the alpha opacity of the firework particle (between 0 and 1, where 1 is opaque and 0 is invisible)
|
||||||
*/
|
*/
|
||||||
alpha: number,
|
alpha: number;
|
||||||
/**
|
/**
|
||||||
* w,h width and height
|
* w,h width and height
|
||||||
*/
|
*/
|
||||||
w: number,
|
w: number;
|
||||||
h: number
|
h: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const DefaultOptions: FireworksOptions = {
|
export const DefaultOptions: FireworksOptions = {
|
||||||
|
@ -92,6 +92,7 @@ export default class Fireworks implements ICanvasEffect {
|
||||||
this.paint();
|
this.paint();
|
||||||
this.supportsAnimationFrame.call(window, this.updateWorld);
|
this.supportsAnimationFrame.call(window, this.updateWorld);
|
||||||
}
|
}
|
||||||
|
|
||||||
private update = () => {
|
private update = () => {
|
||||||
if (this.particles.length < this.options.maxCount) {
|
if (this.particles.length < this.options.maxCount) {
|
||||||
this.createFirework();
|
this.createFirework();
|
||||||
|
|
|
@ -47,33 +47,33 @@ type ConfettiOptions = {
|
||||||
/**
|
/**
|
||||||
* max confetti count
|
* max confetti count
|
||||||
*/
|
*/
|
||||||
maxCount: number,
|
maxCount: number;
|
||||||
/**
|
/**
|
||||||
* particle animation speed
|
* particle animation speed
|
||||||
*/
|
*/
|
||||||
speed: number,
|
speed: number;
|
||||||
/**
|
/**
|
||||||
* the confetti animation frame interval in milliseconds
|
* the confetti animation frame interval in milliseconds
|
||||||
*/
|
*/
|
||||||
frameInterval: number,
|
frameInterval: number;
|
||||||
/**
|
/**
|
||||||
* the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible)
|
* the alpha opacity of the confetti (between 0 and 1, where 1 is opaque and 0 is invisible)
|
||||||
*/
|
*/
|
||||||
alpha: number,
|
alpha: number;
|
||||||
/**
|
/**
|
||||||
* use gradient instead of solid particle color
|
* use gradient instead of solid particle color
|
||||||
*/
|
*/
|
||||||
gradient: boolean,
|
gradient: boolean;
|
||||||
};
|
};
|
||||||
type FireworksOptions = {
|
type FireworksOptions = {
|
||||||
/**
|
/**
|
||||||
* max fireworks count
|
* max fireworks count
|
||||||
*/
|
*/
|
||||||
maxCount: number,
|
maxCount: number;
|
||||||
/**
|
/**
|
||||||
* gravity value that firework adds to shift from it's start position
|
* gravity value that firework adds to shift from it's start position
|
||||||
*/
|
*/
|
||||||
gravity: number,
|
gravity: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue