@jgengine/editor 0.18.0 → 0.19.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/CHANGELOG.md +265 -2
- package/dist/ClipPreviewLayer.js +18 -2
- package/dist/EditorChrome.js +7 -0
- package/dist/LightingPanel.js +13 -1
- package/dist/handlers/document.js +2 -0
- package/dist/handlers/index.js +2 -0
- package/dist/handlers/navmesh.d.ts +5 -0
- package/dist/handlers/navmesh.js +21 -0
- package/dist/handlers/streets.js +15 -2
- package/dist/mcp/fieldSpec.js +3 -2
- package/dist/mcp/tools.js +3 -2
- package/dist/modelAnimationAuthoring.d.ts +23 -0
- package/dist/modelAnimationAuthoring.js +58 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.js +2 -0
- package/dist/shell/AnimationGraphPanel.d.ts +16 -0
- package/dist/shell/AnimationGraphPanel.js +172 -0
- package/dist/shell/AnimationPanel.d.ts +3 -1
- package/dist/shell/AnimationPanel.js +9 -7
- package/dist/shell/WorkspaceRail.js +1 -1
- package/dist/shell/animGraphPreview.d.ts +56 -0
- package/dist/shell/animGraphPreview.js +92 -0
- package/dist/shell/clipPreview.d.ts +8 -0
- package/package.json +5 -4
- package/skills/ce-handoff/SKILL.md +2 -2
- package/skills/jgengine/SKILL.md +9 -5
- package/skills/jgengine/api.md +205 -101
- package/skills/jgengine/capabilities.md +56 -0
- package/skills/jgengine/recipes/minimal-game.md +3 -0
- package/skills/jgengine-editor/SKILL.md +3 -1
- package/skills/jgengine-editor/api.md +28 -0
- package/skills/jgengine-editor/reference.md +13 -3
- package/skills/level-design/SKILL.md +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AnimClipOutput, AnimGraph } from "@jgengine/core/anim/animGraph";
|
|
1
2
|
import { type ClipRole } from "@jgengine/core/game/clipRoles";
|
|
2
3
|
import type { ModelAnimationConfig } from "@jgengine/core/game/playableGame";
|
|
3
4
|
/**
|
|
@@ -39,6 +40,13 @@ export interface ClipPreviewSession {
|
|
|
39
40
|
readonly source: ClipPreviewSource;
|
|
40
41
|
readonly driver: ClipPreviewState;
|
|
41
42
|
readonly duration: number;
|
|
43
|
+
/** Every clip's duration, published by the viewport layer once the GLB loads. */
|
|
44
|
+
readonly clipDurations?: Readonly<Record<string, number>>;
|
|
45
|
+
/** When set, the viewport poses the rig from this graph output instead of playing `driver`'s clip. */
|
|
46
|
+
readonly graphPose?: {
|
|
47
|
+
readonly graph: AnimGraph;
|
|
48
|
+
readonly clips: readonly AnimClipOutput[];
|
|
49
|
+
};
|
|
42
50
|
}
|
|
43
51
|
/** Playback state of the clip preview driver. `time` is seconds into the clip. */
|
|
44
52
|
export interface ClipPreviewState {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jgengine/editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Scene/world/asset editor for JGengine — loaded lazily by the runner; never import from game entrypoints.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -31,9 +31,10 @@
|
|
|
31
31
|
"test": "bun test src"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@jgengine/core": "^0.
|
|
35
|
-
"@jgengine/
|
|
36
|
-
"@jgengine/
|
|
34
|
+
"@jgengine/core": "^0.19.0",
|
|
35
|
+
"@jgengine/navbake": "^0.19.0",
|
|
36
|
+
"@jgengine/react": "^0.19.0",
|
|
37
|
+
"@jgengine/shell": "^0.19.0"
|
|
37
38
|
},
|
|
38
39
|
"peerDependencies": {
|
|
39
40
|
"@react-three/drei": "^10.0.0",
|
|
@@ -143,7 +143,7 @@ When sufficient, return a concise orientation: objective, progress, decisions, c
|
|
|
143
143
|
|
|
144
144
|
## JGengine notes
|
|
145
145
|
|
|
146
|
-
- Multi-session engine work
|
|
146
|
+
- Multi-session engine work spans GitHub issues and PRs — point at those; do not paste full plan bodies.
|
|
147
147
|
- Prefer `bun run agent:bootstrap --check` status, branch names, and PR links as state anchors.
|
|
148
148
|
- Local parallelism uses `.claude/worktrees/`; never invent `C:\tmp\…` Codex-shared trees.
|
|
149
|
-
-
|
|
149
|
+
- Durable process changes belong in skills, not only the handoff.
|
package/skills/jgengine/SKILL.md
CHANGED
|
@@ -5,10 +5,14 @@ description: Route game work to the smallest useful JGengine guidance set.
|
|
|
5
5
|
|
|
6
6
|
# JGengine intake and router
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
This skill decides what to load; it is not an engine manual. Package map, commands, layering, and license live in the JGengine README (repo-root [`README.md`](../../../README.md) in the monorepo, [jgengine.com](https://jgengine.com) from a created project); open it when you need one of those facts.
|
|
9
|
+
|
|
10
|
+
A created project installs only `jgengine`, `jgengine-editor`, `jgengine-verify`, `game-design`, and `jgengine-ui`. Run `npx jgengine skills -p --all` before loading any other domain named below. Those projects do not ship `api.md`; read exact signatures from the `.d.ts` files under `node_modules/@jgengine/<pkg>/dist/`.
|
|
9
11
|
|
|
10
12
|
## 1. Establish the target
|
|
11
13
|
|
|
14
|
+
For greenfield builds, write `src/art-direction.md` before any code.
|
|
15
|
+
|
|
12
16
|
Treat the pitch as a unique composition of needs, not a genre to fill in — never reach for a genre kit, preset, archetype, or class template ("default sports car", "default RPG", "default FPS") in the SDK or skills (see [AGENTS.md](../../../AGENTS.md)). Use `game-design` to turn the pitch into a testable player promise, verbs, loops, progression, failure, and completion scenario. Use `level-design` when play depends on authored spaces, routes, encounters, exploration, or spatial pacing. Capture only decisions that change architecture:
|
|
13
17
|
|
|
14
18
|
- player point of view and controls
|
|
@@ -18,7 +22,7 @@ Treat the pitch as a unique composition of needs, not a genre to fill in — nev
|
|
|
18
22
|
- HUD/menu states and **custom** UI art direction (compose shipped building blocks + HudTheme; no unskinned stock face)
|
|
19
23
|
- one observable completion scenario
|
|
20
24
|
|
|
21
|
-
For a new in-repo game, scaffold with `bun run new:game "<id-or-title>"` (thin script alias for `jgengine create`, auto-detects the in-repo variant). Outside this monorepo, start with `npx jgengine create`; never copy `Games/*`.
|
|
25
|
+
Pick the dimension first: `create` defaults to a 3D world (terrain, sky, player model, editor scene); a grid, card, tile, or other board game with no 3D scene takes `create --2d` (a `board` world drawn by GameUI over `@jgengine/core/puzzle/cellGrid`). For a new in-repo game, scaffold with `bun run new:game "<id-or-title>"` (thin script alias for `jgengine create`, auto-detects the in-repo variant). Outside this monorepo, start with `npx jgengine create`; never copy `Games/*`.
|
|
22
26
|
|
|
23
27
|
For an existing game asked to pick up a new engine release ("jgengine published a new version, grab it"), run `npx jgengine upgrade` in the project first: it diffs installed `@jgengine/*` versions against the latest release and prints every Migrate step and Adopt-worthy addition in between (`--json` for structured output). Bump, migrate oldest-first, then work the Adopt lists instead of reconstructing the changelog by hand.
|
|
24
28
|
|
|
@@ -44,9 +48,9 @@ World content routes editor-first: any request that adds, moves, restyles, or re
|
|
|
44
48
|
|
|
45
49
|
Within each selected domain:
|
|
46
50
|
|
|
47
|
-
0. Fastest start for a common composition: `npx jgengine recipe <name>` prints a vetted, SDK-typechecked snippet (imports + wired code)
|
|
48
|
-
1. Search
|
|
49
|
-
2. Open `api.md` only when exact signatures
|
|
51
|
+
0. Fastest start for a common composition: `npx jgengine recipe <name>` prints a vetted, SDK-typechecked snippet (imports + wired code) (`combat-loop`, `loot`, `world-drops`, `click-target`, `ability-bar`, `hitscan-weapon`, `rolled-gear`, `enter-vehicle` and more); `npx jgengine recipe` lists them. Copy that instead of reconning per-file.
|
|
52
|
+
1. Search capabilities by intent; do not read `capabilities.md` top to bottom. `npx jgengine find <intent>` searches every domain's index and every recipe at once, installed or not, and prints the primitive and its import (or the recipe to open); in the monorepo, `grep -i "<intent>" .claude/skills/*/capabilities.md` does the same. Search the moment you are tempted to hand-roll a HUD window, inventory grid, paperdoll, hotkey listener, minimap, stat bar, or character motion. A `z-index`, a `keydown` for a panel, a `<div>` inventory, or a limb bob almost certainly has a shipped drop-in (`usePanels`/`PanelHost`, `InventoryGrid`, `CharacterSheet`/`Paperdoll`, `PartMotionRig`, `EntityPreview`); games own the *skin*, not the re-derivation.
|
|
53
|
+
2. Open `api.md` (monorepo) or the package `.d.ts` only when exact signatures are needed; grep it, never read it whole.
|
|
50
54
|
3. Open the linked reference only for a deeper recipe or trap.
|
|
51
55
|
4. For how several primitives wire into a running loop, read the domain's `recipes/` — connected, genre-free walkthroughs organized by composition seam; this skill's own [recipes/minimal-game.md](recipes/minimal-game.md) is the default whole-game walkthrough. Prefer a recipe over reading a game's source; the games under `Games/*` are not templates or references, and a hybrid game is just a different composition of the same primitives.
|
|
52
56
|
|