Skip to content

Commit

Permalink
chore: fix code style error
Browse files Browse the repository at this point in the history
  • Loading branch information
Barrior committed Mar 21, 2024
1 parent 0da01bb commit a8d4764
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions src/snow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@ export default class Snow extends Shape<Options> {
* 创建单个雪花,包含大小、位置、速度等信息
*/
private createSnowflake(): IElement {
const {
maxR,
minR,
maxSpeed,
minSpeed,
spin,
spinMaxSpeed,
spinMinSpeed,
} = this.options
const { maxR, minR, maxSpeed, minSpeed, spin, spinMaxSpeed, spinMinSpeed } =
this.options
const r = randomInRange(maxR, minR)

return {
Expand Down Expand Up @@ -90,13 +83,8 @@ export default class Snow extends Shape<Options> {
*/
protected draw(): void {
const { canvasWidth, canvasHeight, isPaused } = this
const {
maxR,
swing,
swingInterval,
swingProbability,
duration,
} = this.options
const { maxR, swing, swingInterval, swingProbability, duration } =
this.options

this.clearCanvasAndSetGlobalAttrs()

Expand Down

0 comments on commit a8d4764

Please sign in to comment.