Skip to content

Commit

Permalink
Update Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
kefniark committed Jan 24, 2022
1 parent 7a5df3a commit f179897
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 20 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Fatina

Small & Light tweening library for **Games** / **Web**
Lighweight Tweening Library for **Games** / **Web**

- **Website**: [Here](https://kefniark.github.io/Fatina/)
- **API**: [Here](https://kefniark.github.io/Fatina/api/basic/)
Expand Down Expand Up @@ -79,26 +79,20 @@ Fatina.tween(sprite).to({ x: 12, y: 25 }, 0.5).start()
If you want to take a look at the code or help, it's quite easy to get started

```sh
npm install
npm run dev
yarn
yarn dev
```

This will start a server on http://localhost:8080/ where you can test few samples with the current version

### Tests

When you are done with your change, just make sure to run tests `npm run test`
When you are done with your change, just make sure to run tests `yarn test`

### Other

To make a build (generated in `build/`)

```sh
npm run build
```

To generate the **API docs** (generated in `build/docs/`)

```sh
npm run docs
yarn build
```
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fatina",
"description": "Small & Light tweening library for web / games",
"version": "3.1.2",
"description": "Lighweight Tweening Library for web / games",
"version": "3.1.3",
"homepage": "https://kefniark.github.io/Fatina/",
"main": "dist/fatina.cjs.js",
"module": "./dist/fatina.esm.js",
Expand Down Expand Up @@ -33,6 +33,9 @@
"email": "kef1@free.fr"
},
"scripts": {
"dev": "run-p dev:*",
"dev:esbuild": "esbuild src/index.ts --bundle --minify --charset=utf8 --platform=browser --format=esm --outfile=dist/fatina.esm.js --watch",
"dev:http": "http-server . -p 1809",
"build": "rimraf dist && run-s build:*",
"build:commonjs": "esbuild src/index.ts --bundle --minify --charset=utf8 --platform=node --outfile=dist/fatina.cjs.js",
"build:esm": "esbuild src/index.ts --bundle --minify --charset=utf8 --platform=browser --format=esm --outfile=dist/fatina.esm.js",
Expand Down
3 changes: 2 additions & 1 deletion samples/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@
<li><a class="button is-link" href="./generic.html" target="frame">Generic</a></li>
<li><a class="button is-link" href="./preset.html" target="frame">Preset</a></li>
<li><a class="button is-link" href="./benchmark.html" target="frame">Benchmark</a></li>
<li><a class="button is-link" href="./transition.html" target="frame">Transition</a></li>
</ul>

<iframe id="samples" name="frame" src="./generic.html"></iframe>
</body>
</html>
</html>
7 changes: 1 addition & 6 deletions src/fatina.ts
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,7 @@ export class Fatina {
const tween = this.tween(obj)
.to(to, duration)
.setEasing(EasingType.InOutQuad)
.onStart(() => console.log('start'))
.onUpdate((dt) => console.log('update', dt))
.onComplete(() => {
console.log('complete')
tweenList.delete(key)
})
.onComplete(() => tweenList.delete(key))
.start()
tweenList.set(key, [to, tween])
return tween
Expand Down

0 comments on commit f179897

Please sign in to comment.