137 Commits

Author SHA1 Message Date
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
konstantin-paulus
5c30d91613 Enhance audio fingerprinting and transcription process with optional seed parameter
Updated the `sceneAudioFingerprint` and `transcribeScene` functions to accept an optional `seed` parameter, allowing for more flexible transcript caching. Adjusted related logic in the `WorldDocument` class to utilize the seed for generating unique transcription keys. Additionally, updated documentation to reflect the new `seed` prop in the captions API, clarifying its role in bypassing cached transcripts.
2026-07-26 14:59:17 +02:00
konstantin-paulus
0d51ab494b Enhance context command and selection handling in editor API
Updated the context command description for clarity on spatial and temporal references. Refactored the context handling to include selected node IDs, improving the context response structure. Additionally, modified the selection utility to streamline the retrieval of selected node IDs, ensuring consistency across the editor API.
2026-07-26 12:03:24 +02:00
konstantin-paulus
05f2245e24 Enhance main window management and improve scene initialization logic
Updated the desktop application to improve main window activation behavior, ensuring it restores and focuses the window if minimized or destroyed. Additionally, refined the scene initialization overlay logic to ensure reactivity by accessing the timeline index, enhancing the overall user experience and responsiveness of the application.
2026-07-25 16:17:24 +02:00
konstantin-paulus
7743b32645 Refactor Trim component to Workarea for improved clarity and functionality
Updated the codebase to replace instances of the Trim component with the Workarea component, enhancing the handling of playback and rendering windows. This change includes adjustments in the context command, encoder, playback system, and rendering logic to utilize the new Workarea structure, ensuring a more intuitive and consistent approach to managing scene work areas.
2026-07-24 17:35:07 +02:00
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
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
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
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
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
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
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
konstantin-paulus
b9dd3a71b5 Implement HTML host disposal and sharing functionality
Added a new `disposeHtmlHosts` function to manage the cleanup of HTML hosts in the engine. Updated the `observeWorld` function to call this new disposal method. Introduced `shareHtmlHosts` to facilitate sharing of HTML hosts between worlds during encoding processes. Adjusted the `HtmlHost` class to ensure proper disposal and integration with the rendering context. These changes enhance memory management and support for HTML rendering in the engine.
2026-07-17 16:03:45 +02:00
konstantin-paulus
7c6406c8e7 Update Electron version and enhance documentation for JSX elements
Bumped the Electron version in both `package-lock.json` and `package.json` to `43.1.1`. Removed the deprecated `<jstemp>` component and updated the JSX elements documentation to reflect new aliases for paint elements, including `<solid>`, `<linearGradient>`, `<radialGradient>`, and `<stop>`. Revised the `html-paint.md` and `elements.md` files to clarify the usage of the `<html>` element and its properties. Added new samples demonstrating the use of the `<html>` element in various contexts.
2026-07-17 14:30:04 +02:00
konstantin-paulus
1582db9862 Add <htmlPaint> element and related documentation for reactive HTML rendering
Introduced the `<htmlPaint>` element, allowing real HTML children to be rendered within a defined box using the html-in-canvas API. Updated the `elements.md`, `paints.md`, and `README.md` to include details about `<htmlPaint>`, its properties, and usage examples. Added a new `html-paint.md` file for comprehensive documentation on the element's functionality and limitations. Enhanced the rendering system to support HTML content, ensuring it integrates seamlessly with existing paint types.
2026-07-17 12:13:30 +02:00
konstantin-paulus
86b06ac300 Enhance documentation and implement live mode features for mounting
Updated the `mount.md` and `lifecycle.md` documentation to clarify the new `--live` option, detailing its behavior and implications for the reactive graph. Introduced the `useTicker` hook in the `renderer.ts` to facilitate access to the project's timeline during live mounts. Additionally, modified the `playback.ts` and `live-mounts.ts` to support the new live functionality, ensuring that the reactive graph remains active and responsive during playback. These changes improve the overall usability and clarity of the mounting process.
2026-07-17 09:53:37 +02:00
konstantin-paulus
091631e559 Add live mount functionality to the mounting process
Enhance the `mount` command to support a new `--live` option, allowing the reactive graph to remain active after mounting. This change includes updates to the `MountRequest` and `MountOptions` types, as well as modifications to the `handleMount` function to manage live mounts effectively. Additionally, a new utility for managing live mounts has been introduced, improving the overall handling of reactive entities in the engine.
2026-07-17 09:18:41 +02:00