66 Commits

Author SHA1 Message Date
konstantin-paulus
4a9021c8c5 Refactor imports to use @diffusionstudio/koota
- Replaced all instances of importing from 'koota' with '@diffusionstudio/koota' across various components and contexts.
- Updated package-lock.json to reflect the addition of '@diffusionstudio/koota' and removal of the previous 'koota' package.
- Ensured consistency in type imports and dependencies throughout the codebase, enhancing maintainability and clarity.
2026-08-28 09:12:44 +02:00
konstantin-paulus
21a689708b Refactor caption handling and improve styling logic
- Updated the `CaptionSettings` component to clarify the relationship between caption presets and authored styles, enhancing user understanding.
- Simplified the `Inspector` component by removing unnecessary checks for caption targets, streamlining the rendering logic.
- Wrapped the "Grow" control in the `TextPanel` with a conditional display to ensure it only appears when text is selected, improving UI responsiveness.
- Introduced new constants for caption preset styles and fills, centralizing style management and ensuring consistency across different caption types.
- Enhanced the `applyStyles` method in various caption decoders to utilize the new preset styles, improving the overall styling process and ensuring authored properties are correctly applied.
2026-08-26 13:53:08 +02:00
konstantin-paulus
48cc213686 Refactor aspect ratio synchronization in RuntimeDocument
- Replaced direct handling of the `keepAspectRatio` property with a dedicated `syncAspectLock` method to streamline aspect ratio management.
- Updated logic to ensure the aspect ratio lock is consistently applied based on node properties, enhancing the integrity of resizing operations.
- Added documentation for the new `syncAspectLock` method to clarify its role in maintaining authored bounds during resizing.
2026-08-26 10:47:26 +02:00
konstantin-paulus
5bd5076cf0 Refactor aspect ratio handling in layout and resizing logic
- Updated the `LayoutPanel` component to improve aspect ratio management by introducing a `lockedRatio` function, which determines the aspect ratio based on the current dimensions or authored values.
- Simplified the `resize` function to utilize the new `lockedRatio` for enforcing aspect ratios during resizing operations.
- Enhanced the `toggleAspectRatio` function to directly edit the `keepAspectRatio` property, streamlining the locking mechanism.
- Added documentation for the `keepAspectRatio` property in relevant types and reference materials, clarifying its purpose and usage in the editor.
2026-08-26 10:21:42 +02:00
konstantin-paulus
572425a511 Enhance useTicker with hold functionality for async work
- Introduced the `hold` method in the `useTicker` hook to manage async operations, ensuring frames wait for necessary resources before sampling.
- Updated example files to utilize the `hold` method for loading models and setting up WebGPU devices, improving frame accuracy during exports and captures.
- Added documentation for the `hold` method, detailing its purpose and usage in managing async work within the rendering pipeline.
- Implemented a timeout mechanism for held promises to prevent indefinite waits during rendering.
2026-08-25 16:31:49 +02:00
konstantin-paulus
e0e9b761bb Implement syncTo feature for audio/video alignment
- Added support for the `syncTo` trait, allowing elements to align their playback based on the timing of another element's recording.
- Introduced `PendingSync` to manage in-progress sync requests and ensure proper correlation between audio and video sources.
- Enhanced the asset system to handle sync requests, including error handling for cycles and missing sources.
- Updated documentation to reflect the new `syncTo` functionality and its implications for element placement and playback management.
2026-08-25 15:11:39 +02:00
konstantin-paulus
9369730c9a Implement ticker system for playback management
- Introduced a new ticker system to manage playback timing and state updates within the document.
- Refactored the mount function to integrate the ticker, ensuring it advances with each frame.
- Removed the deprecated live mounts utility, streamlining the codebase and enhancing performance.
- Updated the playback system to utilize the new ticker for consistent frame updates across entities.
2026-08-25 14:52:28 +02:00
konstantin-paulus
11fecc09ea Refactor example files to use <stage> and <scene> components
- Updated all example files to replace <rect> with <stage> and <scene> for improved structure and consistency.
- Enhanced the README.md to reflect the new project entry format for examples.
- Added a new dependency on "koota" in package.json for better integration.
- Improved documentation and comments throughout the examples for clarity.
2026-08-25 14:32:48 +02:00
konstantin-paulus
589be2161d Refactor timing traits to introduce Delay and Trim
- Replaced Start and End traits with Delay and Trim to better represent the node's timing on the timeline.
- Updated related functions and components to utilize the new timing structure, ensuring accurate handling of authored time.
- Enhanced the timing logic to reconcile authored time properties into the runtime's vocabulary, improving consistency across the editor and runtime.
- Refactored serialization and deserialization processes to accommodate the new timing traits, ensuring proper data handling during entity state changes.
2026-08-24 16:32:06 +02:00
konstantin-paulus
312f6c5859 Refactor export functionality and enhance scene handling
- Updated the export system to utilize the new `createCapture` function, allowing for more efficient scene rendering in a dedicated capture world.
- Refactored the `exportScene` method to accept an `Entity` instead of a scene ID, improving type safety and clarity.
- Enhanced the `FileExportMenu` and `FileExportSpecificSceneMenu` components to leverage the updated export logic, ensuring proper scene selection and export configuration.
- Improved error handling and user feedback during the export process, including checks for active scenes and clearer toast notifications.
- Streamlined the integration of the encoder and capture systems, ensuring consistent behavior across different export scenarios.
2026-08-23 22:36:08 +02:00
konstantin-paulus
a58d69cd31 Enhance entity disposal and error handling in RuntimeDocument
- Introduced an `attempt` function to safely execute operations and handle errors during entity disposal.
- Updated the `dispose` method to skip excluded entities and ensure proper cleanup of DOM nodes and resources.
- Improved error handling for URL revocation and entity destruction, enhancing stability during document disposal.
2026-08-23 18:18:01 +02:00
konstantin-paulus
2272d029ae Enhance JSX composition handling and improve DOM integration
- Introduced `canonicalizeTagsPlugin` to rewrite composition tags to PascalCase, preventing naming collisions with native DOM elements.
- Updated `sourcePlugin` to integrate SVG collision detection and ensure proper handling of composition tags within SVG contexts.
- Refactored `DocumentEditor` to improve scene node management and ensure correct DOM node handling during element creation.
- Removed deprecated `SurfaceHost` and `HtmlHost` implementations, streamlining media handling and improving performance.
- Enhanced type definitions and documentation for better clarity on scene node properties and DOM interactions.
2026-08-23 16:22:17 +02:00
konstantin-paulus
0f82c49175 Refactor KeyframeLayer and SubItemLayer for improved property handling and UI consistency
- Updated KeyframeLayer to utilize the new trackProperty function for better property path management, enhancing clarity in property representation.
- Refactored formatProperty function to improve naming consistency for properties displayed in the UI.
- Added a visual element in SubItemLayer for improved layout consistency.
- Enhanced type definitions for better maintainability and understanding of property paths.
2026-08-23 10:24:43 +02:00
konstantin-paulus
0aa88ae4c7 Refactor document editing and node management in the editor
- Updated the `editProperty`, `insertNode`, and `removeNode` methods in `DocumentEditor` to utilize the new `node` method from `RuntimeDocument`, improving consistency in node handling.
- Enhanced the `SceneNode` interface in `document.ts` to include `tag`, `props`, `parent`, and `children`, streamlining the structure of document nodes.
- Refactored various functions to operate on `SceneNode` instead of `Entity`, improving clarity and maintainability in document manipulation.
2026-08-22 23:20:56 +02:00
konstantin-paulus
ae21a34b7c Enhance runtime document management and error handling
- Updated the `dispose` method in `RuntimeDocument` to ensure proper cleanup of the document registry when a document is replaced.
- Added error handling in `createRuntimeDocument` to prevent multiple mounts in the same world, ensuring that only one project can be mounted at a time.
- Improved documentation to clarify the behavior of runtime documents and the importance of disposing of previous mounts before creating new ones.
2026-08-22 20:50:18 +02:00
konstantin-paulus
e6dbd415aa Refactor media handling and remove sequence support
- Removed references to `SEQUENCE` from various components, including `fill-picker`, `fill-row`, and `sub-item`, streamlining media type management.
- Updated `PaintItemIcon` and `TimeSettings` to handle only `VIDEO` and `IMAGE` types, enhancing clarity in media selection.
- Introduced `SourceFrameRate` trait to manage frame rates for frames directories, ensuring accurate playback duration.
- Refactored asset actions and timing utilities to accommodate the removal of sequence handling, improving overall code maintainability.
2026-08-22 20:21:59 +02:00
konstantin-paulus
a4ab6440b0 Refactor media selection and generation handling in the ActionBar and PromptInput components
- Introduced `useMediaSelection` to streamline the management of selected image and video nodes.
- Updated `ActionBar` to utilize the new media selection logic, simplifying the determination of media types.
- Refactored `PromptInputActions` to leverage `useMediaSelection`, enhancing clarity and reducing complexity in handling selected nodes.
- Removed obsolete functions related to media type determination, improving code maintainability.
- Added new constants for voice model and aspect ratio dimensions in `config.ts`, enhancing configurability for media generation.
2026-08-22 15:20:57 +02:00
konstantin-paulus
620dd7600c Integrate source error handling and enhance UI feedback
- Added `sourceErrorSystem` to manage source error states within the engine, improving error handling during asset generation.
- Updated HUD rendering logic to display error messages for entities with source errors, enhancing user awareness of issues.
- Introduced new color constants for failed states in the timeline, providing visual differentiation for failed generations.
- Enhanced clip rendering to account for source errors, ensuring clarity in the UI when an asset fails to generate.
- Refactored `EditorGenAi` to report generation failures with descriptive messages, improving user feedback on errors.
- Updated relevant types to include error handling, ensuring consistency across the codebase for managing generation failures.
2026-08-22 12:21:16 +02:00
konstantin-paulus
71a7f30a68 Refactor and enhance JSX editing capabilities
- Introduced `SerializedAssetRef` and `EditValue` types to support new asset reference handling in JSX.
- Updated `setProp` and related functions to accommodate `SerializedAssetRef`, allowing for more complex prop values.
- Refactored `SourceSet`, `SourceInsert`, and `SourceIteration` interfaces to utilize `EditValue`, improving type safety and flexibility.
- Implemented `ensureGenerateImport` function to manage `generate` imports dynamically, enhancing code organization.
- Removed obsolete `use-auto-captions.ts` and integrated its functionality into `use-auto-captions.tsx`, streamlining the codebase.
- Added new `use-generate-image.tsx` to replace the previous image generation logic, improving asset management and integration with the editor.
- Enhanced the `PromptInput` component to support new asset handling and improve user experience in image generation workflows.
2026-08-22 10:58:03 +02:00
konstantin-paulus
907a56ef59 Integrate transcription functionality and enhance audio processing
- Added `@diffusionstudio/encoder` dependency to support audio encoding features.
- Implemented transcription capabilities in the `EditorGenAi` class, allowing for scene audio transcription and caching.
- Enhanced asset management by introducing `TranscriptionRequest` trait for handling transcription requests in the asset system.
- Updated `assetSystem` to process transcription requests, improving audio handling within scenes.
- Refactored related components to accommodate new transcription logic, ensuring seamless integration with existing workflows.
2026-08-21 23:27:37 +02:00
konstantin-paulus
2fafd8668c Enhance asset management and integration with AI generation
- Added `@diffusionstudio/jsx` dependency to support JSX generation features.
- Integrated `assetSystem` into various components to streamline asset handling.
- Refactored `create-engine.ts`, `image-encoder.ts`, and `encoder.ts` to utilize the new asset management structure.
- Removed the obsolete `jsx-generation.ts` file, consolidating asset generation logic.
- Updated `library.ts` to improve asset resolution and management processes.
- Enhanced the `EditorPage` to incorporate AI generation capabilities, improving project workflows.
2026-08-21 23:05:45 +02:00
konstantin-paulus
3e8602d407 Add adjustment layer support to JSX and reconciler
- Introduced `<adjustmentLayer>` element to the JSX framework, allowing for transformations on the clip below it without drawing its own content.
- Updated type definitions to include `AdjustmentLayerProps` for better type safety and documentation.
- Enhanced the reconciler to handle the new adjustment layer entity, ensuring proper integration within the document structure.
- Added comprehensive documentation for the adjustment layer, detailing its functionality and usage examples.
- Improved overall code organization and readability across affected components, setting the stage for future enhancements.
2026-08-20 15:42:20 +02:00
konstantin-paulus
e6597e394a Enhance entity management with new clipHeight and expanded properties
- Added `clipHeight` and `expanded` properties to the entity model, allowing for more flexible timeline management and UI representation.
- Updated the `index.ts` file to export the new `overlap` functionality, improving modularity.
- Enhanced the `RuntimeDocument` class to handle the new properties, ensuring proper entity state management.
- Improved overall code organization and readability across the affected components, setting the stage for future enhancements.
2026-08-20 13:42:41 +02:00
konstantin-paulus
e7ff64686a Enhance InterpolationSettings integration in Inspector for improved keyframe management
- Imported `InterpolationSettings` into the `Inspector` component, allowing users to manage easing for selected keyframes.
- Updated the `InterpolationSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach with `useEditor`.
- Enhanced the user interface for selecting easing types and presets, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 10:33:08 +02:00
konstantin-paulus
6734017991 Integrate CaptionSettings into Inspector for enhanced caption management
- Imported `CaptionSettings` into the `Inspector` component, enabling users to manage captions for selected entities.
- Updated the `CaptionSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach with `useEditor`.
- Enhanced the user interface for selecting caption presets, colors, and vertical alignment, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 10:25:46 +02:00
konstantin-paulus
1caf194ada Refactor fill management in Inspector for improved functionality and performance
- Updated the `FillPicker`, `FillsSettings`, and related components to utilize new hooks and improve state management, transitioning to a more reactive approach with `useWorld` and `useEditor`.
- Refactored fill handling to support entity-based systems, enhancing user interaction and responsiveness.
- Introduced new gradient stop management functionality, allowing for dynamic editing of gradient fills.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 09:33:12 +02:00
konstantin-paulus
edc79c4173 Integrate TransitionSettings into Inspector for enhanced transition management
- Imported `TransitionSettings` into the `Inspector` component, allowing users to manage transitions for selected entities.
- Updated the `TransitionSettings` component to utilize new hooks and improve state management, transitioning to a more reactive approach.
- Enhanced the user interface for adding and editing transitions, ensuring seamless integration with existing inspector functionalities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:54:47 +02:00
konstantin-paulus
0b232ea1c8 Add animation management to Inspector with new animation types integration
- Introduced a new `animation-types.ts` file defining animation options and their properties, including groups and default values.
- Updated `AnimationsSettings` to utilize the new animation types, enhancing the user interface for selecting and managing animations.
- Refactored animation handling in `animations.tsx` to improve state management and reactivity using hooks from `@diffusionstudio/koota-solid`.
- Integrated animation options into the inspector, allowing for seamless addition and editing of animations for selected entities.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:50:56 +02:00
konstantin-paulus
95d8bc9e34 Add effects management to Inspector with new effect types integration
- Introduced a new `effect-types.ts` file defining effect options and their properties, including units and default values.
- Updated `EffectsInspector` to utilize the new effect types, enhancing the user interface for selecting and managing effects.
- Refactored `EffectsSettings` to support the addition of effects directly, improving the workflow for users.
- Enhanced state management using hooks from `@diffusionstudio/koota-solid`, ensuring better reactivity and performance.
- Improved overall code organization and readability across the inspector components, setting the stage for future enhancements.
2026-08-20 08:37:07 +02:00
konstantin-paulus
d9384e189b Enhance text editing capabilities in the editor
- Introduced a new `TextEdit` interface to handle changes to `<text>` elements, allowing for direct editing of their content.
- Updated the `DocumentEditor` class with an `editText` method to facilitate text updates, ensuring proper reporting of changes.
- Modified the `EditWriter` to manage text edits separately, integrating them into the overall editing workflow.
- Enhanced the `RuntimeDocument` class with a `setText` method to replace the content of `<text>` elements, maintaining the integrity of text nodes during rendering.
- Refactored the `SourceSet` interface to include a `text` property, enabling the writing of text content alongside element properties.
- Improved the `TextPanel` component to utilize the new text editing functionality, streamlining the user experience for text modifications.
2026-08-19 18:41:16 +02:00
konstantin-paulus
38bc44805b Refactor AppearanceSettings and update keyframe handling
- Refactored `AppearanceSettings` to utilize new hooks from `@diffusionstudio/koota-solid`, improving state management for opacity, blend modes, visibility, and corner radii.
- Enhanced keyframe handling by integrating `syncKeyframe` and `removeKeyframeTrack` functions, ensuring smoother animations and property edits.
- Updated the `Keyframe` component to support new properties and improve interaction with the editor, enhancing user experience.
- Replaced `Keyframe` imports across various components to use the new `keyframe-bitecs` module, ensuring consistency in keyframe management.
- Documented changes in migration notes to reflect updates in appearance settings and keyframe functionality.
2026-08-19 17:14:17 +02:00
konstantin-paulus
ac181f985e Update asset management and enhance project features
- Added support for asset manifests with read and write capabilities, allowing for better organization of project assets.
- Introduced new project channels for manifest reading and writing, enhancing communication between main and renderer processes.
- Improved file system interactions with new methods for listing, statting, and removing project files, streamlining asset management.
- Updated package dependencies to include `yaml` for manifest handling and linked `@diffusionstudio/assets` for asset management.
- Refactored existing code to integrate new asset handling features and improve overall project structure.
2026-08-19 11:11:02 +02:00
konstantin-paulus
c88f7ff25f Add mask support to <rect> and enhance entity management 2026-08-18 22:49:27 +02:00
konstantin-paulus
9206d58d85 Enhance text handling with new TextCase and TextRange features
- Introduced `TextCase` type for controlling glyph casing during rendering, with options for original, upper, and lower case.
- Added `TextRange` as a sub-entity for `<text>`, allowing style overrides for specific runs of glyphs by character index.
- Updated `TextProps` to include new properties such as `letterSpacing`, `leading`, and `textCase`, enhancing text styling capabilities.
- Enhanced rendering logic to support the new `TextRange` functionality, ensuring proper application of styles and colors.
- Updated migration documentation to reflect the addition of text handling features, detailing their usage and integration within existing structures.
2026-08-18 20:46:08 +02:00
konstantin-paulus
1760028e96 Add blend mode and surface handling in JSX and runtime
- Introduced `BlendMode` type for composite operations, enhancing visual effects management.
- Added `SurfaceHandle` and `SurfacePaintProps` to support surface rendering, allowing for dynamic canvas handling.
- Updated `CommonProps` to include `CompositeProps`, integrating blend mode and visibility properties.
- Enhanced rendering systems to accommodate new surface and blend mode functionalities, ensuring accurate visual output.
- Updated migration documentation to reflect the addition of blend mode and surface features, detailing their usage and integration within existing structures.
2026-08-18 20:22:06 +02:00
konstantin-paulus
ce04be1ddc Refactor animation and keyframe handling in JSX and runtime
- Removed `PATCH_PROP_KEYS` and `PatchProps`, streamlining property management as the document structure no longer requires patching by prop name.
- Updated type definitions to introduce new internal prop groups (`IdentityProps`, `PositionProps`, `OffsetProps`, `SizeProps`, `TransformProps`, `TimingProps`, `SequenceItemProps`), enhancing clarity and organization of properties.
- Refactored animation and keyframe structures to utilize `<animation>` and `<keyframeTrack>` elements, ensuring consistent handling of animatable properties.
- Updated migration documentation to reflect the removal of obsolete structures and the introduction of new prop groups, detailing their usage in the context of animations and keyframes.
2026-08-18 18:50:18 +02:00
konstantin-paulus
64ab858182 Add animation support in JSX and runtime
- Introduced `<animation>` as a new sub-entity, enabling the management of animations with properties such as `type`, `phase`, `duration`, and `delay`.
- Updated type definitions to include `AnimationProps` and `AnimationType`, defining properties for various animation effects.
- Enhanced rendering and entity management to accommodate animation entities, ensuring proper handling during rendering.
- Updated migration documentation to reflect the addition of animation features, detailing their usage and integration within existing structures.
2026-08-18 18:45:17 +02:00
konstantin-paulus
5b690f4ba3 Add keyframe and keyframe track support in JSX and runtime
- Introduced `<keyframe>` and `<keyframeTrack>` as new sub-entities, enabling the management of animatable properties through keyframes.
- Updated type definitions to include `KeyframeProps`, `KeyframeTrackProps`, and `AnimatableProperty`, defining properties for keyframe animations.
- Enhanced rendering and entity management to accommodate keyframe entities, ensuring proper handling of animations during rendering.
- Updated migration documentation to reflect the addition of keyframe features, detailing their usage and integration within existing structures.
2026-08-18 18:42:15 +02:00
konstantin-paulus
59c975714c Add effect support in JSX and runtime
- Introduced `<effect>` as a new sub-entity, allowing for filter effects to be applied to rendered pixels of parent entities.
- Updated type definitions to include `EffectProps` and `EffectType`, defining properties for various filter effects.
- Enhanced rendering and entity management to accommodate effect entities, ensuring proper application of filters during rendering.
- Updated migration documentation to reflect the addition of effect features, detailing their usage and integration within existing structures.
2026-08-18 17:09:44 +02:00
konstantin-paulus
2374c33baa Add stroke and shadow support in JSX and runtime
- Introduced `<stroke>` and `<shadow>` as new sub-entities, allowing for enhanced styling options in geometry elements.
- Updated type definitions to include `StrokeProps` and `ShadowProps`, defining properties for stroke styles and shadow effects.
- Enhanced rendering and entity management to accommodate stroke and shadow entities, ensuring proper application of styles during rendering.
- Updated migration documentation to reflect the addition of stroke and shadow features, detailing their usage and integration within existing structures.
2026-08-18 16:59:27 +02:00
konstantin-paulus
799dd5c8c2 Refactor rendering and entity management for improved paint and opacity handling
- Introduced new `Opacity` and `BlendMode` traits to replace the previous `Appearance` trait, enhancing clarity in managing entity properties.
- Updated rendering systems to utilize the new traits, ensuring accurate application of opacity and blend modes during rendering.
- Enhanced gradient handling to support color stops with opacity, improving visual fidelity in gradient rendering.
- Refactored various systems to streamline the management of color and opacity, ensuring consistent behavior across entities.
- Removed obsolete properties related to color stops, simplifying the data structure and improving maintainability.
2026-08-18 16:55:01 +02:00
konstantin-paulus
47e364d3d0 Enhance entity management and rendering capabilities in the runtime
- Updated the encoder to exclude geometries from scene fills, ensuring accurate rendering of paint entities.
- Introduced intrinsic paint handling for geometries, allowing them to manage their own paint traits.
- Enhanced the rendering system to support intrinsic media, improving the visual output of image, video, and sequence paints.
- Refactored time management functions to account for asset changes and intrinsic properties, ensuring accurate duration calculations.
- Improved observer functionality to react to asset removals, maintaining consistency in entity state management.
2026-08-18 16:09:54 +02:00
konstantin-paulus
ca39447b10 Implement duplicate functionality in DocumentEditor and keyboard shortcuts
- Added a new `duplicate` method in `DocumentEditor` to copy selected entities and their subtrees, ensuring they are inserted correctly in the document structure.
- Introduced `duplicateSelection` function in `shortcuts.ts` to bind the duplication action to the keyboard shortcut (mod + d).
- Enhanced the `authoredTree` function to retrieve the subtree structure for duplication, and implemented `renderAuthored` to build host nodes from the authored tree.
- Updated the migration documentation to reflect the new duplication feature and its behavior regarding entity selection and positioning.
2026-08-18 15:20:51 +02:00
konstantin-paulus
03d8e69244 Add support for <group> and <sequence> entities in RuntimeDocument
- Implemented handling for `<group>` entities, which now consist of `Group` and `Position` traits, with their size determined by the union of their children's bounds.
- Introduced `<sequence>` entities that utilize the `Sequential` trait, ensuring they maintain spatial traits off and sit at their parent's origin.
- Updated error handling to include new entity types in the unsupported tag message.
- Enhanced property setting logic to prevent spatial properties from being applied to `Sequential` entities, improving entity management and consistency in the document structure.
2026-08-18 15:06:08 +02:00
konstantin-paulus
1bc0d85242 Enhance loop handling and editing capabilities in the editor
- Introduced `SourceUnroll` and `LoopIteration` types to support unrolling loop elements into individual iterations, allowing for more granular editing of looped content.
- Updated `DocumentEditor` to manage unroll edits, ensuring that edits to looped entities are handled correctly and reported accurately.
- Enhanced `EditWriter` to process unroll edits first during project writes, ensuring proper management of looped elements.
- Added `LOOP_ATTR` to track the source of loop elements, facilitating the editor's ability to manage and unroll loops effectively.
- Refactored related components and types to improve clarity and maintainability in handling looped entities and their iterations.
2026-08-18 14:42:04 +02:00
konstantin-paulus
42ae36f222 Refactor text node management in RuntimeDocument
- Introduced a new `TextParts` trait to manage text nodes associated with entities, ensuring proper order and state management.
- Replaced the previous Map-based text storage with a Set to maintain insertion order and simplify text node handling.
- Updated methods for inserting, detaching, and synchronizing text nodes, enhancing the overall efficiency and clarity of text management within the document.
- Removed obsolete methods related to text handling, streamlining the codebase and improving maintainability.
2026-08-18 13:56:33 +02:00
konstantin-paulus
6f26053a9f Enhance editing and movement capabilities in the editor
- Introduced `SourceMove` interface to facilitate element movement within the JSX structure, allowing elements to be repositioned without altering their content.
- Updated `DocumentEditor` to support reparenting of entities, enabling dynamic changes in the entity hierarchy while maintaining accurate reporting of moves.
- Refactored `EditWriter` to handle move edits alongside insertions, ensuring proper management of element positions during project writes.
- Improved cursor update logic in `CameraController` to reflect the current interaction state, enhancing user experience during editing operations.
- Streamlined event handling in the engine to support new pointer event types, improving responsiveness to user interactions.
- Removed obsolete `use-running` hook to simplify the codebase and improve clarity in engine state management.
2026-08-18 10:59:13 +02:00
konstantin-paulus
8bc0693a36 Refactor engine creation and system management
- Updated the engine instantiation in `EngineProvider` to use a new `createEngine` function for improved clarity.
- Refactored the `Engine` class to directly manage system execution, replacing the previous `runSystems` function with individual system calls for playback, motion, transform, and rendering.
- Removed the obsolete `schedule` system file to streamline the engine's architecture.
- Enhanced the overall structure and readability of the engine code, aligning with best practices for modular design.
2026-08-17 19:10:56 +02:00
konstantin-paulus
8e4138a31d Refactor scene activation management in the editor
- Replaced `switchActiveScene` with a new `activate` method in `DocumentEditor` to manage the active entity more effectively.
- Updated `DrawOverlay` and `SceneInitOverlay` components to utilize the new `activate` method, streamlining scene selection.
- Introduced `Active` trait to represent the active entity directly, enhancing clarity in entity management.
- Refactored related hooks and actions to align with the new active entity handling, improving overall code consistency and maintainability.
2026-08-17 15:48:08 +02:00
konstantin-paulus
ae004e49aa Implement selection management for entities in the editor
- Introduced `selected` property in `PatchProps` to track entity selection state, allowing for better management of selected elements.
- Enhanced `DocumentEditor` with `select`, `deselect`, and `clearSelection` methods to handle entity selection and deselection, improving user interaction.
- Updated `setProp` function to remove attributes for boolean props when set to false, ensuring cleaner output and accurate representation of selection state.
- Refactored `DrawOverlay` and `SceneInitOverlay` components to utilize the new selection management, streamlining the selection process in the editor.
- Adjusted related types and documentation to reflect the new selection handling capabilities.
2026-08-17 15:33:25 +02:00