301 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
konstantin-paulus
79daf8a037 Update default objectFit value in image and elements documentation for consistency
Change the default value of the `objectFit` property in the image documentation from "contain" to "cover" to align with the updated description in the elements documentation. This ensures clarity and consistency across the documentation regarding how media pixels map into the box.
2026-07-17 08:36:41 +02:00
konstantin-paulus
f925e36f13 Refactor entity size propagation and transform logic for improved spatial handling
Enhance the resize and transform systems to better manage entity constraints and spatial relationships. Introduced logic to handle sequential entities more effectively, ensuring they mirror their parent's frame. Updated comments for clarity and refined the computation of group bounds. These changes improve the overall stability and accuracy of the engine's spatial management.
2026-07-17 08:27:43 +02:00
konstantin-paulus
a8329f0274 Enhance dashboard components with improved styling and layout
Updated the DashboardProjectsView to include padding, modified the DashboardSearchBar for stronger border styling, and refined the DashboardCardButton and DashboardCardPreview components for better visual consistency. Additionally, introduced a class prop to the DashboardViewSection for flexible styling. These changes contribute to a more cohesive and polished user interface across the dashboard.
2026-07-16 13:58:55 +02:00
Konstantin Paulus
e1e6cbd634
Merge branch 'main' into bugfix/file-handle-types 2026-07-16 13:53:16 +02:00
konstantin-paulus
604394f9f3 Update dashboard and scene components with improved styling for better UI consistency
Refactor various components in the dashboard and scene initialization overlay to enhance visual appeal and user interaction. Changes include updating button and card background colors, adjusting separator styles, and modifying sidebar item active states. These updates contribute to a more cohesive and polished user interface across the application.
2026-07-16 13:51:03 +02:00
konstantin-paulus
3e6cc22718 Update button styling in Alignment component for improved visibility
Change the button class from "text-muted-foreground" to "text-foreground" in the Alignment component to enhance its visibility and ensure better user interaction. This update contributes to a more consistent and appealing user interface.
2026-07-16 11:57:46 +02:00
konstantin-paulus
aa2f5f0bce Refactor camera restoration logic and improve scaling in camera controller
Update the restoreWorld function to validate camera properties before applying them, ensuring only valid camera configurations are used. Introduce a fallback mechanism for the camera and background settings. In the camera controller, adjust the scaling logic to prevent zero or negative dimensions, enhancing stability and user experience. This change improves the robustness of the camera system and ensures a more reliable rendering process.
2026-07-16 11:32:59 +02:00
konstantin-paulus
fafeb763b2 Refactor VolumeMeter and VerticalMeter components for improved styling and functionality
Update the VolumeMeter component to apply rounded corners to individual VerticalMeter instances. Introduce a class prop to VerticalMeter for flexible styling. Enhance the rendering logic to utilize clip-path for the meter overlay, improving visual representation. Additionally, update color classes for better UI consistency in MeterScale. This change enhances the overall user experience and visual appeal of the soundboard interface.
2026-07-16 11:10:47 +02:00
konstantin-paulus
c87c2dff40 Add center constraint functionality and improve hover effects in ConstraintsRow component
Introduce a new function to assign center constraints for both horizontal and vertical alignment in the ConstraintsRow component. Update the CSS classes to enhance hover effects for better user interaction, ensuring a more responsive and visually appealing interface. This change improves the overall usability of the constraints feature in the UI.
2026-07-16 10:47:18 +02:00
konstantin-paulus
86c4d96103 Update color variables and improve UI consistency
Modify various color variables in CSS to enhance visual consistency across the application. Adjust background color defaults in the engine to ensure a cohesive look. Update HUD system colors for better contrast and readability. Refactor asset and folder item components to use a unified text color, improving overall UI clarity. Introduce an IncrementDecrementControl component for better user interaction in time settings. This change enhances the user experience by providing a more polished and consistent interface.
2026-07-16 10:41:00 +02:00
konstantin-paulus
4499f21432 Integrate TypeGPU support and update ESLint configuration
Add TypeGPU as a dependency and configure ESLint to include the TypeGPU plugin for enhanced type checking in JavaScript and TypeScript files. Update the Vite configuration to utilize the TypeGPU plugin, improving the development experience for GPU programming. Additionally, modify the .gitignore to exclude new AI-related files. This change enhances the project's capabilities for GPU-based computations and ensures consistent linting practices.
2026-07-16 08:49:09 +02:00
konstantin-paulus
05f1f53f29 Enhance macOS support and update UI styling
Add native corner radius and backdrop functionality for macOS, improving the visual integration of the application. Update the build process to include a new native build script. Additionally, introduce new CSS variables for stronger border styling across the web application, ensuring a consistent and polished user interface. This change enhances the overall user experience on macOS and improves visual consistency across platforms.
2026-07-15 20:34:34 +02:00
konstantin-paulus
5a8b56d29b Add animations prop to various components and documentation
Introduce the `animations` prop across multiple components, including audio, elements, and text, allowing for preset in/out animations. Update related documentation to reflect this new feature and enhance the `animations` handling in the node patching process. This change improves the flexibility and visual dynamics of the UI elements.
2026-07-15 15:33:44 +02:00
konstantin-paulus
29824441b8 Enhance macOS desktop experience with native vibrancy and sidebar styling
Update the main window configuration to support macOS native vibrancy, allowing for a transparent background and improved visual integration. Introduce new CSS variables for sidebar colors in both light and dark themes, ensuring a consistent look across platforms. Additionally, adjust component styles to reflect these changes, enhancing the overall user interface and experience.
2026-07-15 13:31:34 +02:00
konstantin-paulus
67dcb6fdcc Refactor asset and folder command outputs for consistency and clarity
Update the output format for various asset and folder commands to ensure JSON Lines are emitted on stdout, providing a consistent structure across commands. Enhance error handling to ensure that unknown ids or invalid inputs fail the entire command, improving user feedback and command reliability. This change streamlines the user experience and aligns with the fail-fast convention for batch commands.
2026-07-15 12:39:25 +02:00
Doruk Kavcioglu
678e451dd7
fix asset imports for ElectronFileHandle
showFileDialog can return ElectronFileHandle in desktop builds, but the sidebar importAssets helper did not accept it.

