Skip to content

Commit f887100

Browse files
committed
chore: Update built files for latest changes
1 parent a472c60 commit f887100

19 files changed

+128
-56
lines changed

packages/react-snowfall/lib/Snowfall.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { SnowfallCanvasConfig } from './SnowfallCanvas';
2+
import { SnowfallCanvasConfig } from './SnowfallCanvas.js';
33
export interface SnowfallProps extends Partial<SnowfallCanvasConfig> {
44
/**
55
* Any style properties that will be passed to the canvas element.

packages/react-snowfall/lib/Snowfall.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-snowfall/lib/Snowfall.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-snowfall/lib/SnowfallCanvas.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SnowflakeConfig } from './Snowflake';
1+
import { SnowflakeConfig } from './Snowflake.js';
22
export interface SnowfallCanvasConfig extends SnowflakeConfig {
33
/**
44
* The number of snowflakes to be rendered.

packages/react-snowfall/lib/SnowfallCanvas.js

+28-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-snowfall/lib/SnowfallCanvas.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-snowfall/lib/Snowflake.d.ts

+25-1
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,30 @@ declare class Snowflake {
8080
private updateTargetParams;
8181
update(offsetWidth: number, offsetHeight: number, framesPassed?: number): void;
8282
private getImageOffscreenCanvas;
83-
draw(ctx: CanvasRenderingContext2D): void;
83+
/**
84+
* Draws a circular snowflake to the canvas.
85+
*
86+
* This method should only be called if our config does not have images.
87+
*
88+
* This method assumes that a path has already been started on the canvas.
89+
* `ctx.beginPath()` should be called before calling this method.
90+
*
91+
* After calling this method, the fillStyle should be set to the snowflake's
92+
* color and `ctx.fill()` should be called to fill the snowflake.
93+
*
94+
* Calling `ctx.fill()` after multiple snowflakes have had `drawCircle` called
95+
* will render all of the snowflakes since the last call to `ctx.beginPath()`.
96+
*
97+
* @param ctx The canvas context to draw to
98+
*/
99+
drawCircle(ctx: CanvasRenderingContext2D): void;
100+
/**
101+
* Draws an image-based snowflake to the canvas.
102+
*
103+
* This method should only be called if our config has images.
104+
*
105+
* @param ctx The canvas context to draw to
106+
*/
107+
drawImage(ctx: CanvasRenderingContext2D): void;
84108
}
85109
export default Snowflake;

packages/react-snowfall/lib/Snowflake.js

+40-22
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)