spiral-staircase
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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
    
  1. Create a TypeScript file (e.g., animationFunctions.ts) in your project.

  2. Copy the provided TypeScript code into the animationFunctions.ts file.

  3. 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.

Package Sidebar

Install

npm i spiral-staircase

Weekly Downloads

0

Version

0.0.1

License

ISC

Unpacked Size

3.48 kB

Total Files

6

Last publish

Collaborators

  • chandrika36