68 Commits

Author SHA1 Message Date
konstantin-paulus
5481035f17 Implement horizontal and vertical constraints in the inspector
- Added `horizontalConstraintName` and `verticalConstraintName` functions to map constraint types to their respective names.
- Updated `ConstraintsRow` component to utilize these functions for setting `constrainX` and `constrainY` properties.
- Introduced `HORIZONTAL_CONSTRAINTS` and `VERTICAL_CONSTRAINTS` constants in the runtime to define available constraints.
- Enhanced documentation to clarify the behavior of `constrainX` and `constrainY` properties in the JSX elements reference.
2026-09-03 23:17:50 +02:00
konstantin-paulus
c55b03d434 Enhance Redraw example with resolution handling
- Updated `11-redraw.tsx` to incorporate `useResolution`, ensuring sharp rendering at any export size by adapting the bitmap to the display's pixel ratio.
- Modified the `draw` function to accept a resolution parameter, allowing dynamic adjustments during rendering.
- Enhanced documentation in `README.md` to reflect the new resolution handling feature in the Redraw example.
2026-09-01 14:58:28 +02:00
konstantin-paulus
44f3a081fc Add TypeGPU caustics example and update documentation
- Introduced a new example file `10-typegpu.tsx` demonstrating an underwater caustics shader using TypeGPU and Solid.js.
- Implemented shader functionality with adjustable parameters for tile density, speed, fog color, and ambient light.
- Updated `README.md` to include the new example and installation instructions for required packages.
- Enhanced `module.md` with details on using TypeGPU's compile-time plugins in the project's Babel configuration.
2026-09-01 13:36:27 +02:00
konstantin-paulus
b06d72388e Add export functionality to CLI with configurable settings
- Introduced new export command in the CLI to encode scenes into video files, utilizing settings from the project's package.json.
- Added types for export formats and settings, including video and audio configurations.
- Implemented exportScene function to handle the export process and output results.
- Updated README.md to include documentation for the new export command.
2026-09-01 10:40:24 +02:00
konstantin-paulus
4c53ded4ca Enhance timeline functionality and state management
- Updated the `EXCLUDED_PROPS` in `history.ts` to include 'timeline', ensuring proper state handling.
- Introduced `reportView` function in `controller.ts` to track timeline view changes, integrating it into the timeline update process.
- Modified `timeline.ts` to call `updateTimelineTransform` every draw pass, improving responsiveness to view changes.
- Added `timeline` property to `SceneProps` in `types.ts` to store the scene's timeline viewport state.
- Updated documentation to reflect the new `timeline` property and its implications for scene state management.
2026-08-31 12:03:21 +02:00
konstantin-paulus
f2728f616b Update keyframe documentation to clarify source-local time semantics
- Revised the `KeyframeProps` type definition to specify that `time` is source-local, meaning it refers to the source's first frame rather than the clip's start.
- Enhanced the `keyframes.md` documentation to reflect this change, providing clearer guidance on how keyframes relate to trimmed clips and playback rates.
- Added an example to illustrate the impact of `sourceIn` on keyframe timing, improving understanding for developers.
2026-08-31 11:28:12 +02:00
konstantin-paulus
914c2222aa Enhance @inspect variable functionality and UI controls
- Added support for boolean and select types in the @inspect annotation, allowing for more diverse variable configurations.
- Implemented UI controls for boolean toggles and select dropdowns in the inspector, improving user interaction.
- Updated the inspect plugin to validate options for select types and ensure proper initialization.
- Enhanced documentation to reflect the new variable types and their usage in the inspector.
2026-08-29 13:25:06 +02:00
konstantin-paulus
d9cc6b0819 Add @inspect variable support in editor and inspector
- Introduced the `@inspect` annotation for top-level constants, allowing live editing through the inspector.
- Implemented the `VariablesSettings` component to manage and display `@inspect` variables in the sidebar.
- Enhanced the editor to handle variable edits, ensuring changes are reflected in the source code.
- Updated the history management to track variable changes, allowing for undo functionality.
- Added utility functions to manage `@inspect` entries within the project, ensuring consistent access across components.
2026-08-29 13:18:15 +02:00
konstantin-paulus
22c75e7e26 Update capture command to render scene frames and improve documentation
- Modified the `capture` command to render single frames of a scene instead of a node, ensuring the output matches the export's encoding.
- Updated command descriptions and argument details to reflect the new functionality, including changes to the time reference and scene handling.
- Enhanced documentation for the `capture` command and related references to clarify usage and expected behavior.
- Improved error messages for invalid scene captures, guiding users to capture the correct scene id.
2026-08-27 12:08:41 +02:00
konstantin-paulus
cb30dc839d Enhance file system handling with real path support
- Added a new channel `PROJECTS_FS_REAL_PATH` to resolve the real path of a given source, accommodating symbolic links.
- Updated the `listEntries` function to include a `link` property for entries that are symbolic links, improving asset management.
- Introduced the `realPathEntry` function to handle symlink resolution, ensuring accurate path retrieval.
- Enhanced the `removeEntry` function to prevent deletion of files outside the project directory, maintaining project integrity.
- Updated documentation to clarify symlink handling and the implications of linked assets in the project.
2026-08-27 11:07:24 +02:00
konstantin-paulus
9a4d56311c Update documentation and examples for anime.js integration
- Replaced references to GSAP with anime.js in the JSX documentation, ensuring consistency with the current animation framework.
- Updated code examples to reflect the new anime.js syntax and functionality, enhancing clarity for users transitioning from GSAP.
- Improved explanations regarding timeline creation and usage, emphasizing the benefits of using anime.js for frame-accurate animations.
2026-08-27 10:36:33 +02:00
konstantin-paulus
e6838d4abd Enhance asset handling and documentation for symlink support
- Updated the `listEntries` function in `projects.ts` to include support for symbolic links, ensuring they are treated as valid entries.
- Revised the `media.md` documentation to clarify the handling of symlinks in the asset library, emphasizing the benefits of linking over copying files.
- Improved the description of the `assets/` directory in `module.md` to reflect the inclusion of symlinks and their role in the asset management process.
2026-08-27 09:48:52 +02:00
konstantin-paulus
aea37e16ce Add dapi check command for structural analysis of nodes
- Introduced a new command `dapi check` to analyze a node's subtree for structural issues, including black frames, never-visible nodes, and source errors.
- Implemented types for check requests and results, detailing the structure of issues found during analysis.
- Added a new `check.ts` file to handle the logic for checking nodes, including coverage calculations and issue reporting.
- Updated the `README.md` and reference documentation to include usage instructions and details about the new command.
- Enhanced the CLI with a new command option for checking node integrity without rendering, providing instant feedback on potential issues in the project.
2026-08-26 19:23:29 +02:00
konstantin-paulus
df23d9c649 Update project and media documentation for asset handling
- Revised the description of the `assets/` directory in `projects.ts` to clarify its role in the library and the handling of media files.
- Expanded the `media.md` documentation to include instructions on adding assets to the library, detailing the process for importing files and managing image sequences.
- Updated the `README.md` to reflect changes in the `media.md` section, ensuring consistency in documentation across the project.
2026-08-26 16:25:47 +02:00
konstantin-paulus
5bd5076cf0 Refactor aspect ratio handling in layout and resizing logic
- Updated the `LayoutPanel` component to improve aspect ratio management by introducing a `lockedRatio` function, which determines the aspect ratio based on the current dimensions or authored values.
- Simplified the `resize` function to utilize the new `lockedRatio` for enforcing aspect ratios during resizing operations.
- Enhanced the `toggleAspectRatio` function to directly edit the `keepAspectRatio` property, streamlining the locking mechanism.
- Added documentation for the `keepAspectRatio` property in relevant types and reference materials, clarifying its purpose and usage in the editor.
2026-08-26 10:21:42 +02:00
konstantin-paulus
66051a5b86 Refine canvas handling and opacity management in rendering
- Updated the canvas creation in `createCapture` to ensure it remains within the viewport and utilizes `will-change:opacity` for better performance.
- Modified the `AnimeTimeline` component to use `opacity` for text dimming while clarifying the limitations of using fractional opacity on painted boxes in captures.
- Enhanced documentation in `html.md` to provide clearer guidance on the effects of nested opacity on rendering and captures.
2026-08-25 21:04:51 +02:00
konstantin-paulus
0197f51299 Improve canvas handling and error logging in rendering
- Updated the canvas creation in `createCapture` to ensure it remains within the viewport, preventing issues with cached paints and blank captures.
- Enhanced the `AnimeTimeline` component to use alpha colors instead of opacity for better rendering during animations, avoiding subtree blanking.
- Introduced a `WeakSet` in `render.ts` to track failed HTML roots, preventing console flooding by logging errors only once per root.
- Clarified documentation regarding nested opacity effects on captures to improve user understanding of rendering limitations.
2026-08-25 19:21:33 +02:00
konstantin-paulus
fb241b9851 Refactor stage and scene components to include camera and active properties
- Updated all example files and relevant documentation to incorporate the `camera` property in the `<stage>` component, ensuring proper framing for various scene dimensions.
- Marked one scene as `active` in each example to prevent projects from opening on an empty timeline, enhancing usability and clarity in project structure.
- Adjusted the `StageProps` and `SceneProps` types to reflect the new requirements for camera and active properties, improving type safety and documentation accuracy.
2026-08-25 16:43:40 +02:00
konstantin-paulus
572425a511 Enhance useTicker with hold functionality for async work
- Introduced the `hold` method in the `useTicker` hook to manage async operations, ensuring frames wait for necessary resources before sampling.
- Updated example files to utilize the `hold` method for loading models and setting up WebGPU devices, improving frame accuracy during exports and captures.
- Added documentation for the `hold` method, detailing its purpose and usage in managing async work within the rendering pipeline.
- Implemented a timeout mechanism for held promises to prevent indefinite waits during rendering.
2026-08-25 16:31:49 +02:00
konstantin-paulus
0e68a5d8e4 Enhance context reporting in CLI and DAPI
- Updated the CLI context command description to clarify the information reported, including the application root folder and project details.
- Modified the DAPI context handling to return both the projects root directory and the open project directory, improving the context information available when no project is open.
- Adjusted related documentation to reflect the new structure of the context report, ensuring consistency and clarity for users.
2026-08-25 15:27:56 +02:00
konstantin-paulus
e0e9b761bb Implement syncTo feature for audio/video alignment
- Added support for the `syncTo` trait, allowing elements to align their playback based on the timing of another element's recording.
- Introduced `PendingSync` to manage in-progress sync requests and ensure proper correlation between audio and video sources.
- Enhanced the asset system to handle sync requests, including error handling for cycles and missing sources.
- Updated documentation to reflect the new `syncTo` functionality and its implications for element placement and playback management.
2026-08-25 15:11:39 +02:00
konstantin-paulus
11fecc09ea Refactor example files to use <stage> and <scene> components
- Updated all example files to replace <rect> with <stage> and <scene> for improved structure and consistency.
- Enhanced the README.md to reflect the new project entry format for examples.
- Added a new dependency on "koota" in package.json for better integration.
- Improved documentation and comments throughout the examples for clarity.
2026-08-25 14:32:48 +02:00
konstantin-paulus
3099d1c122 Refactor asset reference handling and improve media command descriptions
- Updated the `AssetRef` type to only accept paths, simplifying asset reference management.
- Refactored media command descriptions to clarify that local files and URLs can be used without an open project, while library paths require one.
- Enhanced error handling in media commands to specify when paths cannot be resolved, improving user feedback.
- Removed the deprecated `ShellApi` component and integrated its functionality into the new `EditorApi` for better organization and clarity.
2026-08-25 10:27:25 +02:00
konstantin-paulus
8eafe46f16 Update capture functionality and documentation for node IDs
- Changed the `id` type in `CaptureRequest` from number to string to accommodate JSX element IDs.
- Refactored the `resolveNode` function to handle string IDs, improving error handling for ambiguous and non-existent nodes.
- Updated the `README.md` and `capture.md` to clarify the expected format for node IDs, including the use of `file:id` for disambiguation.
- Enhanced the `dapi capture` command documentation to reflect changes in ID handling and provide clearer usage instructions.
2026-08-24 10:58:54 +02:00
konstantin-paulus
963f3c1f6f Enhance project management commands and documentation
- Added the `dapi open` command to launch the app and open or create a project folder, with updates to the `README.md` and `projects.ts` for clarity.
- Implemented `initProject` function to initialize project folders, ensuring they can be opened from any location on disk.
- Updated the `main-channels.ts` and `main.ts` to handle new project initialization requests.
- Enhanced the database schema to support project root types, allowing for better project organization and retrieval.
- Improved the IPC layer to manage multiple routers for different command contexts, ensuring efficient command handling.
2026-08-24 10:26:09 +02:00
konstantin-paulus
b9f3aafd96 Update dapi context command documentation and implementation
- Revised the `dapi context` command description in `README.md`, `index.ts`, and `projects.ts` to clarify its purpose in reporting the current project and playhead position.
- Enhanced the `handleContextGet` function to return detailed project information, including project ID, name, directory, and frame rate.
- Updated the API response structure in `context.ts` to reflect the new project context format, ensuring accurate data representation for users.
- Improved documentation in `context.md` and `README.md` to provide clearer guidance on the command's functionality and expected output.
2026-08-24 09:48:15 +02:00
konstantin-paulus
05bbc303ea Update project and module documentation for npm package handling
- Revised the documentation in `projects.ts` to clarify that npm packages are treated as standard packages, allowing for direct installation and bundling from `node_modules`.
- Updated `module.md` to reflect changes in userland package resolution, emphasizing the need for browser compatibility and the removal of CDN fallback.
- Enhanced clarity on local imports and the handling of type declarations for userland packages, ensuring accurate guidance for developers.
2026-08-23 23:50:12 +02:00
konstantin-paulus
a4ab6440b0 Refactor media selection and generation handling in the ActionBar and PromptInput components
- Introduced `useMediaSelection` to streamline the management of selected image and video nodes.
- Updated `ActionBar` to utilize the new media selection logic, simplifying the determination of media types.
- Refactored `PromptInputActions` to leverage `useMediaSelection`, enhancing clarity and reducing complexity in handling selected nodes.
- Removed obsolete functions related to media type determination, improving code maintainability.
- Added new constants for voice model and aspect ratio dimensions in `config.ts`, enhancing configurability for media generation.
2026-08-22 15:20:57 +02:00
konstantin-paulus
e3d7d84150 Enhance project management with nanoid integration and channel updates
- Added `nanoid` dependency for generating unique project IDs, ensuring stable identification across renames.
- Introduced `PROJECTS_RESOLVE` channel to resolve project references by ID or folder name, improving project retrieval.
- Updated project-related functions to utilize the new ID system, enhancing consistency in project management.
- Refactored project handling in various components to accommodate the new project structure, ensuring seamless integration with existing functionality.
- Adjusted routing to reflect project IDs in URLs, maintaining user experience during project renaming.
2026-08-21 13:37:47 +02:00
konstantin-paulus
3e8602d407 Add adjustment layer support to JSX and reconciler
- Introduced `<adjustmentLayer>` element to the JSX framework, allowing for transformations on the clip below it without drawing its own content.
- Updated type definitions to include `AdjustmentLayerProps` for better type safety and documentation.
- Enhanced the reconciler to handle the new adjustment layer entity, ensuring proper integration within the document structure.
- Added comprehensive documentation for the adjustment layer, detailing its functionality and usage examples.
- Improved overall code organization and readability across affected components, setting the stage for future enhancements.
2026-08-20 15:42:20 +02:00
konstantin-paulus
38bc44805b Refactor AppearanceSettings and update keyframe handling
- Refactored `AppearanceSettings` to utilize new hooks from `@diffusionstudio/koota-solid`, improving state management for opacity, blend modes, visibility, and corner radii.
- Enhanced keyframe handling by integrating `syncKeyframe` and `removeKeyframeTrack` functions, ensuring smoother animations and property edits.
- Updated the `Keyframe` component to support new properties and improve interaction with the editor, enhancing user experience.
- Replaced `Keyframe` imports across various components to use the new `keyframe-bitecs` module, ensuring consistency in keyframe management.
- Documented changes in migration notes to reflect updates in appearance settings and keyframe functionality.
2026-08-19 17:14:17 +02:00
konstantin-paulus
ac181f985e Update asset management and enhance project features
- Added support for asset manifests with read and write capabilities, allowing for better organization of project assets.
- Introduced new project channels for manifest reading and writing, enhancing communication between main and renderer processes.
- Improved file system interactions with new methods for listing, statting, and removing project files, streamlining asset management.
- Updated package dependencies to include `yaml` for manifest handling and linked `@diffusionstudio/assets` for asset management.
- Refactored existing code to integrate new asset handling features and improve overall project structure.
2026-08-19 11:11:02 +02:00
konstantin-paulus
c88f7ff25f Add mask support to <rect> and enhance entity management 2026-08-18 22:49:27 +02:00
konstantin-paulus
9206d58d85 Enhance text handling with new TextCase and TextRange features
- Introduced `TextCase` type for controlling glyph casing during rendering, with options for original, upper, and lower case.
- Added `TextRange` as a sub-entity for `<text>`, allowing style overrides for specific runs of glyphs by character index.
- Updated `TextProps` to include new properties such as `letterSpacing`, `leading`, and `textCase`, enhancing text styling capabilities.
- Enhanced rendering logic to support the new `TextRange` functionality, ensuring proper application of styles and colors.
- Updated migration documentation to reflect the addition of text handling features, detailing their usage and integration within existing structures.
2026-08-18 20:46:08 +02:00
konstantin-paulus
ce04be1ddc Refactor animation and keyframe handling in JSX and runtime
- Removed `PATCH_PROP_KEYS` and `PatchProps`, streamlining property management as the document structure no longer requires patching by prop name.
- Updated type definitions to introduce new internal prop groups (`IdentityProps`, `PositionProps`, `OffsetProps`, `SizeProps`, `TransformProps`, `TimingProps`, `SequenceItemProps`), enhancing clarity and organization of properties.
- Refactored animation and keyframe structures to utilize `<animation>` and `<keyframeTrack>` elements, ensuring consistent handling of animatable properties.
- Updated migration documentation to reflect the removal of obsolete structures and the introduction of new prop groups, detailing their usage in the context of animations and keyframes.
2026-08-18 18:50:18 +02:00
konstantin-paulus
d4d3475cee Refactor document structure to stage model
- Replaced references to `DocumentRoot` with `Stage` across the codebase, aligning with the new stage model.
- Updated entity management and hierarchy functions to reflect the transition from document-based to stage-based parenting.
- Adjusted comments and documentation to clarify the role of the stage in the entity structure.
- Enhanced queries and actions to utilize the new stage terminology, ensuring consistency throughout the runtime environment.
2026-08-17 10:05:00 +02:00
konstantin-paulus
5b8e5e7f66 Merge branch 'main' into koota-migration 2026-08-15 16:54:10 +02:00
konstantin-paulus
e85cee917a Refactor CLI and API structure by removing deprecated components
Eliminated the `compile-project.ts` and `open-folder.ts` files from the CLI, streamlining the codebase. Updated the README to reflect changes in CLI commands, including the removal of outdated examples. Adjusted the API to enhance clarity and maintainability by consolidating asset handling functions and removing unused types. This refactor improves the overall architecture and reduces complexity in the CLI interactions.
2026-08-14 14:52:20 +02:00
konstantin-paulus
8aebb7dd9c Enhance documentation on common JSX errors and update GSAP usage in examples
- Added detailed explanations for common issues related to blank or partial `<html>` content in captures, including stateful animations, scaling, and opacity handling.
- Updated example code to recommend using GSAP for timeline animations instead of anime.js, ensuring frame accuracy and proper timeline management.
- Clarified best practices for using CSS properties like `scale()` and `opacity` in JSX to prevent rendering issues.
2026-08-14 08:56:07 +02:00
konstantin-paulus
2899573a36 Remove example HTML scene and update documentation references
Deleted the `09-html-scene.tsx` example file, which demonstrated an HTML scene as a mount root. Updated the README and related documentation to remove references to this example and clarified that only `<rect>` can be promoted to a scene. Adjusted descriptions in the JSX documentation to reflect this change.
2026-08-08 23:21:54 +02:00
konstantin-paulus
37ebe9d9f5 Remove --open option and associated openInBrowser function from dapi report command
Eliminated the `--open` option from the `dapi report` command, which previously opened the created issue in the default browser. Removed the `openInBrowser` function and updated related documentation to reflect these changes, streamlining the command's functionality and focusing on direct issue filing without browser interaction.
2026-08-02 13:29:20 +02:00
konstantin-paulus
a9c21b4427 Refactor dapi report command for direct issue filing and improved documentation
Updated the `dapi report` command to file GitHub issues directly using the `gh` CLI, removing the previous markdown report generation step. Enhanced the command's description and options in the README and reference documentation to clarify the immediate submission process and the requirement for `gh` authentication. Adjusted related code in the report handling to streamline issue creation and improve user experience.
2026-08-02 11:44:32 +02:00
konstantin-paulus
ad3d540026 Refactor HtmlHost readiness mechanism for improved resource handling
Updated the `whenReady` method in the HtmlHost class to streamline the resolution of asynchronously loaded HTML resources. Replaced the previous image decoding handling with a more efficient promise management approach, ensuring that all images and fonts are ready before rendering updates. Adjusted related documentation to clarify the changes in resource readiness handling.
2026-07-31 16:25:40 +02:00
konstantin-paulus
1539ded67a Add image source handling and readiness mechanism to HtmlHost
Implemented a new `whenReady` method in the HtmlHost class to ensure all images in its subtree are decoded before rendering updates. Updated the playback system to utilize this method for improved rendering reliability. Enhanced the WorldDocument class to manage image sources more effectively, including support for various input types and object URL management. Updated documentation to reflect changes in image handling and source resolution.
2026-07-31 16:01:25 +02:00
konstantin-paulus
4e47a7d00f Enhance media frame and node capture functionality with timecoded images
Updated the MediaFrameResult and NodeCaptureResult types to utilize a new TimecodedImage format, which includes timecodes for better clarity. Introduced options for combining frames into contact sheets and specifying frames per sheet, enhancing the output structure. Adjusted related functions and documentation to reflect these changes, improving user understanding of the output format and capabilities.
2026-07-31 10:43:34 +02:00
konstantin-paulus
b9c47a1975 Refactor timecode formatting in media frame and node capture outputs
Updated the naming convention for output PNG files in both media frame and node capture functions to use a more descriptive timecode format (e.g., 00h00m01s15f.png). Introduced a new utility function, `timecodeFilename`, to handle the formatting. Adjusted related documentation to reflect these changes, enhancing clarity for users regarding the output file naming structure.
2026-07-30 00:07:35 +02:00
konstantin-paulus
8772591502 Refactor media frame and node capture to include timecode in output
Updated the MediaFrameResult and related functions to replace the timestamp with a timecode string for better clarity. Adjusted the output structure in both media frame and node capture processes to include timecode, ensuring that captured images and frames are named accordingly. Enhanced documentation to reflect these changes, improving user understanding of the output format.
2026-07-30 00:00:59 +02:00
konstantin-paulus
97ef63115f Add 'report' command to CLI for bug reporting with diagnostics
Introduced a new command `dapi report` that allows users to report bugs in the CLI or the app. This command generates a markdown report containing diagnostics, including the app's status and recent logs, and provides a prefilled GitHub issue URL. Updated the README and reference documentation to include details about the new command and its usage.
2026-07-29 09:30:11 +02:00
konstantin-paulus
5fa6ef4265 Update README and captions documentation to enhance clarity and provide usage examples
Revised the README to better describe Diffusion Studio's functionality, emphasizing the role of the `dapi` CLI and providing detailed prompt examples for video understanding, motion graphics, video editing, and clipping. Additionally, clarified the caching behavior of transcripts in the captions documentation by removing the optional seed parameter reference, ensuring accurate information for users.
2026-07-26 21:00:23 +02:00
konstantin-paulus
c8583eda7f Enhance audio generation options with optional duration parameter
Updated the audio generation functionality to include an optional `duration` parameter in the `GenerateAudioOptions` type. This change allows users to specify the duration for audio prompts, improving flexibility in audio generation. Additionally, validation was added to ensure the duration is a positive number. Updated related documentation to reflect this new option.
2026-07-26 15:18:09 +02:00