Skip to content

Commit

Permalink
update animate api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
g-harel committed Oct 1, 2023
1 parent 318bc74 commit 9f45069
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ export interface CanvasCustomKeyframe extends Keyframe {
export interface Animation {
// Renders the current state of the animation.
renderFrame: () => Path2D;
// Renders the current state of the animation as points.
renderPoints: () => Point[];
// Immediately begin animating through the given keyframes.
// Non-rendered keyframes from previous transitions are cancelled.
transition: (...keyframes: (CanvasKeyframe | CanvasCustomKeyframe)[]) => void;
Expand All @@ -245,15 +247,9 @@ export const canvasPath: (timestampProvider?: TimestampProvider) => Animation;
export interface WiggleOptions {
// Speed of the wiggle movement. Higher is faster.
speed: number;
// Delay before the first wiggle frame.
// Default: 0
initialDelay?: number;
// Length of the transition from the current state to the wiggle blob.
// Default: 0
initialTransition?: number;
// Interpolation function.
// Default: linear
initialTimingFunction?: Keyframe["timingFunction"];
}
// Preset animation that produces natural-looking random movement.
// The wiggle animation will continue indefinitely until the next transition.
Expand Down

0 comments on commit 9f45069

Please sign in to comment.