0.0.1 • Published 12 days ago

spiral-staircase v0.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
12 days ago

Animation Functions

This repository contains TypeScript functions for animating a square spiral pattern using the GSAP (GreenSock Animation Platform) library.

Getting Started

To use these animation functions in your project, follow these steps:

  1. Install GSAP:

    npm install gsap

2) Create a TypeScript file (e.g., animationFunctions.ts) in your project.

3) Copy the provided TypeScript code into the animationFunctions.ts file.

4) Import the animateDrawing function from the animationFunctions.ts file and call it to start the animation.

Function Explanation

draw(x: number): void

This function is responsible for drawing a square spiral pattern. You can customize the drawing logic within this function.

animateDrawing(): void

This function animates the drawing of the square spiral pattern using GSAP. It creates a timeline for animations, calls the draw function multiple times to draw the pattern, and then starts the animation.

Dependencies

GSAP

GSAP (GreenSock Animation Platform) is a JavaScript library for creating high-performance animations.

0.0.1

12 days ago