Skip to content

Commit

Permalink
chore: Update built files for latest changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cahilfoley committed Sep 6, 2024
1 parent a472c60 commit f887100
Show file tree
Hide file tree
Showing 19 changed files with 128 additions and 56 deletions.
2 changes: 1 addition & 1 deletion packages/react-snowfall/lib/Snowfall.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { SnowfallCanvasConfig } from './SnowfallCanvas';
import { SnowfallCanvasConfig } from './SnowfallCanvas.js';
export interface SnowfallProps extends Partial<SnowfallCanvasConfig> {
/**
* Any style properties that will be passed to the canvas element.
Expand Down
6 changes: 3 additions & 3 deletions packages/react-snowfall/lib/Snowfall.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react-snowfall/lib/Snowfall.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react-snowfall/lib/SnowfallCanvas.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SnowflakeConfig } from './Snowflake';
import { SnowflakeConfig } from './Snowflake.js';
export interface SnowfallCanvasConfig extends SnowflakeConfig {
/**
* The number of snowflakes to be rendered.
Expand Down
39 changes: 28 additions & 11 deletions packages/react-snowfall/lib/SnowfallCanvas.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react-snowfall/lib/SnowfallCanvas.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 25 additions & 1 deletion packages/react-snowfall/lib/Snowflake.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,30 @@ declare class Snowflake {
private updateTargetParams;
update(offsetWidth: number, offsetHeight: number, framesPassed?: number): void;
private getImageOffscreenCanvas;
draw(ctx: CanvasRenderingContext2D): void;
/**
* Draws a circular snowflake to the canvas.
*
* This method should only be called if our config does not have images.
*
* This method assumes that a path has already been started on the canvas.
* `ctx.beginPath()` should be called before calling this method.
*
* After calling this method, the fillStyle should be set to the snowflake's
* color and `ctx.fill()` should be called to fill the snowflake.
*
* Calling `ctx.fill()` after multiple snowflakes have had `drawCircle` called
* will render all of the snowflakes since the last call to `ctx.beginPath()`.
*
* @param ctx The canvas context to draw to
*/
drawCircle(ctx: CanvasRenderingContext2D): void;
/**
* Draws an image-based snowflake to the canvas.
*
* This method should only be called if our config has images.
*
* @param ctx The canvas context to draw to
*/
drawImage(ctx: CanvasRenderingContext2D): void;
}
export default Snowflake;
62 changes: 40 additions & 22 deletions packages/react-snowfall/lib/Snowflake.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f887100

Please sign in to comment.