@jgengine/editor 0.12.0 → 0.14.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 +73 -1
- package/dist/AssetBrowser.d.ts +7 -0
- package/dist/AssetBrowser.js +10 -1
- package/dist/ClipPreviewLayer.d.ts +15 -0
- package/dist/ClipPreviewLayer.js +60 -0
- package/dist/EditorApp.d.ts +7 -1
- package/dist/EditorApp.js +5 -4
- package/dist/EditorChrome.d.ts +3 -1
- package/dist/EditorChrome.js +8 -4
- package/dist/InspectorPanel.d.ts +4 -1
- package/dist/InspectorPanel.js +35 -4
- package/dist/SchemaInspector.d.ts +3 -1
- package/dist/SchemaInspector.js +8 -3
- package/dist/handlers/index.js +2 -0
- package/dist/handlers/streets.d.ts +3 -0
- package/dist/handlers/streets.js +159 -0
- package/dist/mcp/fieldSpec.js +1 -0
- package/dist/mcp/tools.js +1 -0
- package/dist/modelAnimationAuthoring.d.ts +75 -0
- package/dist/modelAnimationAuthoring.js +164 -0
- package/dist/session.d.ts +14 -0
- package/dist/shell/AnimationPanel.d.ts +10 -8
- package/dist/shell/AnimationPanel.js +112 -12
- package/dist/shell/BottomDock.d.ts +3 -1
- package/dist/shell/BottomDock.js +2 -2
- package/dist/shell/TopAppBar.d.ts +3 -1
- package/dist/shell/TopAppBar.js +2 -2
- package/dist/shell/clipPreview.d.ts +85 -0
- package/dist/shell/clipPreview.js +82 -0
- package/dist/shell/scatterCoverage.d.ts +22 -0
- package/dist/shell/scatterCoverage.js +31 -0
- package/dist/uiStore.d.ts +6 -0
- package/dist/uiStore.js +1 -0
- package/package.json +4 -4
- package/skills/jgengine/SKILL.md +5 -2
- package/skills/jgengine/api.md +13 -5
- package/skills/jgengine-editor/api.md +51 -8
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
- `EDITOR_AGENT_KEY_FALLBACK_ENV` (const): const EDITOR_AGENT_KEY_FALLBACK_ENV: "ANTHROPIC_API_KEY" — Fallback API-key env when `JGENGINE_EDITOR_AGENT_KEY` is unset (`ANTHROPIC_API_KEY`).
|
|
394
394
|
- `EDITOR_AGENT_URL_ENV` (const): const EDITOR_AGENT_URL_ENV: "JGENGINE_EDITOR_AGENT_URL" — Env var name for the remote agent HTTP URL (`JGENGINE_EDITOR_AGENT_URL`).
|
|
395
395
|
- `EDITOR_MCP_TOOLS` (const): const EDITOR_MCP_TOOLS: readonly EditorMcpTool[] — Full set of MCP tools an agent can call to drive the live scene editor.
|
|
396
|
-
- `EditorApp` (function): function EditorApp({ gameId, playable, layers, catalogs, save, modeChip, networkPresence }: EditorAppProps): React.JSX.Element — Top-level scene editor: author spawns/zones/paths/notes visually over edit, walk, or play modes.
|
|
396
|
+
- `EditorApp` (function): function EditorApp({ gameId, playable, layers, catalogs, save, modeChip, networkPresence, onExitEditor }: EditorAppProps): React.JSX.Element — Top-level scene editor: author spawns/zones/paths/notes visually over edit, walk, or play modes.
|
|
397
397
|
- `EditorAppProps` (interface): interface EditorAppProps — Props for mounting the scene editor over a playable game.
|
|
398
398
|
- `EditorAssetEntry` (interface): interface EditorAssetEntry — A searchable, placeable asset shown in the editor's asset browser panel.
|
|
399
399
|
- `EditorAssetInfo` (interface): interface EditorAssetInfo — A placeable asset entry offered in the editor's asset browser.
|
|
@@ -402,7 +402,7 @@
|
|
|
402
402
|
- `EditorBridgeServer` (interface): interface EditorBridgeServer — A running editor bridge server: its bound port, URL, and a stop handle.
|
|
403
403
|
- `EditorBridgeServerOptions` (interface): interface EditorBridgeServerOptions — Options for starting the editor's HTTP bridge server: host api, port, hostname.
|
|
404
404
|
- `EditorCameraDriver` (const): const EditorCameraDriver: React.MemoExoticComponent<({ api }: { api: EditorHostApi; }) => null> — Smoothly pans the orbit camera to the editor host's focus target when it changes.
|
|
405
|
-
- `EditorChrome` (function): function EditorChrome({ gameId, session, api, assets, ui, baselineDocument, save, networkSnapshot, importAsset = importAssetToHost, onRegisterAsset, }: { gameId: string; session: EditorSession; api: EditorHostApi; assets: readonly EditorAssetEntry[]; ui: EditorUiStore; /** The document
|
|
405
|
+
- `EditorChrome` (function): function EditorChrome({ gameId, session, api, assets, ui, baselineDocument, save, networkSnapshot, importAsset = importAssetToHost, onRegisterAsset, onExitEditor, }: { gameId: string; session: EditorSession; api: EditorHostApi; assets: readonly EditorAssetEntry[]; ui: EditorUiStore; /** The document… — The full editor UI shell — global app bar, contextual scene toolbar, workspace rail, resizable hierarchy/inspector docks, tabbed bottom dock (content browser, console, profiler, AI assistant), viewport overlays, and status bar — wired to the session, UI store, layout store, and host RPC. Mounted by `EditorApp`; not a game-author entry point.
|
|
406
406
|
- `EditorHostApi` (interface): interface EditorHostApi — The live editor's global control surface — session, visibility, camera focus, assets, mode, RPC.
|
|
407
407
|
- `EditorLayerOverlays` (function): function EditorLayerOverlays({ document, visibility, selection, hoverId = null, onSelect, activePathPoint, groundHeightAt, }: { document: EditorDocument; visibility: EditorKindVisibility; selection: readonly string[]; /** Pre-selection hover id from viewport pointer pick; ignored when already select… — Renders every visible marker, volume, path, and note from a document as in-scene 3D gizmos.
|
|
408
408
|
- `EditorMcpTool` (interface): interface EditorMcpTool — One MCP tool descriptor — same verbs as the in-browser host RPC.
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
- `TerrainMode` (type): type TerrainMode = "sculpt" | "paint" — The terrain tool's active sub-mode: reshape the heightfield, or paint material layers onto it.
|
|
437
437
|
- `ViewportSelect` (const): const ViewportSelect: React.MemoExoticComponent<({ api, ui }: { api: EditorHostApi; ui: EditorUiStore; }) => null> — Canvas click-to-select and click-to-place. Document objects pick by screen proximity (registration always matches what you see) with click-cycling through stacked candidates and shift/ctrl additive selection; everything else picks by occlusion-ordered raycast against the tagged scene graph. When a placement tool is armed, clicks author new markers, volumes, notes, or path points at the ground hit instead of selecting.
|
|
438
438
|
- `VirtualWindow` (interface): interface VirtualWindow — The visible slice of a fixed-row-height list: which rows to mount and the spacer geometry.
|
|
439
|
-
- `assetsFromCatalog` (function): function assetsFromCatalog(ids: readonly string[], resolve?: (id: string) => { url?: string } | null): EditorAssetEntry[] — Turns a game's asset catalog ids into editor asset entries for the browser panel.
|
|
439
|
+
- `assetsFromCatalog` (function): function assetsFromCatalog(ids: readonly string[], resolve?: (id: string) => { url?: string; clips?: readonly string[] } | null): EditorAssetEntry[] — Turns a game's asset catalog ids into editor asset entries for the browser panel.
|
|
440
440
|
- `blankWorld` (function): function blankWorld(_seed = "standalone"): EnvironmentWorldFeature — The default flat-ground authoring canvas the standalone editor opens on when the host supplies none. Deliberately thin — bare sculptable ground under a clear default sky. Dressing (sky look, foliage scatter, props) is what the author adds here, written into the scene document; it is never pre-baked into the canvas. The `seed` parameter is legacy and unused.
|
|
441
441
|
- `createBlankPlayable` (function): function createBlankPlayable(options: BlankPlayableOptions = {}): PlayableGame — Builds a minimal gameless `PlayableGame` — a flat world plus an asset catalog — for the editor to mount over.
|
|
442
442
|
- `createDefaultAgentEndpoint` (function): function createDefaultAgentEndpoint(config: AgentEndpointConfig = resolveAgentEndpointConfig()): AgentEndpoint — Picks HTTP endpoint when `JGENGINE_EDITOR_AGENT_URL` (or config.url) is set, otherwise the offline local agent.
|
|
@@ -461,7 +461,7 @@
|
|
|
461
461
|
- `AssetBrowser` (function): function AssetBrowser({ assets, session, onPlace, }: { assets: readonly EditorAssetEntry[]; session: EditorSession; onPlace: (entry: EditorAssetEntry) => void; }): React.JSX.Element — Searchable panel for placing catalog assets or an empty marker into the scene.
|
|
462
462
|
- `EditorAssetEntry` (interface): interface EditorAssetEntry — A searchable, placeable asset shown in the editor's asset browser panel.
|
|
463
463
|
- `MATERIAL_DRAG_MIME` (const): const MATERIAL_DRAG_MIME: "application/x-jgengine-material" — Custom drag mime carrying a material id — read by hierarchy rows and the viewport drop zone.
|
|
464
|
-
- `assetsFromCatalog` (function): function assetsFromCatalog(ids: readonly string[], resolve?: (id: string) => { url?: string } | null): EditorAssetEntry[] — Turns a game's asset catalog ids into editor asset entries for the browser panel.
|
|
464
|
+
- `assetsFromCatalog` (function): function assetsFromCatalog(ids: readonly string[], resolve?: (id: string) => { url?: string; clips?: readonly string[] } | null): EditorAssetEntry[] — Turns a game's asset catalog ids into editor asset entries for the browser panel.
|
|
465
465
|
|
|
466
466
|
## @jgengine/editor/DebugDraw
|
|
467
467
|
|
|
@@ -470,7 +470,7 @@
|
|
|
470
470
|
|
|
471
471
|
## @jgengine/editor/EditorApp
|
|
472
472
|
|
|
473
|
-
- `EditorApp` (function): function EditorApp({ gameId, playable, layers, catalogs, save, modeChip, networkPresence }: EditorAppProps): React.JSX.Element — Top-level scene editor: author spawns/zones/paths/notes visually over edit, walk, or play modes.
|
|
473
|
+
- `EditorApp` (function): function EditorApp({ gameId, playable, layers, catalogs, save, modeChip, networkPresence, onExitEditor }: EditorAppProps): React.JSX.Element — Top-level scene editor: author spawns/zones/paths/notes visually over edit, walk, or play modes.
|
|
474
474
|
- `EditorAppProps` (interface): interface EditorAppProps — Props for mounting the scene editor over a playable game.
|
|
475
475
|
- `EditorSaveFn` (type): type EditorSaveFn = (json: string) => Promise<{ ok: boolean; path?: string; error?: string }> — Persists an exported document JSON; resolves with where it landed or why it failed.
|
|
476
476
|
|
|
@@ -480,7 +480,7 @@
|
|
|
480
480
|
|
|
481
481
|
## @jgengine/editor/EditorChrome
|
|
482
482
|
|
|
483
|
-
- `EditorChrome` (function): function EditorChrome({ gameId, session, api, assets, ui, baselineDocument, save, networkSnapshot, importAsset = importAssetToHost, onRegisterAsset, }: { gameId: string; session: EditorSession; api: EditorHostApi; assets: readonly EditorAssetEntry[]; ui: EditorUiStore; /** The document
|
|
483
|
+
- `EditorChrome` (function): function EditorChrome({ gameId, session, api, assets, ui, baselineDocument, save, networkSnapshot, importAsset = importAssetToHost, onRegisterAsset, onExitEditor, }: { gameId: string; session: EditorSession; api: EditorHostApi; assets: readonly EditorAssetEntry[]; ui: EditorUiStore; /** The document… — The full editor UI shell — global app bar, contextual scene toolbar, workspace rail, resizable hierarchy/inspector docks, tabbed bottom dock (content browser, console, profiler, AI assistant), viewport overlays, and status bar — wired to the session, UI store, layout store, and host RPC. Mounted by `EditorApp`; not a game-author entry point.
|
|
484
484
|
|
|
485
485
|
## @jgengine/editor/PerfProbe
|
|
486
486
|
|
|
@@ -613,6 +613,10 @@
|
|
|
613
613
|
|
|
614
614
|
- `runtimeHandlers` (const): const runtimeHandlers: Pick< HandlerTable, | "push_document_patch" | "pull_document_patches" | "document_revision" | "push_runtime_delta" | "pull_runtime_deltas" | "runtime_snapshot" | "runtime_summary" | "runtime_get" | "runtime_set" | "runtime_pause" | "runtime_resume" | "runtime_step" | "set_runt… — Live-sync document patches, the ephemeral runtime reverse channel, and play-mode poke verbs.
|
|
615
615
|
|
|
616
|
+
## @jgengine/editor/handlers/streets
|
|
617
|
+
|
|
618
|
+
- `streetsHandlers` (const): const streetsHandlers: Pick<HandlerTable, "generate_streets"> — Document, selection, camera, mode, asset placement, and status verbs.
|
|
619
|
+
|
|
616
620
|
## @jgengine/editor/handlers/terrain
|
|
617
621
|
|
|
618
622
|
- `terrainHandlers` (const): const terrainHandlers: Pick< HandlerTable, | "create_terrain" | "sculpt_terrain" | "terrain_summary" | "paint_terrain" | "fill_terrain" | "auto_paint" | "terrain_materials" | "terrain_layers" | "set_terrain_layers" | "blend_terrain" | "convert_scatter" | "add_foliage" | "scatter_summary" > — Sculpt heightfield, material painting, terrain layers, and foliage/scatter verbs.
|
|
@@ -681,6 +685,26 @@
|
|
|
681
685
|
- `EDITOR_MCP_TOOLS` (const): const EDITOR_MCP_TOOLS: readonly EditorMcpTool[] — Full set of MCP tools an agent can call to drive the live scene editor.
|
|
682
686
|
- `EditorMcpTool` (interface): interface EditorMcpTool — One MCP tool descriptor — same verbs as the in-browser host RPC.
|
|
683
687
|
|
|
688
|
+
## @jgengine/editor/modelAnimationAuthoring
|
|
689
|
+
|
|
690
|
+
- `AnimationMode` (type): type AnimationMode = "default" | "auto" | "none" | "custom" — Which authoring mode a stored setting represents. `default` = no override key.
|
|
691
|
+
- `AnimationSetting` (type): type AnimationSetting = AuthoredAnimationConfig | "auto" | "none" — The value stored at `meta.animation`.
|
|
692
|
+
- `AuthoredAnimationConfig` (interface): interface AuthoredAnimationConfig — Structurally compatible with `ModelAnimationConfig`, but every field optional for authoring.
|
|
693
|
+
- `AuthoredAnimationStates` (interface): interface AuthoredAnimationStates — Role->clip override map persisted inside an authored animation config.
|
|
694
|
+
- `LOCOMOTION_NUMBERS` (const): const LOCOMOTION_NUMBERS: readonly ["walkSpeed", "runSpeed", "fadeSec"] — Numeric locomotion tunings (`ModelAnimationStates`).
|
|
695
|
+
- `LocomotionNumber` (type): type LocomotionNumber = (typeof LOCOMOTION_NUMBERS)[number] — Numeric locomotion tuning field on an authored animation config (walkSpeed/runSpeed/fadeSec).
|
|
696
|
+
- `LocomotionRole` (type): type LocomotionRole = (typeof LOCOMOTION_ROLES)[number] — Locomotion clip role a placement can override (idle/walk/run).
|
|
697
|
+
- `ONE_SHOT_EVENTS` (const): const ONE_SHOT_EVENTS: readonly ["attack", "hit", "death", "jump", "interact", "cheer"] — One-shot event slots offered in the inspector. `hit` / `death` auto-fire on this entity's `combat.hitReaction` / `entity.died`; the rest fire when the game calls `playEntityAnimation`.
|
|
698
|
+
- `OneShotEvent` (type): type OneShotEvent = (typeof ONE_SHOT_EVENTS)[number] — One-shot animation event a placement can bind a clip to (attack/hit/death/...).
|
|
699
|
+
- `animationMetaPatch` (function): function animationMetaPatch(setting: AnimationSetting | undefined): { animation: AnimationSetting | undefined } — The meta patch that persists a setting (or clears the override when undefined). Shallow-merges onto `marker.meta` via `setMarker`; an undefined value drops out of the saved JSON document.
|
|
700
|
+
- `animationMode` (function): function animationMode(setting: AnimationSetting | undefined): AnimationMode — The authoring mode a stored setting maps to.
|
|
701
|
+
- `defaultCustomConfig` (function): function defaultCustomConfig(clips: readonly string[]): AuthoredAnimationConfig — A concrete custom config derived from a rigged asset's clip roles — the `custom` mode seed.
|
|
702
|
+
- `readAnimationSetting` (function): function readAnimationSetting(meta: Record<string, unknown> | undefined): AnimationSetting | undefined — Reads and shape-validates the animation override from a marker's meta; undefined when absent/invalid.
|
|
703
|
+
- `setAnimationMode` (function): function setAnimationMode(setting: AnimationSetting | undefined, mode: AnimationMode, clips: readonly string[] = []): AnimationSetting | undefined — Switches authoring mode. `custom` seeds from the asset's clip-role defaults (so the user starts from a working config, then overrides) when there is no existing object config; the other modes are the bare string/undefined values.
|
|
704
|
+
- `setLocomotionClip` (function): function setLocomotionClip(setting: AnimationSetting | undefined, role: LocomotionRole, clipName: string | null): AuthoredAnimationConfig — Sets or clears (null) a locomotion state clip; forces the setting into `custom`.
|
|
705
|
+
- `setLocomotionNumber` (function): function setLocomotionNumber(setting: AnimationSetting | undefined, key: LocomotionNumber, value: number | null): AuthoredAnimationConfig — Sets or clears (null) a numeric locomotion tuning.
|
|
706
|
+
- `setOneShotClip` (function): function setOneShotClip(setting: AnimationSetting | undefined, event: string, clipName: string | null): AuthoredAnimationConfig — Binds or clears (null) a one-shot event to a clip.
|
|
707
|
+
|
|
684
708
|
## @jgengine/editor/networkSnapshot
|
|
685
709
|
|
|
686
710
|
- `EditorNetworkAdapterKind` (type): type EditorNetworkAdapterKind = MultiplayerAdapterConfig["kind"] | "unknown" — Transport kind declared by the game, or `"unknown"` when the config is unreadable.
|
|
@@ -724,7 +748,7 @@
|
|
|
724
748
|
|
|
725
749
|
## @jgengine/editor/shell/BottomDock
|
|
726
750
|
|
|
727
|
-
- `BottomDock` (function): function BottomDock({ tab, onSelectTab, onClose, assets, session, api, consoleStore, perfHistory, browserView, onSetBrowserView, onPlaceAsset, onImportModels, importBusy, }: { tab: BottomDockTab; onSelectTab: (tab: BottomDockTab) => void; onClose: () => void; assets: readonly EditorAssetEntry[]
|
|
751
|
+
- `BottomDock` (function): function BottomDock({ tab, onSelectTab, onClose, assets, session, api, ui, consoleStore, perfHistory, browserView, onSetBrowserView, onPlaceAsset, onImportModels, importBusy, }: { tab: BottomDockTab; onSelectTab: (tab: BottomDockTab) => void; onClose: () => void; assets: readonly EditorAssetEntry[];… — Tabbed bottom dock: Content Browser, Console, Profiler, Animation (path flythrough scrub), and the AI Assistant. Only the active tab's panel mounts, so hidden tools cost nothing per frame.
|
|
728
752
|
|
|
729
753
|
## @jgengine/editor/shell/CommandPalette
|
|
730
754
|
|
|
@@ -760,7 +784,7 @@
|
|
|
760
784
|
|
|
761
785
|
## @jgengine/editor/shell/TopAppBar
|
|
762
786
|
|
|
763
|
-
- `TopAppBar` (function): function TopAppBar({ gameId, dirty, saveState, lastSavedAt = null, saveAvailable, saveError, canUndo, canRedo, onUndo, onRedo, onSave, onPlay, onWalk, onHud, onImport, onExport, onCopyJson, onOpenPalette, onToggleHelp, onResetLayout, }: { gameId: string;
|
|
787
|
+
- `TopAppBar` (function): function TopAppBar({ gameId, onExitToGame, dirty, saveState, lastSavedAt = null, saveAvailable, saveError, canUndo, canRedo, onUndo, onRedo, onSave, onPlay, onWalk, onHud, onImport, onExport, onCopyJson, onOpenPalette, onToggleHelp, onResetLayout, }: { gameId: string; /** When set (editor summoned o… — Global application bar: identity + save state on the left, command palette in the center, history / run controls / document actions on the right. Pause and Step stay disabled in edit mode; Play mode mounts {@link PlayModeBar}, which wires the same controls to the runtime pause/step RPCs so mode switches keep shell chrome.
|
|
764
788
|
- `TopBarSaveState` (type): type TopBarSaveState = "idle" | "saving" | "saved" | "error" — Document save lifecycle mirrored from `useDocumentSave`.
|
|
765
789
|
|
|
766
790
|
## @jgengine/editor/shell/ViewportOverlays
|
|
@@ -780,6 +804,25 @@
|
|
|
780
804
|
- `createCameraTelemetry` (function): function createCameraTelemetry(): CameraTelemetry — Creates a telemetry record seeded at rest (identity basis).
|
|
781
805
|
- `getCameraTelemetry` (function): function getCameraTelemetry(): CameraTelemetry — Shared telemetry singleton — probe and widget may mount in different React trees.
|
|
782
806
|
|
|
807
|
+
## @jgengine/editor/shell/clipPreview
|
|
808
|
+
|
|
809
|
+
- `ClipEntry` (interface): interface ClipEntry — One previewable clip with its detected semantic role (null when unclassified).
|
|
810
|
+
- `ClipPreviewSession` (interface): interface ClipPreviewSession — The live clip-preview session shared across panels via the editor UI store: which asset is being previewed, the playback driver, and the selected clip's measured duration (published by the viewport layer once its GLB loads; 0 while unknown).
|
|
811
|
+
- `ClipPreviewSource` (interface): interface ClipPreviewSource — A rigged asset resolved for viewport preview: its catalog id, label, GLB url, and clip names.
|
|
812
|
+
- `ClipPreviewState` (interface): interface ClipPreviewState — Playback state of the clip preview driver. `time` is seconds into the clip.
|
|
813
|
+
- `MAX_PREVIEW_SPEED` (const): const MAX_PREVIEW_SPEED: 4 — Upper bound for the clip-preview playback rate.
|
|
814
|
+
- `MIN_PREVIEW_SPEED` (const): const MIN_PREVIEW_SPEED: 0.1 — Lowest / highest preview playback rate the speed control allows.
|
|
815
|
+
- `advancePreview` (function): function advancePreview(state: ClipPreviewState, dt: number, duration: number): ClipPreviewState — Advances the playhead by `dt` seconds at the current speed, wrapping when looping and clamping (then stopping) at `duration` otherwise. No-op while paused, clip-less, or the duration is unknown (<= 0). Uses the same time += speed·dt formula the shell mixer runs, so a panel that ticks this in lockstep with the freerunning viewport mixer stays in sync.
|
|
816
|
+
- `clipEntriesFromRef` (function): function clipEntriesFromRef(ref: ClipSourceRef | null | undefined): ClipEntry[] — Lists a rigged asset's clips with their classified roles, preserving catalog order. Empty when the ref carries no clips (not rigged, or clip metadata absent).
|
|
817
|
+
- `initialClipPreviewState` (function): function initialClipPreviewState(clipName: string | null = null): ClipPreviewState — Fresh driver state for a clip (auto-plays when a clip is given, like the browser badge implies).
|
|
818
|
+
- `previewAnimationConfig` (function): function previewAnimationConfig(state: ClipPreviewState): ModelAnimationConfig | undefined — The `ModelConfig.animation` config the preview layer feeds to `useModelAnimation`. Playing yields a freerunning single-clip config (mixer owns the clock, no per-frame churn); paused yields a held `paused`+`time` pose so a scrub renders the exact frame. Returns undefined with no clip (bind pose).
|
|
819
|
+
- `scrubPreview` (function): function scrubPreview(state: ClipPreviewState, time: number): ClipPreviewState — Scrub to an absolute time (seconds). Pauses playback, matching the path-flythrough scrubber.
|
|
820
|
+
- `selectPreviewClip` (function): function selectPreviewClip(state: ClipPreviewState, clipName: string): ClipPreviewState — Switch to a different clip: resets the playhead and starts playing it.
|
|
821
|
+
- `setPreviewLoop` (function): function setPreviewLoop(state: ClipPreviewState, loop: boolean): ClipPreviewState — Sets whether the previewed clip loops when it reaches its end.
|
|
822
|
+
- `setPreviewPlaying` (function): function setPreviewPlaying(state: ClipPreviewState, playing: boolean): ClipPreviewState — Sets whether the previewed clip is playing; pausing keeps the current scrub time.
|
|
823
|
+
- `setPreviewSpeed` (function): function setPreviewSpeed(state: ClipPreviewState, speed: number): ClipPreviewState — Sets the preview playback rate, clamped to [MIN_PREVIEW_SPEED, MAX_PREVIEW_SPEED].
|
|
824
|
+
- `togglePreviewPlaying` (function): function togglePreviewPlaying(state: ClipPreviewState): ClipPreviewState — Toggles play/pause of the previewed clip without losing the scrub position.
|
|
825
|
+
|
|
783
826
|
## @jgengine/editor/shell/commandRegistry
|
|
784
827
|
|
|
785
828
|
- `PaletteCommand` (interface): interface PaletteCommand — One executable command-palette entry.
|