diff --git a/packages/react-snowfall/src/Snowflake.ts b/packages/react-snowfall/src/Snowflake.ts index 4169e9f..ee3fc40 100644 --- a/packages/react-snowfall/src/Snowflake.ts +++ b/packages/react-snowfall/src/Snowflake.ts @@ -1,5 +1,5 @@ import isEqual from 'react-fast-compare' -import { lerp, random, randomElement, TWO_PI } from './utils.js' +import { lerp, random, randomElement, twoPi } from './utils.js' export interface SnowflakeProps { /** The color of the snowflake, can be any valid CSS color. */ @@ -230,7 +230,7 @@ class Snowflake { */ public drawCircle(ctx: CanvasRenderingContext2D): void { ctx.moveTo(this.params.x, this.params.y) - ctx.arc(this.params.x, this.params.y, this.params.radius, 0, TWO_PI) + ctx.arc(this.params.x, this.params.y, this.params.radius, 0, twoPi) } /** diff --git a/packages/react-snowfall/src/utils.ts b/packages/react-snowfall/src/utils.ts index 6e6168d..b2e89bc 100644 --- a/packages/react-snowfall/src/utils.ts +++ b/packages/react-snowfall/src/utils.ts @@ -53,4 +53,4 @@ export function getSize(element?: HTMLElement | null) { * * This is so we can avoid calculating this value every time we draw a circle. */ -export const TWO_PI = Math.PI * 2 +export const twoPi = Math.PI * 2