Skip to content

Commit

Permalink
bump + fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shanimal08 committed Jan 31, 2025
1 parent 2ce9e12 commit 672accf
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ jobs:
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_PUBLISH_TOKEN }}
package: dist
access: 'public'
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tari-project/tari-tower",
"version": "0.0.1",
"version": "0.0.2",
"private": false,
"description": "the tower animation used in Tari Universe",
"homepage": "https://github.com/tari-project/tari-tower#readme",
Expand All @@ -24,7 +24,7 @@
"default": "./dist/main.js"
}
},
"main": "lib/main.ts",
"main": "dist/main.js",
"files": [
"/dist"
],
Expand Down
35 changes: 35 additions & 0 deletions public/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# tari-tower

Source for the tower animation used in [_Tari Universe_](https://github.com/tari-project/universe).

### Installation

```bash
npm i @tari-project/tari-tower
```

## Usage

Initialise

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

loadTowerAnimation();
```

Available methods:

| name | args | description |
| ------------------------ | ------------------------------------------------------------------------------------------------ | -------------------------------------------------- |
| `loadTowerAnimation` | **canvasId**: `string` <br/> **offset?**: `number` | initialise all the animation logic + canvas |
| `removeTowerAnimation` | `none` | stop the animation and remove canvas |
| `setAnimationState` | **id**: `'start'\|'stop'\|'fail'\|'sucess'\|'sucess2'\|'sucess3'` <br/> **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) |

0 comments on commit 672accf

Please sign in to comment.