Skip to content

Commit

Permalink
#11 v1.2.4 add rollup esm and commonjs versions (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
reececomo authored Aug 4, 2024
1 parent e9405a0 commit b96f298
Show file tree
Hide file tree
Showing 19 changed files with 2,415 additions and 194 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"root": true,
"ignorePatterns": [
"dist"
],
"rules": {
"@typescript-eslint/indent": 0,
"@typescript-eslint/no-duplicate-enum-values": 0,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml → .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "lint"
name: "eslint"

on:
push:
Expand All @@ -11,7 +11,7 @@ on:
- "**/*.ts"

jobs:
lint:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "test"
name: "tests"

on:
push:
Expand All @@ -13,7 +13,7 @@ on:
- "**/*.ts"

jobs:
test:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.DS_Store
coverage
dist
node_modules
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# 🎬 pixijs-actions  [![NPM version](https://img.shields.io/npm/v/pixijs-actions.svg?style=flat-square)](https://www.npmjs.com/package/pixijs-actions) [![test ci/cd status badge](https://github.com/reececomo/pixijs-actions/actions/workflows/test.yml/badge.svg)](https://github.com/reececomo/pixijs-actions/actions/workflows/test.yml) [![lint ci/cd status badge](https://github.com/reececomo/pixijs-actions/actions/workflows/lint.yml/badge.svg)](https://github.com/reececomo/pixijs-actions/actions/workflows/lint.yml)
# 🎬 pixijs-actions  [![NPM version](https://img.shields.io/npm/v/pixijs-actions.svg?style=flat-square)](https://www.npmjs.com/package/pixijs-actions) [![Minzipped](https://badgen.net/bundlephobia/minzip/pixijs-actions@latest)](https://bundlephobia.com/package/pixijs-actions) [![Downloads](https://img.shields.io/npm/dt/pixijs-actions.svg)](https://www.npmjs.com/package/pixijs-actions) [![Tests](https://github.com/reececomo/pixijs-actions/actions/workflows/tests.yml/badge.svg)](https://github.com/reececomo/pixijs-actions/actions/workflows/tests.yml) [![License](https://badgen.net/npm/license/pixijs-actions)](https://github.com/reececomo/pixijs-actions/blob/main/LICENSE)

**PixiJS Actions** allows developers to easily configure complex, high-performance animations in [PixiJS](https://pixijs.com/).
⚡ Powerful, high-performance animations for PixiJS

| | |
| ------ | ------ |
| 🔮 Simple, declarative API | 🎬 Based on [Cocos2d](https://docs.cocos2d-x.org/cocos2d-x/v3/en/actions/getting_started.html)/[SKActions](https://developer.apple.com/documentation/spritekit/getting_started_with_actions) |
| 🚀 35+ [built-in actions](#action-initializers)<br/>30+ [smoothing options](#timing-modes) | 🔀 Reuseable, chainable & reversible |
| 🍃 Zero dependencies | ⌚ Full speed/pausing control |
| 🤏 `<4.5kb` minzipped | ✨ Supports PixiJS 8+, 7+, 6.3+ |

- 🚀 35+ [built-in actions](#action-initializers), 30+ [smoothing options](#timing-modes)
- 🔀 Reuseable, chainable & reversible actions
- ⌚ Comprehensive speed and pausing support
- ✨ Support for PixiJS v8, v7 and v6.3+
- 🎬 Inspired by actions in [Cocos2d-x](https://docs.cocos2d-x.org/cocos2d-x/v3/en/actions/getting_started.html), [LibGDX](https://libgdx.com/wiki/graphics/2d/scene2d/scene2d#actions), [SpriteKit](https://developer.apple.com/documentation/spritekit/getting_started_with_actions) & many more

## Sample Usage

Expand All @@ -25,7 +27,6 @@ const spinAndRemove = Action.sequence([
mySprite.run(spinAndRemove);
```


## Getting Started with PixiJS Actions

*Everything you need to quickly build beautiful animations.*
Expand All @@ -38,8 +39,10 @@ The core concepts are:
2. **Actions:** _Stateless, reusable recipes_ (e.g. animations, triggers, and more)
3. **TimingMode & speed:** _Controls for the speed & smoothness of actions and animations_

> [!TIP]
> _See [Timing Modes](#timing-modes) and [Manipulating Action Speed](#manipulating-action-speed) for more information._

## Installation

*Quick start guide.*
Expand All @@ -60,14 +63,14 @@ yarn add pixijs-actions --dev
import * as PIXI from 'pixi.js';
import { Action, registerPixiJSActionsMixin } from 'pixijs-actions';

// Register mixin for containers.
// register container mixin
registerPixiJSActionsMixin(PIXI.Container);

// Register `Action.tick(...)` with shared ticker
// register `Action.tick(...)` with shared ticker
Ticker.shared.add(ticker => Action.tick(ticker.elapsedMS));
```

**For PixiJS v6.3+ / v7+, that might look like:**
**PixiJS 7 / 6.3+:**

```ts
Ticker.shared.add((dt) => Action.tick(dt / 60));
Expand Down
2 changes: 2 additions & 0 deletions dist/index.cjs

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/index.cjs.map

Large diffs are not rendered by default.

Loading

0 comments on commit b96f298

Please sign in to comment.