@waica/archetype-isometric 0.10.0 → 0.12.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/assets/ATTRIBUTION.md +13 -0
- package/assets/waica-iso-click-marker.png +0 -0
- package/dist/art.js +1 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +1 -1
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.js +3 -1
- package/dist/prefabs.d.ts +4 -0
- package/dist/prefabs.js +39 -0
- package/dist/registry-data.js +3 -1
- package/dist/registry.js +1 -0
- package/dist/scene-default.d.ts +9 -0
- package/dist/scene-default.js +50 -0
- package/package.json +3 -3
package/assets/ATTRIBUTION.md
CHANGED
|
@@ -92,3 +92,16 @@ remain at the human-approved 16 texels per render unit.
|
|
|
92
92
|
| `waica-iso-tree.png` | `(768,208,832,304)`, transparent bottom trimmed | 64×94 |
|
|
93
93
|
| `waica-iso-rock.png` | `(784,868,814,890)`, padded at `(1,10)` | 32×32 |
|
|
94
94
|
| `waica-iso-crate.png` | `(896,832,960,896)`, nearest-resized | 32×32 |
|
|
95
|
+
|
|
96
|
+
## Click-to-move destination marker
|
|
97
|
+
|
|
98
|
+
- **Original**, not sourced from Puny Characters or the hawkbirdtree tileset:
|
|
99
|
+
a flat gold rhombus (translucent fill, brighter outline), generated
|
|
100
|
+
programmatically at 2026-08-30 for the point-and-click feature (CA-8/CA-9
|
|
101
|
+
of `.sdd/specs/point-and-click-grid-role.md`) — CC0, same terms as the
|
|
102
|
+
rest of this archetype's own art.
|
|
103
|
+
- `waica-iso-click-marker.png`: 32×16 (matches the 2:1 diamond aspect of the
|
|
104
|
+
ground tileset, halved), transparent background.
|
|
105
|
+
- Placeholder-quality by design: exact visual polish is out of scope for
|
|
106
|
+
this run and is the human-verified part of CA-8/CA-12 — a human is free
|
|
107
|
+
to swap this file for a nicer diamond later without touching any code.
|
|
Binary file
|
package/dist/art.js
CHANGED
|
@@ -7,4 +7,5 @@ export const ISOMETRIC_ART = [
|
|
|
7
7
|
{ file: 'waica-iso-tree.png', uri: 'waica:iso-tree' },
|
|
8
8
|
{ file: 'waica-iso-rock.png', uri: 'waica:iso-rock' },
|
|
9
9
|
{ file: 'waica-iso-crate.png', uri: 'waica:iso-crate' },
|
|
10
|
+
{ file: 'waica-iso-click-marker.png', uri: 'waica:iso-click-marker' },
|
|
10
11
|
];
|
package/dist/index.d.ts
CHANGED
|
@@ -4,12 +4,15 @@ export { ISOMETRIC_BUNDLE } from './bundle.js';
|
|
|
4
4
|
export { ISOMETRIC_ACTION_LABELS, ISOMETRIC_BINDINGS } from './controls.js';
|
|
5
5
|
export { ISOMETRIC_PREFABS, ISOMETRIC_HERO_SPRITE } from './prefabs.js';
|
|
6
6
|
export { ISOMETRIC_ART_URLS, ISOMETRIC_PALETTE, ISOMETRIC_REGISTRY, } from './registry.js';
|
|
7
|
-
export { ISOMETRIC_BLANK_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
7
|
+
export { ISOMETRIC_BLANK_SCENE, ISOMETRIC_CAVE_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
8
8
|
export { ISOMETRIC_UI } from './ui.js';
|
|
9
9
|
export declare const ARCHETYPE: {
|
|
10
10
|
id: string;
|
|
11
11
|
label: string;
|
|
12
12
|
scene: import("@waica/engine").SceneJson;
|
|
13
|
+
extraScenes: {
|
|
14
|
+
cave: import("@waica/engine").SceneJson;
|
|
15
|
+
};
|
|
13
16
|
blankScene: import("@waica/engine").SceneJson;
|
|
14
17
|
palette: import("@waica/engine").EntityTemplate[];
|
|
15
18
|
prefabs: Record<string, import("@waica/engine").PrefabJson>;
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ export { ISOMETRIC_BUNDLE } from './bundle.js';
|
|
|
6
6
|
export { ISOMETRIC_ACTION_LABELS, ISOMETRIC_BINDINGS } from './controls.js';
|
|
7
7
|
export { ISOMETRIC_PREFABS, ISOMETRIC_HERO_SPRITE } from './prefabs.js';
|
|
8
8
|
export { ISOMETRIC_ART_URLS, ISOMETRIC_PALETTE, ISOMETRIC_REGISTRY, } from './registry.js';
|
|
9
|
-
export { ISOMETRIC_BLANK_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
9
|
+
export { ISOMETRIC_BLANK_SCENE, ISOMETRIC_CAVE_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
10
10
|
export { ISOMETRIC_UI } from './ui.js';
|
|
11
11
|
export const ARCHETYPE = {
|
|
12
12
|
...DATA_ARCHETYPE,
|
package/dist/manifest.d.ts
CHANGED
|
@@ -3,6 +3,9 @@ export declare const ARCHETYPE: {
|
|
|
3
3
|
id: string;
|
|
4
4
|
label: string;
|
|
5
5
|
scene: import("@waica/engine").SceneJson;
|
|
6
|
+
extraScenes: {
|
|
7
|
+
cave: import("@waica/engine").SceneJson;
|
|
8
|
+
};
|
|
6
9
|
blankScene: import("@waica/engine").SceneJson;
|
|
7
10
|
registry: import("@waica/engine").SceneRegistry;
|
|
8
11
|
palette: import("@waica/engine").EntityTemplate[];
|
package/dist/manifest.js
CHANGED
|
@@ -4,7 +4,7 @@ import { ISOMETRIC_BUNDLE } from './bundle.js';
|
|
|
4
4
|
import { ISOMETRIC_ACTION_LABELS, ISOMETRIC_BINDINGS } from './controls.js';
|
|
5
5
|
import { ISOMETRIC_PREFABS } from './prefabs.js';
|
|
6
6
|
import { ISOMETRIC_PALETTE, ISOMETRIC_REGISTRY_DATA } from './registry-data.js';
|
|
7
|
-
import { ISOMETRIC_BLANK_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
7
|
+
import { ISOMETRIC_BLANK_SCENE, ISOMETRIC_CAVE_SCENE, ISOMETRIC_SCENE } from './scene-default.js';
|
|
8
8
|
export const ISOMETRIC_ENTITY_ICONS = {
|
|
9
9
|
IsoMotor: '🧭',
|
|
10
10
|
Tilemap: '💎',
|
|
@@ -12,11 +12,13 @@ export const ISOMETRIC_ENTITY_ICONS = {
|
|
|
12
12
|
Interactable: '💬',
|
|
13
13
|
Collectible: '📦',
|
|
14
14
|
Hazard: '👹',
|
|
15
|
+
SceneTransition: '🚪',
|
|
15
16
|
};
|
|
16
17
|
export const ARCHETYPE = {
|
|
17
18
|
id: 'isometric',
|
|
18
19
|
label: 'Isometric',
|
|
19
20
|
scene: ISOMETRIC_SCENE,
|
|
21
|
+
extraScenes: { cave: ISOMETRIC_CAVE_SCENE },
|
|
20
22
|
blankScene: ISOMETRIC_BLANK_SCENE,
|
|
21
23
|
registry: ISOMETRIC_REGISTRY_DATA,
|
|
22
24
|
palette: ISOMETRIC_PALETTE,
|
package/dist/prefabs.d.ts
CHANGED
|
@@ -18,5 +18,9 @@ export declare const ISOMETRIC_HERO_SPRITE: {
|
|
|
18
18
|
clips: ClipMap;
|
|
19
19
|
initialClip: string;
|
|
20
20
|
};
|
|
21
|
+
/** The second demo scene's ground: smaller and enclosed, so it reads as a distinct map. */
|
|
22
|
+
export declare const ISOMETRIC_CAVE_MAP_WIDTH = 10;
|
|
23
|
+
export declare const ISOMETRIC_CAVE_MAP_HEIGHT = 10;
|
|
24
|
+
export declare const ISOMETRIC_CAVE_GROUND_CELLS: number[];
|
|
21
25
|
export declare const ISOMETRIC_PREFABS: Record<string, PrefabJson>;
|
|
22
26
|
export {};
|
package/dist/prefabs.js
CHANGED
|
@@ -67,6 +67,19 @@ function tileAt(column, row) {
|
|
|
67
67
|
return GRASS;
|
|
68
68
|
}
|
|
69
69
|
const GROUND_CELLS = Array.from({ length: MAP_WIDTH * MAP_HEIGHT }, (_, index) => tileAt(index % MAP_WIDTH, Math.floor(index / MAP_WIDTH)));
|
|
70
|
+
/** The second demo scene's ground: smaller and enclosed, so it reads as a distinct map. */
|
|
71
|
+
export const ISOMETRIC_CAVE_MAP_WIDTH = 10;
|
|
72
|
+
export const ISOMETRIC_CAVE_MAP_HEIGHT = 10;
|
|
73
|
+
function caveTileAt(column, row) {
|
|
74
|
+
const width = ISOMETRIC_CAVE_MAP_WIDTH;
|
|
75
|
+
const height = ISOMETRIC_CAVE_MAP_HEIGHT;
|
|
76
|
+
if (column === 0 || row === 0 || column === width - 1 || row === height - 1)
|
|
77
|
+
return BORDER;
|
|
78
|
+
if (column >= 4 && column <= 5 && row >= 4 && row <= 5)
|
|
79
|
+
return WATER;
|
|
80
|
+
return DIRT;
|
|
81
|
+
}
|
|
82
|
+
export const ISOMETRIC_CAVE_GROUND_CELLS = Array.from({ length: ISOMETRIC_CAVE_MAP_WIDTH * ISOMETRIC_CAVE_MAP_HEIGHT }, (_, index) => caveTileAt(index % ISOMETRIC_CAVE_MAP_WIDTH, Math.floor(index / ISOMETRIC_CAVE_MAP_WIDTH)));
|
|
70
83
|
export const ISOMETRIC_PREFABS = {
|
|
71
84
|
'characters/player': {
|
|
72
85
|
waicaPrefab: 1,
|
|
@@ -86,6 +99,14 @@ export const ISOMETRIC_PREFABS = {
|
|
|
86
99
|
{ type: 'MeleeAttack' },
|
|
87
100
|
{ type: 'Respawnable' },
|
|
88
101
|
{ type: 'Health', props: { max: 3, invulnerability: 1, stat: 'health' } },
|
|
102
|
+
{
|
|
103
|
+
type: 'ClickToMove',
|
|
104
|
+
props: {
|
|
105
|
+
markerTexture: 'waica:iso-click-marker',
|
|
106
|
+
markerWidth: 1,
|
|
107
|
+
markerHeight: 0.5,
|
|
108
|
+
},
|
|
109
|
+
},
|
|
89
110
|
],
|
|
90
111
|
},
|
|
91
112
|
'characters/villager': {
|
|
@@ -187,6 +208,24 @@ export const ISOMETRIC_PREFABS = {
|
|
|
187
208
|
{ type: 'Solid', props: { width: 0.8, height: 0.6 } },
|
|
188
209
|
],
|
|
189
210
|
},
|
|
211
|
+
'objects/door': {
|
|
212
|
+
waicaPrefab: 1,
|
|
213
|
+
type: 'object',
|
|
214
|
+
components: [
|
|
215
|
+
{
|
|
216
|
+
type: 'Sprite',
|
|
217
|
+
props: {
|
|
218
|
+
texture: 'waica:iso-rock',
|
|
219
|
+
pixelArt: true,
|
|
220
|
+
width: 1,
|
|
221
|
+
height: 1,
|
|
222
|
+
anchorY: 0,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{ type: 'Hitbox', props: { width: 0.8, height: 0.8 } },
|
|
226
|
+
{ type: 'SceneTransition', props: { scene: 'cave' } },
|
|
227
|
+
],
|
|
228
|
+
},
|
|
190
229
|
'tiles/ground': {
|
|
191
230
|
waicaPrefab: 1,
|
|
192
231
|
type: 'tile',
|
package/dist/registry-data.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnimatedSprite, Hitbox, Solid, Sprite, StateMachine, Tilemap, } from '@waica/engine';
|
|
2
|
-
import { Chaser, Collectible, Hazard, Health, Interactable, IsoMotor, Lifetime, MeleeAttack, Patrol, Respawnable, } from '@waica/behaviors';
|
|
2
|
+
import { Chaser, ClickToMove, Collectible, Hazard, Health, Interactable, IsoMotor, Lifetime, MeleeAttack, Patrol, Respawnable, SceneTransition, } from '@waica/behaviors';
|
|
3
3
|
import { ISOMETRIC_ART } from './art.js';
|
|
4
4
|
import { ISOMETRIC_PREFABS } from './prefabs.js';
|
|
5
5
|
import { ISOMETRIC_UI } from './ui.js';
|
|
@@ -22,6 +22,8 @@ export const ISOMETRIC_REGISTRY_DATA = {
|
|
|
22
22
|
Health,
|
|
23
23
|
Respawnable,
|
|
24
24
|
Lifetime,
|
|
25
|
+
ClickToMove,
|
|
26
|
+
SceneTransition,
|
|
25
27
|
},
|
|
26
28
|
resolveAsset: (uri) => PACKAGE_ASSETS[uri] ?? uri,
|
|
27
29
|
prefabs: ISOMETRIC_PREFABS,
|
package/dist/registry.js
CHANGED
|
@@ -9,6 +9,7 @@ export const ISOMETRIC_ART_URLS = {
|
|
|
9
9
|
'waica-iso-tree.png': new URL('../assets/waica-iso-tree.png', import.meta.url).href,
|
|
10
10
|
'waica-iso-rock.png': new URL('../assets/waica-iso-rock.png', import.meta.url).href,
|
|
11
11
|
'waica-iso-crate.png': new URL('../assets/waica-iso-crate.png', import.meta.url).href,
|
|
12
|
+
'waica-iso-click-marker.png': new URL('../assets/waica-iso-click-marker.png', import.meta.url).href,
|
|
12
13
|
};
|
|
13
14
|
const BUILTIN_ASSETS = Object.fromEntries(ISOMETRIC_ART.map((art) => [art.uri, ISOMETRIC_ART_URLS[art.file] ?? art.uri]));
|
|
14
15
|
export const ISOMETRIC_REGISTRY = {
|
package/dist/scene-default.d.ts
CHANGED
|
@@ -3,3 +3,12 @@ import type { SceneJson } from '@waica/engine';
|
|
|
3
3
|
export declare const ISOMETRIC_SCENE: SceneJson;
|
|
4
4
|
/** Blank projects retain the diamond grid and full-map framing. */
|
|
5
5
|
export declare const ISOMETRIC_BLANK_SCENE: SceneJson;
|
|
6
|
+
/**
|
|
7
|
+
* The second demo scene (CA-13): a smaller, enclosed cave — reusing
|
|
8
|
+
* `tiles/ground`'s texture with a distinct, smaller layout (an
|
|
9
|
+
* entity-level Tilemap override, no new asset) so it reads as a different
|
|
10
|
+
* map at a glance. The incoming Player is authored here, not carried from
|
|
11
|
+
* `main` (grill decision 18): crossing back through the Door lands at this
|
|
12
|
+
* scene's own entry, not beside where the player left.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ISOMETRIC_CAVE_SCENE: SceneJson;
|
package/dist/scene-default.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ISOMETRIC_CAVE_GROUND_CELLS, ISOMETRIC_CAVE_MAP_HEIGHT, ISOMETRIC_CAVE_MAP_WIDTH, } from './prefabs.js';
|
|
1
2
|
/**
|
|
2
3
|
* Full-map framing plus a follow feel tuned for the diamond: a tight dead
|
|
3
4
|
* zone and no horizontal lookahead (the engine's step kicks in every time
|
|
@@ -47,6 +48,12 @@ export const ISOMETRIC_SCENE = {
|
|
|
47
48
|
{ name: 'Tree-3', prefab: 'objects/tree', position: [12, 3] },
|
|
48
49
|
{ name: 'Rock-1', prefab: 'objects/rock', position: [5, 11] },
|
|
49
50
|
{ name: 'Rock-2', prefab: 'objects/rock', position: [9, 4] },
|
|
51
|
+
// The Scene Transition into the second demo scene: tucked in the
|
|
52
|
+
// north-west corner, well clear of every other prop, of the player's
|
|
53
|
+
// start-area walking radius, and of the click-to-move destinations the
|
|
54
|
+
// isometric e2e leg exercises (CA-13) — a Door placed inside any of
|
|
55
|
+
// those previously fired mid-test.
|
|
56
|
+
{ name: 'Door', prefab: 'objects/door', position: [2, 2] },
|
|
50
57
|
],
|
|
51
58
|
ui: ['crate-counter', 'health'],
|
|
52
59
|
};
|
|
@@ -57,3 +64,46 @@ export const ISOMETRIC_BLANK_SCENE = {
|
|
|
57
64
|
camera: isometricCamera(),
|
|
58
65
|
entities: [],
|
|
59
66
|
};
|
|
67
|
+
/**
|
|
68
|
+
* The second demo scene (CA-13): a smaller, enclosed cave — reusing
|
|
69
|
+
* `tiles/ground`'s texture with a distinct, smaller layout (an
|
|
70
|
+
* entity-level Tilemap override, no new asset) so it reads as a different
|
|
71
|
+
* map at a glance. The incoming Player is authored here, not carried from
|
|
72
|
+
* `main` (grill decision 18): crossing back through the Door lands at this
|
|
73
|
+
* scene's own entry, not beside where the player left.
|
|
74
|
+
*/
|
|
75
|
+
export const ISOMETRIC_CAVE_SCENE = {
|
|
76
|
+
waicaScene: 3,
|
|
77
|
+
render: { sort: 'y', projection: 'isometric' },
|
|
78
|
+
camera: {
|
|
79
|
+
...isometricCamera(),
|
|
80
|
+
position: [0, -5],
|
|
81
|
+
limits: { minX: -10, maxX: 10, minY: -10, maxY: 0 },
|
|
82
|
+
follow: 'Player',
|
|
83
|
+
},
|
|
84
|
+
entities: [
|
|
85
|
+
{
|
|
86
|
+
name: 'Ground',
|
|
87
|
+
prefab: 'tiles/ground',
|
|
88
|
+
position: [0, 0],
|
|
89
|
+
overrides: {
|
|
90
|
+
Tilemap: {
|
|
91
|
+
mapWidth: ISOMETRIC_CAVE_MAP_WIDTH,
|
|
92
|
+
mapHeight: ISOMETRIC_CAVE_MAP_HEIGHT,
|
|
93
|
+
cells: ISOMETRIC_CAVE_GROUND_CELLS,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
{ name: 'Player', prefab: 'characters/player', position: [2, 7] },
|
|
98
|
+
{ name: 'Rock-1', prefab: 'objects/rock', position: [7, 3] },
|
|
99
|
+
{ name: 'Rock-2', prefab: 'objects/rock', position: [2, 2] },
|
|
100
|
+
// Returns to the meadow, clear of the cave's rocks and water pool.
|
|
101
|
+
{
|
|
102
|
+
name: 'Door',
|
|
103
|
+
prefab: 'objects/door',
|
|
104
|
+
position: [8, 2],
|
|
105
|
+
overrides: { SceneTransition: { scene: 'main' } },
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
ui: ['health'],
|
|
109
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@waica/archetype-isometric",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Waica isometric archetype — logical-grid action adventures with screen-relative movement",
|
|
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.12.0",
|
|
28
|
+
"@waica/engine": "^0.12.0"
|
|
29
29
|
}
|
|
30
30
|
}
|