289 Commits

Author SHA1 Message Date
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
konstantin-paulus
6c436b9658 Refactor mount and node insert functions for improved clarity
Update the `dispose` function initialization to include a space for consistency. Remove the `rootCreated` property from the `WorldDocument` class, simplifying the state management during scene handling. This change enhances code readability and maintains functionality in scene mounting and node insertion processes.
2026-07-13 23:16:59 +02:00
konstantin-paulus
dd1d764641 Focus camera on newly mounted scenes
When dapi mount creates a scene root that did not exist before (no node
with the same key), the camera now fits it into view after it becomes
the active scene. Re-mounts of an existing key still switch the active
scene but leave the camera untouched, so iterating on a project does not
yank the viewport.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-13 23:09:19 +02:00
konstantin-paulus
66a37207c2 Enhance node capture functionality with resolution support
Update the image encoder configuration to include a new `resolution` parameter, allowing for customizable output height during node captures. Modify the CLI command description to reflect the fixed 720p height for captures, ensuring consistency in output quality. This change improves the flexibility and precision of the image capturing process, enhancing the overall user experience.
2026-07-13 22:59:14 +02:00
konstantin-paulus
35534e3189 Implement image encoding for entity frames in node capture
Introduce a new `ImageEncoder` to render frames of an entity into standalone PNGs, enhancing the node capture functionality. Update the `handleNodeCapture` function to utilize the new encoder, allowing for more precise frame capturing with optional timestamp labeling. This change streamlines the capture process and improves the quality of output images, ensuring better representation of animated entities.
2026-07-13 10:13:11 +02:00
konstantin-paulus
92c2459a5b Refactor node capture functionality for improved type safety and clarity
Update the `nodeCapture` function to require a non-optional `id` parameter, enhancing type safety. Revise the CLI command to reflect this change, ensuring users must provide a node ID for capturing. Additionally, streamline the `handleNodeCapture` function by asserting canvas readiness and simplifying scene handling, which improves the robustness and clarity of the node capture process.
2026-07-12 15:52:47 +02:00
konstantin-paulus
91a0930640 Add inflight asset loading mechanism to prevent duplicate requests
Introduce a new `inflightLoads` WeakMap to manage concurrent asset loading requests, ensuring that only one promise per asset hash is created and awaited. This change enhances the asset loading process by deduplicating requests for the same asset, improving performance and resource management in the asset subsystem.
2026-07-12 14:34:34 +02:00
konstantin-paulus
8fcf8884b8 Update audio and video documentation to reflect volume changes in decibels
Revise the JSX documentation for `<audio>` and `<video>` components to clarify the `volume` prop, now expressed in decibels instead of a linear scale. Update example usages in the README and ensure consistency across related documentation. Additionally, modify the description of volume handling in the CLI to align with the new decibel representation, enhancing user understanding of audio properties.
2026-07-12 13:57:58 +02:00
konstantin-paulus
efb17d896c Refactor timing properties in JSX elements for improved clarity and consistency
Update timing-related properties across various JSX elements, replacing `inPoint`, `outPoint`, and `startTime` with `start`, `end`, `sourceIn`, and `sourceOut`. This change enhances the clarity of temporal placement semantics and aligns with the new structure for managing media timelines. Additionally, update related documentation to reflect these changes, ensuring users have accurate information on timing properties.
2026-07-12 08:39:04 +02:00
konstantin-paulus
586cd78164 Add WebGPU types and enhance media frame handling with auto selection feature
Introduce the `@webgpu/types` package to support WebGPU functionalities in the CLI and web applications. Update the media frame handling logic to include an `auto` option, allowing for automatic frame selection based on visual state changes. This enhancement improves the user experience by providing a more intuitive way to capture frames from video assets, ensuring better quality and relevance in the output.
2026-07-11 15:21:43 +02:00