From 023276604211d233e7a25288c2fdf73986997fbc Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Jul 2026 17:42:57 +0000 Subject: [PATCH 1/8] docs: add .posecode file association instructions for editors (#20) Signed-off-by: Claude --- README.md | 18 ++++++++++++++++ editors/vscode/README.md | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/README.md b/README.md index a0942ea..a9ed6ec 100644 --- a/README.md +++ b/README.md @@ -409,6 +409,24 @@ npm run build --- +### Editor support + +A VS Code extension provides syntax highlighting, ROM diagnostics, and +completion for `.posecode` files — see +[`editors/vscode`](editors/vscode/README.md). Until it is published, you can +get basic highlighting immediately by associating `.posecode` files with +Markdown: + +```json +"files.associations": { + "*.posecode": "markdown" +} +``` + +See the [editor guide](editors/vscode/README.md#file-association-before-the-extension-is-installed) +for VS Code, Cursor, Sublime Text, and Neovim instructions. + +--- ## MCP Server diff --git a/editors/vscode/README.md b/editors/vscode/README.md index ef3517e..ec5a1a4 100644 --- a/editors/vscode/README.md +++ b/editors/vscode/README.md @@ -9,6 +9,52 @@ Language support for the **Posecode** (`.posecode`) kinematic motion DSL: The smart features are provided by [`posecode-lsp`](../../packages/posecode-lsp), which shares its language logic ([`posecode-language`](../../packages/posecode-language)) with the web playground, so the editor and the playground always agree. +## File association (before the extension is installed) + +Until the full extension is published to the Marketplace, `.posecode` files +open as plain text. You can get basic highlighting and comment/bracket +behaviour right away by telling your editor to treat `.posecode` files as +Markdown, which is the closest built-in grammar. + +### VS Code + +Add the following to your `settings.json` (open the Command Palette → +**Preferences: Open User Settings (JSON)**, or use a workspace +`.vscode/settings.json` to scope it to a single project): + +```json +{ + "files.associations": { + "*.posecode": "markdown" + } +} +``` + +Alternatively, open any `.posecode` file, click the language indicator in the +bottom-right status bar (it will say "Plain Text"), choose **Configure File +Association for '.posecode'…**, and pick **Markdown**. + +### Cursor and other VS Code forks + +Cursor, VSCodium, and other VS Code forks read the same `files.associations` +setting, so the JSON snippet above works unchanged. + +### Sublime Text + +Open a `.posecode` file, then use the menu **View → Syntax → Open all with +current extension as… → Markdown**. + +### Neovim + +Register the extension in your config: + +```lua +vim.filetype.add({ extension = { posecode = "markdown" } }) +``` + +Once the dedicated extension is installed it registers the real `posecode` +language id, and you can remove these fallbacks. + ## Develop / run locally From the repo root: From c68aaf8c8f1105fe10d5621ea9555dc0347b6049 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 22 Jul 2026 17:46:09 +0000 Subject: [PATCH 2/8] playground: add 1.5x speed option and persist playback speed across reloads (#22) Signed-off-by: Claude --- playground/play.html | 1 + playground/src/main.ts | 27 ++++++++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/playground/play.html b/playground/play.html index 0d04184..cd3acb4 100644 --- a/playground/play.html +++ b/playground/play.html @@ -210,6 +210,7 @@ diff --git a/playground/src/main.ts b/playground/src/main.ts index b20f39e..61b9a41 100644 --- a/playground/src/main.ts +++ b/playground/src/main.ts @@ -291,6 +291,7 @@ function recompile(): void { viewer.load(ir); updateFloorGuideKey(); viewer.setLoop(loop.checked); + viewer.setSpeed(Number(speed.value)); viewer.play(); setPlaying(true); const tl = viewer.getTimeline(); @@ -543,7 +544,31 @@ scrub.addEventListener("change", () => { scrubbing = false; }); loop.addEventListener("change", () => viewer?.setLoop(loop.checked)); -speed.addEventListener("change", () => viewer?.setSpeed(Number(speed.value))); + +// Playback speed persists across reloads so an author who prefers slow-motion +// scrubbing does not have to re-select it every visit. +const SPEED_STORAGE_KEY = "posecode.playbackSpeed"; +function restoreSpeed() { + try { + const saved = localStorage.getItem(SPEED_STORAGE_KEY); + // Only honour a saved value the current