spiral-staircase
v0.0.1
Published
pattern resembling a spiral with squares
Downloads
4
Maintainers
Readme
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:
- Install GSAP:
npm install gsap
Create a TypeScript file (e.g., animationFunctions.ts) in your project.
Copy the provided TypeScript code into the animationFunctions.ts file.
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.