Advanced

Changelog

All notable changes to Motion Core will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.


This page is auto-generated from CHANGELOG.md in the repository root.

Unreleased

0.5.0 - 2026-03-30

Added

  • Added first-class compute support with new ComputePass and PingPongComputePass exports in root, core, Svelte, and React entrypoints.
  • Added storageBuffers material definitions with runtime validation (size, type, access, initialData) and immutable material snapshots.
  • Added storage-focused texture options for compute workflows (storage, format, width, height, fragmentVisible).
  • Added FrameState.writeStorageBuffer(...) and FrameState.readStorageBuffer(...) APIs for runtime CPU↔GPU storage-buffer workflows.
  • Added compute-shader contract/codegen utilities with strict @compute @workgroup_size(...) fn compute(...) validation and workgroup-size extraction.
  • Added broad compute/storage test coverage, including pass behavior, shader generation, storage runtime read/write, renderer integration, and public API snapshots.
  • Added expanded runtime error classification coverage with dedicated codes for material preprocessing, compute-contract violations, runtime resource binding failures, storage read/write bounds failures, render-graph validation failures, ping-pong configuration failures, and invalid uniform payloads.

Changed

  • Updated pass plumbing from render-only arrays to mixed AnyPass[], allowing render and compute passes to coexist in one graph.
  • Updated renderer internals to allocate/manage storage buffers and storage textures, cache compute pipelines, and flush pending storage writes during frame submission.
  • Updated material resolution/signature inputs to include storage buffer definitions and storage texture bindings, triggering deterministic rebuilds when those contracts change.
  • Updated benchmark/runtime frame-state mocks to include the new storage-buffer APIs.
  • Updated runtime-context presentation to structured multi-line formatting with pretty-printed materialSignature JSON and list-based passGraph/target sections.

Fixed

  • Added explicit compute compilation error normalization with COMPUTE_COMPILATION_FAILED classification and recovery metadata.
  • Fixed compute-only pass plans to resolve a valid final output path for canvas presentation.

0.4.2 - 2026-03-22

Changed

  • Migrated the @motion-core/motion-gpu package build pipeline from svelte-package to Vite 8 (Rolldown) while preserving multi-entrypoint ESM output (core, react, svelte, and advanced entrypoints).
  • Replaced declaration emission with a dedicated svelte2tsx step (svelte-shims-v4) and kept declaration maps enabled for published types.
  • Upgraded packages/motion-gpu from Vite 7 to Vite 8, including @sveltejs/vite-plugin-svelte compatibility updates.

Fixed

  • Restored package sourcemap emission by publishing dist/**/*.js.map generated by the build toolchain.

0.4.1 - 2026-03-22

Fixed

  • Locked the Svelte MotionGPUErrorOverlay to a dark token palette and refined overlay surfaces so source tabs/code blocks render consistently regardless of host theme.
  • Matched the React MotionGPUErrorOverlay structure and styling 1:1 with the Svelte overlay implementation.
  • Fixed missing WebGPU type globals in published declarations by patching dist/*.d.ts with @webgpu/types references and keeping d.ts.map line mappings aligned after the header injection.

0.4.0 - 2026-03-22

Added

  • Added full React adapter support with dedicated react and react/advanced package entrypoints.
  • Added React FragCanvas runtime integration, including error overlay and portal support.
  • Added React runtime context/frame hooks and typed user-context helpers.
  • Added React useTexture hook parity with runtime texture workflows.
  • Added React adapter test coverage across runtime, hooks, context, portal, and public API integration.
  • Added TSX support to the docs Shiki highlighter.

Changed

  • Updated package metadata and peer dependencies to include React/React DOM support.
  • Expanded README and docs to cover React adapter setup, usage, and advanced APIs.
  • Updated docs hero copy and replaced the hero preview image asset.

Fixed

  • Added support for lazy options inputs in Svelte useTexture.
  • Adopted Svelte attachments patterns in adapter components for parity and consistency.

0.3.0 - 2026-03-21

Added

  • Added structured runtime error metadata: stable code, severity, and recoverability fields in normalized error reports.
  • Added runtime context attachment to shader diagnostics for better compile/runtime triage.
  • Added an optional runtime error history buffer in the FragCanvas runtime flow.
  • Normalized useTexture hook failures into MotionGPUErrorReport payloads.

Changed

  • Added explicit .js specifiers in published ESM paths for better cross-runtime compatibility.
  • Extracted a shared fullscreen pass pipeline lifecycle used by fullscreen pass implementations.
  • Added Context7 links in root/package documentation for AI documentation access.
  • Changed default error dialog font weight in MotionGPUErrorOverlay from 300 to 400.

Fixed

  • Guarded the runtime loop against exceptions thrown inside user onError handlers.
  • Deduplicated repeated runtime error reports to reduce duplicate reporting noise.
  • Deduplicated CurrentWritable#set() updates to skip redundant reactive notifications.
  • Fixed error overlay source label mapping to consistently use mapped source labels.

Performance

  • Improved uniform upload batching by merging nearby dirty ranges before writeBuffer calls.
  • Added a configurable threshold for dirty-range merge behavior.

Documentation

  • Aligned error-reporting docs with the latest runtime API.

0.2.0 - 2026-03-14

Added

  • Added explicit multi-layer entrypoints: root (@motion-core/motion-gpu), advanced, svelte, svelte/advanced, core, and core/advanced.
  • Split and standardized API documentation by domain (core, hooks, material, passes, advanced).
  • Added named render-target pass graph support for multi-pass pipelines.
  • Added advanced scheduler helpers and expanded scheduler diagnostics workflows.
  • Added source-mapped shader diagnostics overlay and improved fragment-contract diagnostics.
  • Added benchmark baselines and expanded unit/e2e test coverage for runtime paths.

Changed

  • Refactored architecture to separate framework-agnostic core from the Svelte adapter layer.
  • Split user context API into dedicated read/write operations.
  • Prepared package metadata and publish workflow for public npm distribution.

Fixed

  • Stabilized FragCanvas sizing and frame payload synchronization.
  • Hardened scheduler dependency validation and init-error recovery behavior.
  • Improved texture lifecycle management (blob eviction, allocation reuse, metadata preservation, reload reliability).
  • Reduced idle RAF work in manual and on-demand modes and improved wakeups on context changes.

0.1.0 - 2026-02-27

Added

  • Initial MotionGPU release with FragCanvas as the primary Svelte runtime entrypoint.
  • Material pipeline with immutable defineMaterial contracts and runtime material hot-swap support.
  • Typed uniform system with runtime layout validation and dirty-range uploads.
  • Texture pipeline with WGSL bindings, sampler configuration, mipmap/anisotropy/video support, and useTexture.
  • Frame scheduler with staged useFrame tasks, invalidation control, diagnostics, and profiling hooks.
  • Render graph with fullscreen pass primitives and named render targets.
  • Error handling pipeline for WebGPU device-loss/uncaptured errors with fullscreen overlay support.
  • Shader preprocessing via includes/defines and compile diagnostics mapping.
  • Namespaced user-context APIs for plugin-like integrations.
  • Core tests and TypeScript hardening across runtime/public API behavior.