450 Commits

Author SHA1 Message Date
konstantin-paulus
ffc3e9ca09 Add command line switches to enhance performance and rendering behavior
Introduced several command line switches in the desktop application to disable background timer throttling, renderer backgrounding, and occluded window backgrounding. Additionally, disabled the CalculateNativeWinOcclusion feature to improve overall application performance and responsiveness. Updated the rendering update logic in the web application to utilize a race condition between animation frame requests and a timeout, ensuring smoother rendering updates while maintaining performance during paused states.
2026-07-24 14:36:35 +02:00
konstantin-paulus
d0dcd7b445 Update JSX documentation to correct references to <html> and improve clarity
Revised multiple files to update references from `<html-paint.md>` to `<html.md>` for consistency. Added a new file for the `<html>` element, detailing its usage, properties, and best practices for incorporating real HTML into JSX layouts. This update enhances the documentation's accuracy and provides clearer guidance for users on utilizing the `<html>` element effectively.
2026-07-24 13:43:01 +02:00
konstantin-paulus
9a913787f9 Add guidance on minimizing <html> hosts in JSX documentation
Expanded the documentation for the `<html>` element to include best practices for minimizing the number of `<html>` hosts. Added examples illustrating the preferred approach of using a single host with internal layout versus multiple hosts for content that appears simultaneously. This update aims to enhance performance and clarity for users when structuring their JSX layouts.
2026-07-24 12:47:04 +02:00
konstantin-paulus
69628905f2 Update JSX documentation for <group> and <html> elements to enhance clarity and consistency
Revised the descriptions of the `<group>` and `<html>` elements in the JSX documentation to improve clarity. The `<group>` element's internal node description was updated for better understanding, while the `<html>` element's usage examples were modified to reflect the correct structure when used as a scene. Additionally, clarified the constraints related to scene roots in the documentation, ensuring users have accurate information on the properties and behaviors of these elements.
2026-07-24 12:46:22 +02:00
konstantin-paulus
90d0959a91 Refactor JSX elements to replace <scene> with <rect> using the scene property for root promotion
Updated multiple files to transition from using `<scene>` elements to `<rect>` elements with the `scene` property, promoting rectangle geometries to mount roots. This change enhances the JSX API by clarifying the role of scenes and ensuring consistency across examples and documentation. Additionally, modified related documentation to reflect the new usage and constraints of the `scene` property.
2026-07-24 12:01:41 +02:00
konstantin-paulus
11d232e642 Update image encoder to improve timestamp labeling for captured frames
Refined the timestamp labeling in the image encoder by updating the comment for clarity and adjusting the logic to correctly calculate the frame's HH:MM:SS:FF timecode based on the rendered frame. This enhancement ensures accurate time representation during image encoding.
2026-07-24 08:40:47 +02:00
konstantin-paulus
bf0ef25506 Update context command to include workarea trim information in project overview
Enhanced the context command description to specify the inclusion of workarea trim in seconds when set, providing users with a more comprehensive overview of the open project. Additionally, updated the context retrieval logic to calculate and return workarea details based on the active scene's trim settings.
2026-07-24 08:05:59 +02:00
konstantin-paulus
aa0162b1f1 Enhance node capture logic to validate timeline clocks and improve error handling
Updated the node capture function to check for the presence of timeline clocks before capturing nodes. If a node lacks a timeline clock, an informative error message is thrown, suggesting the capture of its scene ancestor instead. This change improves the robustness of the node handling process and enhances user feedback during errors.
2026-07-23 23:58:19 +02:00
konstantin-paulus
68117d5b04 Enhance image encoder to manage timeline clocks and local time updates
Updated the image encoder to track entities with timeline clocks, ensuring that local time is consistently updated for both the main stage and clock entities. This change improves synchronization during playback and enhances the overall functionality of the image encoding process.
2026-07-23 23:31:14 +02:00
konstantin-paulus
c1a28375b1 Refactor timeline component to improve scroll handling and update element references
Modified the timeline component to correctly calculate the new scroll position using the layers' scroll height instead of the container's. Updated the element reference from 'data-timeline-layers-container' to 'data-timeline-layers-viewport' for better clarity and functionality in the rendering process. This refactor enhances the overall performance and maintainability of the timeline feature.
2026-07-23 15:35:41 +02:00
konstantin-paulus
10120f3f0a Update render documentation to clarify encode settings and progress monitoring
Revised the render documentation to remove unnecessary details about the encode window and added a note about using `dapi screenshot` for progress monitoring. This update enhances clarity and ensures users have accurate information regarding the rendering process and configuration options.
2026-07-23 15:11:00 +02:00
konstantin-paulus
7d93bb3353 Update captions documentation to reflect changes in preset styles and default settings
Modified the captions documentation to clarify the default styles and color slots for various presets. The changes include a simplification of the descriptions for the "classic" and "whisper" presets, enhancing user understanding of their intended use cases. This update ensures that the documentation accurately represents the current functionality of the `<captions />` component.
2026-07-23 15:00:11 +02:00
konstantin-paulus
5da1a203a8 Refactor media transcription logic to simplify parameters and improve clarity
Removed optional start and end parameters from the MediaTranscribeRequest type and the mediaTranscribe function, streamlining the transcription process. Updated related documentation to reflect these changes, ensuring a clearer understanding of the transcription command and its usage.
2026-07-23 14:33:14 +02:00
konstantin-paulus
4493d17803 Enhance HTML host management and rendering logic
Updated the HtmlHost class to expose the setSize method publicly, allowing external components to adjust size directly. Introduced a new PendingHtmlHost type to manage HTML hosts awaiting size initialization. Refactored the registerHtmlHost method to include a paint parameter, improving the handling of HTML hosts during rendering. Added a flushConnectedHtmlHosts method to process pending hosts efficiently, ensuring accurate size updates when connected. Updated documentation to reflect these changes.
2026-07-22 20:55:00 +02:00
konstantin-paulus
0d20ff6b58 Refactor HTML rendering logic and remove unused functions
Removed the `hasLiveHtmlHosts` function and its references from the encoder files, streamlining the rendering process. Updated the `nextRenderingUpdate` function to utilize memoization for improved performance during rendering updates. This refactor enhances code clarity and optimizes the handling of HTML paint hosts in the rendering pipeline.
2026-07-22 20:30:53 +02:00
konstantin-paulus
f0b650d1bd Refactor export logic to utilize unified rendering approach and improve state management
Replaced the previous export implementation in the ExportProvider with a new renderScene function, consolidating the rendering logic for both UI and CLI exports. This refactor enhances state management by utilizing a reactive overlay for progress reporting and error handling. Additionally, removed unused signals and streamlined the export process, improving overall code clarity and maintainability.
2026-07-22 20:18:15 +02:00
konstantin-paulus
07c47fae94 Enhance audio downsampling logic and update captions documentation
Refactored the downsampleAudio function to improve peak calculation efficiency and accuracy. Updated the logic to handle peak accumulation more effectively, ensuring better audio quality in downsampled outputs. Additionally, expanded the captions documentation to clarify the relationship between timing properties and transcript trimming, enhancing user understanding of captioning mechanics.
2026-07-22 19:21:16 +02:00
konstantin-paulus
19696e8af9 Refactor timing logic in describeEntity function to improve clarity and functionality
Updated the describeEntity function to streamline the handling of timing properties, including `start`, `end`, `sourceIn`, and `sourceOut`. This refactor enhances the readability of the code and ensures accurate timing calculations based on the presence of trim components, improving the overall functionality of the editor API.
2026-07-22 08:54:03 +02:00
konstantin-paulus
bd01027484 Add timing properties to captions documentation
Updated the captions documentation to include new properties: `start`, `end`, `sourceIn`, and `sourceOut`. These properties allow for trimming specific sections of the transcript, enhancing the functionality and clarity of captioning in relation to media timing.
2026-07-21 14:42:47 +02:00
konstantin-paulus
fba355e052 Update README for clarity and enhance WorldDocument component with timing properties
Revised the README to replace "media compositor" with "multimedia editor" and improved the description of the `dapi` CLI. Enhanced the `WorldDocument` class in the JSX utility by updating the `setComponent` logic to conditionally handle trim properties based on the presence of timing attributes, improving the functionality of scene transcriptions. Updated the `CaptionsProps` type to include new timing properties for better integration.
2026-07-21 14:37:45 +02:00
konstantin-paulus
dd5108a15e Enhance CSS variables for overlay effects and update component styling
Added a new CSS variable `--color-overlay-strong` to improve overlay styling options. Updated the `ExportProgress` component to utilize the new `bg-overlay-strong` class for enhanced visual consistency during the export process. This change improves the user interface by providing a stronger overlay effect.
2026-07-21 10:13:14 +02:00
konstantin-paulus
46b4c225a1 Update package-lock.json to include new dependencies for koota and koota-solid
Added entries for the koota package and the @diffusionstudio/koota-solid package, specifying their versions, licenses, and peer dependencies. This update ensures that the project has the necessary dependencies for enhanced functionality and compatibility.
2026-07-20 22:41:17 +02:00
konstantin-paulus
81d29d5d88 Add Shader Paint functionality and related components
Introduced a new `<shaderPaint>` element that applies a WGSL fragment shader to the media paint directly below it in the paint stack. Implemented support for shader uniforms and updated the rendering logic to handle shader paints in the engine. Enhanced the API to include shader-related methods and types, ensuring seamless integration with existing media elements. Updated documentation and examples to demonstrate the new shader capabilities, improving user guidance and showcasing practical implementations.
2026-07-20 20:56:32 +02:00
konstantin-paulus
e0e464dd0f Refactor timeline management in layout context and update related components
Renamed and consolidated timeline-related functions in the layout context to improve clarity and consistency. Updated components to utilize the new `toggleTimeline` method, enhancing the user interface by streamlining the toggling of the timeline's visibility state. Adjusted the EditorPage and Layers components to reflect these changes, ensuring a cohesive experience across the application.
2026-07-20 17:31:34 +02:00
konstantin-paulus
9fc15a3297 Implement timeline minimization feature and enhance rendering logic
Added functionality to minimize the timeline, allowing for a more streamlined interface. Updated rendering logic to conditionally display elements based on the minimized state, including the playhead and snap points. Introduced a new method to set the minimized state and updated the layout context to manage timeline visibility. Adjusted related components to support double-click toggling for minimizing the timeline, improving user interaction.
2026-07-20 16:59:48 +02:00
konstantin-paulus
d7e6414b5b Update examples and documentation to include width and height properties for video and text elements
Added width and height properties to various video and text elements across examples and documentation files to ensure consistent sizing. This change enhances the clarity of the examples and improves the user experience by providing explicit dimensions for media elements.
2026-07-20 16:11:45 +02:00
konstantin-paulus
42ca4d4670 Update README to reflect new documentation structure and add examples section
Reorganized the documentation links in the README to point to the new reference structure, including the CLI and JSX references. Added an "Examples" section to provide runnable compositions, enhancing user guidance and accessibility to practical implementations.
2026-07-20 15:58:39 +02:00
konstantin-paulus
c1bc3f0085 Update package.json and README for consistency and clarity
Modified the "check" script in package.json to reference the correct "examples" directory. Updated the README to replace "video editor" with "media compositor" for improved accuracy and restructured some sentences for better readability. Removed outdated documentation files related to assets, CLI, composition, distribution, and getting started, streamlining the documentation for a more focused user experience.
2026-07-20 15:53:30 +02:00
konstantin-paulus
5e42ec2084 Refactor JSX elements to use lowercase tags for consistency
Updated all JSX elements in the documentation and codebase to use lowercase tags (e.g., `<Scene>` to `<scene>`, `<Video>` to `<video>`, etc.) for uniformity and adherence to the new standards. This change enhances clarity and consistency across the JSX API, ensuring that users have a cohesive experience when working with the elements. Updated related documentation to reflect these changes.
2026-07-20 14:15:45 +02:00
Konstantin Paulus
15070fd013
Merge pull request #6 from diffusionstudio/html-in-canvas-integration
Html in canvas integration
2026-07-20 11:18:34 +02:00
konstantin-paulus
7180de47ae Enhance <Captions /> component with verticalAlign property and update related functionality
Added a `verticalAlign` property to the `<Captions />` component, allowing for customizable vertical positioning of caption blocks. Updated the relevant API, decoders, and serialization logic to support this new feature. Enhanced documentation to reflect the changes and clarify usage, improving the overall flexibility and usability of the captioning system.
2026-07-20 11:17:00 +02:00
konstantin-paulus
5ab9652d06 Add offsetX and offsetY properties to JSX elements and update related documentation
Introduced `offsetX` and `offsetY` as new animatable properties for visual elements, allowing for render-time translations without altering layout boxes. Updated the documentation to reflect these changes, ensuring clarity on their usage. Enhanced the type definitions and functionality in the editor API to support these new properties, improving the overall flexibility of animations in the application.
2026-07-20 10:57:29 +02:00
konstantin-paulus
ca796b49a9 Update documentation for <Html> and <Surface> elements to clarify usage and improve descriptions
Revised the documentation for the `<Html>` and `<Surface>` elements, enhancing clarity by updating descriptions and correcting terminology. The `<Html>` element now emphasizes its role in rendering real HTML content, while the `<Surface>` element is described as an element backed by a canvas. Additionally, improved the examples and clarified the relationship between `<Html>` and `<HtmlPaint>`, as well as `<Surface>` and `<SurfacePaint>`, to better guide users in their implementation.
2026-07-20 10:35:05 +02:00
konstantin-paulus
d083cd76ed Add screenshot command to CLI and implement screenshot functionality
Introduced a new `screenshot` command in the CLI to capture the entire application window as a PNG. Updated the documentation to include this command and its options. Implemented the screenshot functionality in both the CLI and desktop applications, allowing users to save the screenshot to a specified directory. Enhanced the type definitions to support the new screenshot feature, improving overall usability and functionality.
2026-07-20 10:25:35 +02:00
konstantin-paulus
374cfdfd46 Refactor HtmlHost to accept a target canvas and improve error handling
Updated the HtmlHost class to require an HTMLCanvasElement as a target during construction, enhancing its integration with the rendering context. Removed unnecessary canvas creation and adjusted the error logging to provide clearer messages. Additionally, cleaned up the surface decoder by removing unused imports, streamlining the codebase.
2026-07-20 10:00:59 +02:00
konstantin-paulus
d4b23008f0 Update JSX handling to reject <audio> and <video> tags in paint hosts
Modified the JSX runtime and related documentation to clarify that `<audio>` and `<video>` tags are not supported within paint hosts. Users are now directed to use the `<Audio>` and `<Video>` composition elements for media playback, ensuring better adherence to the paint host's functionality and improving overall documentation clarity.
2026-07-19 23:25:23 +02:00
konstantin-paulus
a5644b44b4 Update CLI documentation to include new logs command and clarify output formats
Added the `logs` command to the CLI documentation, detailing its functionality for displaying recent console output. Updated the conventions section to specify that the `logs` command outputs plain formatted log lines, enhancing clarity on command outputs and improving the overall documentation for user reference.
2026-07-19 23:11:58 +02:00
konstantin-paulus
702627036a Update FrameCache to improve image smoothing quality and adjust VideoBuffer cache initialization
Changed the image smoothing property in FrameCache from `imageSmoothingEnabled` to `imageSmoothingQuality` set to 'high' for better rendering quality. Additionally, modified the VideoBuffer class to dynamically calculate the cache size based on asset dimensions and a defined pixel budget, enhancing performance and memory management for video assets.
2026-07-19 22:54:39 +02:00
konstantin-paulus
7f1e8f7a0f Add logging functionality to CLI and desktop applications
Introduced a logging system that captures console output from the running app, including various log levels (debug, info, warning, error). Implemented a new `logs` command in the CLI to display recent log entries, and integrated log handling in the desktop application to maintain a buffer of log entries across reloads. Updated relevant types and API routes to support log retrieval, enhancing debugging capabilities and overall application observability.
2026-07-19 22:28:15 +02:00
konstantin-paulus
d335b3d0f4 Refactor HTML and Surface host sharing logic and introduce rendering update handling
Removed the `shareHtmlHosts` and `shareSurfaceHosts` functions to streamline the handling of HTML and Surface hosts. Introduced new utility functions `hasLiveHtmlHosts` and `nextRenderingUpdate` to manage the rendering lifecycle more effectively. Updated the encoder logic to wait for rendering updates when live HTML hosts are present, enhancing the rendering accuracy and performance. This refactor improves the overall clarity and functionality of the encoding process.
2026-07-19 22:10:25 +02:00
konstantin-paulus
2bb2add67b Update JSX elements to PascalCase and enhance type handling in documentation
Refactored JSX elements from lowercase to PascalCase, including `<scene>` to `<Scene>`, `<text>` to `<Text>`, and others, to improve consistency and clarity in the codebase. Updated related documentation to reflect these changes, ensuring that the usage of JSX elements aligns with the new naming conventions. This update enhances the overall readability and usability of the JSX API.
2026-07-19 20:25:33 +02:00
konstantin-paulus
f2924479c9 Enable SharedArrayBuffer feature in Electron app and clean up unlink error handling
Added the `SharedArrayBuffer` feature to the Electron app's command line options for improved performance. Additionally, refined the error handling in the unlink process to ensure consistent behavior by adding a space in the catch block. These changes enhance the application's capabilities and reliability.
2026-07-19 15:29:13 +02:00
konstantin-paulus
e011b1d593 Refactor mount and insert commands for improved clarity and functionality
Updated the `dapi mount` command to ensure the reactive graph remains live after execution, enhancing the persistence and re-execution of modules across contexts. Simplified the `dapi node insert` command to accept only inline JSX tags, removing the `export default` requirement and clarifying its non-persistent nature. Adjusted related documentation to reflect these changes, ensuring consistency and clarity in usage. This refactor improves the overall usability and understanding of the mounting and insertion processes in the application.
2026-07-19 12:37:08 +02:00
konstantin-paulus
f24a007198 Enhance paint type handling in SubItemLayer and FillItem components
Added support for new paint types, including HTML and Surface, in the SubItemLayer component. Updated the FillItem component to display corresponding icons and labels for these new paint types. This enhancement improves the rendering capabilities and user interface consistency for various paint types in the application.
2026-07-18 19:05:37 +02:00
konstantin-paulus
9feb7badc3 Refactor <canvas> to <surface> for improved clarity and functionality
Replaced all instances of `<canvas>` and `<canvasPaint>` with `<surface>` and `<surfacePaint>` across the codebase. Updated related documentation to reflect this change, ensuring consistency in naming and usage. Adjusted rendering logic and component imports to support the new surface functionality, enhancing the drawing capabilities for various context types (2D, WebGL, WebGPU). This refactor improves the overall clarity and usability of the rendering system.
2026-07-18 14:34:18 +02:00
konstantin-paulus
ad2c7e27b7 Enhance module import resolution and documentation for userland packages
Updated the module compilation process to improve import resolution for userland packages, allowing bare specifiers to be rewritten to CDN URLs. Introduced a `dapi.config.json` configuration file for pinning versions and redirecting imports, enhancing reproducibility. Expanded documentation to clarify the import resolution process and added examples for using the new configuration options. This update streamlines the handling of external dependencies and improves the developer experience.
2026-07-18 14:03:23 +02:00
konstantin-paulus
8b9c8ef0cc Add useFile hook for resolving file sources in effects
Introduced the `useFile` hook, which resolves a source (path, asset id, URL, or `generate.*` ref) to its `File`, allowing for reading raw bytes within effects. This hook returns Solid's `createResource` tuple, enabling async resolution and providing loading and error states. Updated documentation to include usage examples for drawing images onto a `<canvas>` and parsing data files, enhancing the functionality for handling media assets in the application.
2026-07-18 10:41:45 +02:00
konstantin-paulus
6588dca62f Enhance Electron app initialization with custom development icon for macOS
Updated the Electron app's initialization process to set a custom development icon on macOS when not packaged. This change improves the visual feedback during development, ensuring a more recognizable application icon in the dock. The integration of the `nativeImage` module allows for better handling of the app's icon assets.
2026-07-18 09:52:31 +02:00
konstantin-paulus
aaafd86eaa Add <canvas> element and related functionality for custom drawing
Introduced the `<canvas>` element as a shorthand for a rectangle carrying a `<canvasPaint>`, enabling users to draw custom graphics using various context types (2D, WebGL, WebGPU). Updated the rendering system to support this new element, ensuring it integrates with existing components. Enhanced documentation to clarify the usage of `<canvas>` and its properties, and added new samples demonstrating its functionality in different contexts. This update improves the flexibility and creative potential of rendered content.
2026-07-18 09:48:26 +02:00
konstantin-paulus
924218d0d4 Enhance HTML rendering capabilities with new <html> element
Introduced the `<html>` element as a shorthand for a rectangle carrying an `<htmlPaint>`, allowing for browser-laid-out HTML/SVG children. Updated the rendering logic to support this new element, ensuring it integrates seamlessly with existing components. Enhanced documentation to clarify the usage of `<html>` and its properties, and added new samples demonstrating its functionality in various contexts. This update improves the flexibility and interactivity of rendered content.
2026-07-17 19:19:22 +02:00