Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacek Piętal committed Apr 12, 2024
1 parent 37f5ba4 commit ed452e4
Show file tree
Hide file tree
Showing 25 changed files with 33 additions and 30 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
└──[1x StateMachine]
```

Tiny code, big results! Check out the [demo](https://prozi.github.io/oneforall/) to see below code in action.
Tiny code, big results! Check out the [demo](https://prozi.github.io/oneforall/demo/) to see below code in action.

Also, here is the [documentation](https://prozi.github.io/oneforall/modules.html).

## Demo Code

Expand Down Expand Up @@ -82,9 +84,6 @@ export function createSprite({ scene, data, texture }): TGameObject {
// create animator with few animations from json + texture
gameObject.sprite = new Animator(gameObject, data, texture);
gameObject.sprite.setState('idle', true);
gameObject.sprite.children.forEach((child: PIXI.AnimatedSprite) =>
child.anchor.set(0.5, 0.8)
);

// subscribe to its own update function
gameObject.update$
Expand Down
1 change: 1 addition & 0 deletions demo/cave-boy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"rows": 7,
"realheight": 50,
"realwidth": 50,
"anchor": { "x": 0.5, "y": 0.8 },
"tileset": "cave-boy.png",
"count": 37,
"animationSpeed": 100,
Expand Down
2 changes: 1 addition & 1 deletion dist/demo.bundle.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/demo/sprite.prefab.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/demo/sprite.prefab.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function createSprite({ scene, data, texture }) {
// create animator with few animations from json + texture
gameObject.sprite = new animator_1.Animator(gameObject, data, texture);
gameObject.sprite.setState('idle', true);
gameObject.sprite.children.forEach((child) => child.anchor.set(0.5, 0.8));
// subscribe to its own update function
gameObject.update$
.pipe((0, operators_1.takeUntil)(scene.destroy$))
Expand Down
2 changes: 1 addition & 1 deletion dist/lifecycle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface LifecycleProps {
*/
scene?: SceneBase | Scene;
/**
* Updates the Lifecycle Object with actural deltaTime ~60fps
* Updates the Lifecycle Object with actual deltaTime ~60fps
*/
update(deltaTime: number): void;
/**
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Animator.html
Original file line number Diff line number Diff line change
Expand Up @@ -11762,7 +11762,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/CircleBody.html
Original file line number Diff line number Diff line change
Expand Up @@ -3439,7 +3439,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Component.html
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Container.html
Original file line number Diff line number Diff line change
Expand Up @@ -10377,7 +10377,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/GameObject.html
Original file line number Diff line number Diff line change
Expand Up @@ -11484,7 +11484,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Lifecycle.html
Original file line number Diff line number Diff line change
Expand Up @@ -10439,7 +10439,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/PolygonBody.html
Original file line number Diff line number Diff line change
Expand Up @@ -3012,7 +3012,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Prefab.html
Original file line number Diff line number Diff line change
Expand Up @@ -11702,7 +11702,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Scene.html
Original file line number Diff line number Diff line change
Expand Up @@ -1618,7 +1618,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/SceneBase.html
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/Sprite.html
Original file line number Diff line number Diff line change
Expand Up @@ -11146,7 +11146,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/classes/StateMachine.html
Original file line number Diff line number Diff line change
Expand Up @@ -916,7 +916,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
1 change: 1 addition & 0 deletions docs/demo/cave-boy.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"rows": 7,
"realheight": 50,
"realwidth": 50,
"anchor": { "x": 0.5, "y": 0.8 },
"tileset": "cave-boy.png",
"count": 37,
"animationSpeed": 100,
Expand Down
12 changes: 9 additions & 3 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/LifecycleProps.html
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion docs/interfaces/TGameObject.html
Original file line number Diff line number Diff line change
Expand Up @@ -13192,7 +13192,7 @@ <h3 class="tsd-anchor-link">
<li class="tsd-description">
<div class="tsd-comment tsd-typography">
<p>
Updates the Lifecycle Object with actural deltaTime ~60fps
Updates the Lifecycle Object with actual deltaTime ~60fps
</p>
</div>
<div class="tsd-parameters">
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@jacekpietal/oneforall",
"description": "TypeScript gamedev library inspired by Unity",
"version": "5.6.2",
"version": "5.7.0",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
Expand Down
3 changes: 0 additions & 3 deletions src/demo/sprite.prefab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ export function createSprite({ scene, data, texture }): TGameObject {
// create animator with few animations from json + texture
gameObject.sprite = new Animator(gameObject, data, texture);
gameObject.sprite.setState('idle', true);
gameObject.sprite.children.forEach((child: PIXI.AnimatedSprite) =>
child.anchor.set(0.5, 0.8)
);

// subscribe to its own update function
gameObject.update$
Expand Down
2 changes: 1 addition & 1 deletion src/lifecycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface LifecycleProps {
scene?: SceneBase | Scene;

/**
* Updates the Lifecycle Object with actural deltaTime ~60fps
* Updates the Lifecycle Object with actual deltaTime ~60fps
*/
update(deltaTime: number): void;

Expand Down

0 comments on commit ed452e4

Please sign in to comment.