@waica/archetype-topdown 0.7.0 โ 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animation.d.ts +2 -1
- package/dist/animation.js +6 -2
- package/dist/registry-data.js +2 -1
- package/dist/ui.js +2 -19
- package/package.json +3 -3
package/dist/animation.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { DirectionalAnimation } from '@waica/engine';
|
|
|
2
2
|
/**
|
|
3
3
|
* The archetype's directional animation contract: four facings with west
|
|
4
4
|
* mirrored from east art (the stock sheets only draw s/n/e), clips named
|
|
5
|
-
* `<state>-<dir>`, and
|
|
5
|
+
* `<state>-<dir>`, and every pose the shared player graph can enter (walk,
|
|
6
|
+
* attack, hurt, death) falling back to idle when a sheet lacks it.
|
|
6
7
|
*/
|
|
7
8
|
export declare const TOPDOWN_ANIMATION: DirectionalAnimation;
|
package/dist/animation.js
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The archetype's directional animation contract: four facings with west
|
|
3
3
|
* mirrored from east art (the stock sheets only draw s/n/e), clips named
|
|
4
|
-
* `<state>-<dir>`, and
|
|
4
|
+
* `<state>-<dir>`, and every pose the shared player graph can enter (walk,
|
|
5
|
+
* attack, hurt, death) falling back to idle when a sheet lacks it.
|
|
5
6
|
*/
|
|
6
7
|
export const TOPDOWN_ANIMATION = {
|
|
7
8
|
directions: ['n', 's', 'e', 'w'],
|
|
8
9
|
fallbacks: { w: { dir: 'e', flip: true } },
|
|
9
|
-
contract: {
|
|
10
|
+
contract: {
|
|
11
|
+
required: ['idle'],
|
|
12
|
+
fallbacks: { walk: 'idle', attack: 'idle', hurt: 'idle', death: 'idle' },
|
|
13
|
+
},
|
|
10
14
|
};
|
package/dist/registry-data.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AnimatedSprite, Hitbox, Solid, Sprite, StateMachine, } from '@waica/engine';
|
|
1
|
+
import { AnimatedSprite, Hitbox, Solid, Sprite, StateMachine, Tilemap, } from '@waica/engine';
|
|
2
2
|
import { Chaser, Collectible, Hazard, Health, Interactable, Lifetime, Patrol, Respawnable, TopDownMotor, } from '@waica/behaviors';
|
|
3
3
|
import { TOPDOWN_ART } from './art.js';
|
|
4
4
|
import { TOPDOWN_PREFABS } from './prefabs.js';
|
|
@@ -13,6 +13,7 @@ export const TOPDOWN_REGISTRY_DATA = {
|
|
|
13
13
|
components: {
|
|
14
14
|
Sprite,
|
|
15
15
|
AnimatedSprite,
|
|
16
|
+
Tilemap,
|
|
16
17
|
Solid,
|
|
17
18
|
Hitbox,
|
|
18
19
|
StateMachine,
|
package/dist/ui.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { INTERACTABLE_UI } from '@waica/behaviors';
|
|
1
2
|
/**
|
|
2
3
|
* The archetype's default UI pieces: self-contained HTML fragments
|
|
3
4
|
* (markup + <style>, {{stat}} bindings) keyed by piece name. Projects
|
|
@@ -21,23 +22,5 @@ export const TOPDOWN_UI = {
|
|
|
21
22
|
</style>
|
|
22
23
|
<div class="potion-counter">๐งช {{points}}</div>
|
|
23
24
|
`,
|
|
24
|
-
|
|
25
|
-
.npc-line {
|
|
26
|
-
position: absolute;
|
|
27
|
-
left: 50%;
|
|
28
|
-
bottom: 24px;
|
|
29
|
-
transform: translateX(-50%);
|
|
30
|
-
max-width: 70%;
|
|
31
|
-
padding: 10px 18px;
|
|
32
|
-
border-radius: 8px;
|
|
33
|
-
background: #1a1a2ecc;
|
|
34
|
-
border: 1px solid #ffffff2e;
|
|
35
|
-
font: 500 18px system-ui, sans-serif;
|
|
36
|
-
color: #f5f5f5;
|
|
37
|
-
text-shadow: 0 1px 2px #000a;
|
|
38
|
-
user-select: none;
|
|
39
|
-
}
|
|
40
|
-
</style>
|
|
41
|
-
<div class="npc-line">{{npcLine}}</div>
|
|
42
|
-
`,
|
|
25
|
+
...INTERACTABLE_UI,
|
|
43
26
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waica/archetype-topdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Waica top-down archetype โ opinionated setup for Zelda-like overhead adventures",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@waica/behaviors": "^0.
|
|
28
|
-
"@waica/engine": "^0.
|
|
27
|
+
"@waica/behaviors": "^0.9.0",
|
|
28
|
+
"@waica/engine": "^0.9.0"
|
|
29
29
|
}
|
|
30
30
|
}
|