From 88d3de710a96d280bd84cd54aa1f6abe3dbd1d77 Mon Sep 17 00:00:00 2001 From: nurjinn jafar Date: Fri, 18 Dec 2020 14:51:58 +0100 Subject: [PATCH] comments added --- src/effects/fireworks/index.ts | 19 +++++++++++++++++-- src/effects/index.ts | 6 ++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/src/effects/fireworks/index.ts b/src/effects/fireworks/index.ts index 7c84e31f1d..3cc209eda3 100644 --- a/src/effects/fireworks/index.ts +++ b/src/effects/fireworks/index.ts @@ -19,23 +19,38 @@ import ICanvasEffect from '../ICanvasEffect'; export type FireworksOptions = { /** - * the maximum number of the fireworks + * max fireworks count */ 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, probability: number, } type FireworksParticle = { + /** + * color + */ color: string, + /** + * x,y are the point where the particle starts to position on canvas + */ x: number, y: number, + /** + * vx,vy shift values from x and y + */ vx: number, vy: number, + /** + * the alpha opacity of the firework particle (between 0 and 1, where 1 is opaque and 0 is invisible) + */ alpha: number, + /** + * w,h width and height + */ w: number, h: number } diff --git a/src/effects/index.ts b/src/effects/index.ts index 27ed73622f..07aaa5e736 100644 --- a/src/effects/index.ts +++ b/src/effects/index.ts @@ -66,7 +66,13 @@ type ConfettiOptions = { gradient: boolean, }; type FireworksOptions = { + /** + * max fireworks count + */ maxCount: number, + /** + * gravity value that firework adds to shift from it's start position + */ gravity: number, probability: number, }