Add ElectronFileHandle to the union so the helper matches the values forwarded to loadAsset.
2026-07-14 22:58:45 +03:00
konstantin-paulus
8484330241 Enhance file handling and permissions management in desktop and web applications
Refactor the file dialog logic to support both Electron and standard web file picking methods. Introduce a new `getPathForFile` function to retrieve file paths in the desktop context, improving file handling consistency. Update the `ElectronFileHandle` class to facilitate the creation of file handles from files, ensuring seamless integration with the existing file system APIs. Additionally, enhance permission handling in the `queryPermission` method to provide a fallback mechanism for permission requests. This change improves user experience and file management capabilities across the applications.
2026-07-14 17:59:45 +02:00
konstantin-paulus
7aa51bccfb Enhance ruler drawing logic for improved label placement
Refactor the `drawRuler` function to optimize label rendering on the canvas. Introduce a mechanism to prevent overlapping labels by tracking the end position of the last drawn label and ensuring new labels are only drawn if they fit within the available space. This change improves the clarity and readability of the ruler display in the UI.
2026-07-14 17:14:00 +02:00
konstantin-paulus
e3bbc1e77b Add subtitle support and enhance transcript handling
Introduce parsing for SRT and WebVTT subtitle formats, allowing transcripts to be mounted directly from these files. Update the asset detection logic to recognize subtitle MIME types and adjust the caption handling in the playback system to ensure proper integration. Additionally, enhance the documentation to clarify the usage of the `<captions>` component for manual transcript sourcing.
2026-07-14 11:37:06 +02:00
konstantin-paulus
54cd22f038 Refactor node capture logic for improved clarity and default handling
Simplify the `nodeCapture` function by consolidating time parsing logic and ensuring default values are handled more gracefully. Update the CLI command description to clarify the default time behavior for captures. This change enhances code readability and user experience by providing clearer expectations for time input.
2026-07-14 09:42:27 +02:00
konstantin-paulus
e09244e22c Add shared image decoder for efficient asset management
Implement a caching mechanism for image decoders, allowing multiple entities to share a single decoder instance. Introduce the `SharedImageDecoder` class to manage reference counting and disposal of decoders, enhancing memory efficiency. Update the `resolveImageDecoder` function to utilize the cache, ensuring that asset changes properly release old decoders while acquiring new ones. This change improves performance and resource management in the image decoding process.
2026-07-14 07:46:48 +02:00