comments added
This commit is contained in:
parent
380b729692
commit
88d3de710a
2 changed files with 23 additions and 2 deletions
|
@ -19,23 +19,38 @@ import ICanvasEffect from '../ICanvasEffect';
|
||||||
|
|
||||||
export type FireworksOptions = {
|
export type FireworksOptions = {
|
||||||
/**
|
/**
|
||||||
* the maximum number of the fireworks
|
* max fireworks count
|
||||||
*/
|
*/
|
||||||
maxCount: number,
|
maxCount: number,
|
||||||
/**
|
/**
|
||||||
* the alpha opacity of the fireworks (between 0 and 1, where 1 is opaque and 0 is invisible)
|
* gravity value that firework adds to shift from it's start position
|
||||||
*/
|
*/
|
||||||
gravity: number,
|
gravity: number,
|
||||||
probability: number,
|
probability: number,
|
||||||
}
|
}
|
||||||
|
|
||||||
type FireworksParticle = {
|
type FireworksParticle = {
|
||||||
|
/**
|
||||||
|
* color
|
||||||
|
*/
|
||||||
color: string,
|
color: string,
|
||||||
|
/**
|
||||||
|
* 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: 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)
|
||||||
|
*/
|
||||||
alpha: number,
|
alpha: number,
|
||||||
|
/**
|
||||||
|
* w,h width and height
|
||||||
|
*/
|
||||||
w: number,
|
w: number,
|
||||||
h: number
|
h: number
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,13 @@ type ConfettiOptions = {
|
||||||
gradient: boolean,
|
gradient: boolean,
|
||||||
};
|
};
|
||||||
type FireworksOptions = {
|
type FireworksOptions = {
|
||||||
|
/**
|
||||||
|
* max fireworks count
|
||||||
|
*/
|
||||||
maxCount: number,
|
maxCount: number,
|
||||||
|
/**
|
||||||
|
* gravity value that firework adds to shift from it's start position
|
||||||
|
*/
|
||||||
gravity: number,
|
gravity: number,
|
||||||
probability: number,
|
probability: number,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue