@tari-project/tari-tower

0.0.42 • Public • Published

tari-tower

Source for the tower animation used in Tari Universe.

Installation

    npm i @tari-project/tari-tower

Usage

Initialise

import { loadTowerAnimation } from '@tari-project/tari-tower';

loadTowerAnimation();

Available methods:

name args description
loadTowerAnimation canvasId: string
offset?: number
initialise all the animation logic + canvas
removeTowerAnimation none stop the animation and remove canvas
setAnimationState id: 'start'|'stop'|'fail'|'sucess'|'sucess2'|'sucess3'
isReplay?: boolean
set the animation state
setAnimationProperties properties:{property:string; value:unknown}[] set properties (e.g colours in dark vs light mode)

Available values:

name description
animationStatus the state of the animation
animationStatusIndex the index of the animation state (useful as a trigger in dependencya array)

Contributing

Development

note: must be built first to be able to reference the lib locally

    npm ci
    npm run build
    npm run dev
  • make changes in the lib directory
  • export anything you want available in /lib/index.ts
  • update readme

Distribution

  • make sure your tari labs registry PAT is set up
  • bump version in package.json
  • build changes:
    npm run build
  • publish changes:
    npm publish

Readme

Keywords

none

Package Sidebar

Install

npm i @tari-project/tari-tower

Weekly Downloads

619

Version

0.0.42

License

ISC

Unpacked Size

2.55 MB

Total Files

20

Last publish

Collaborators

  • leet4tari
  • stringhandler
  • bot4tari-npmjs
  • shanimal08