18 Commits

Author SHA1 Message Date
konstantin-paulus
c55b03d434 Enhance Redraw example with resolution handling
- Updated `11-redraw.tsx` to incorporate `useResolution`, ensuring sharp rendering at any export size by adapting the bitmap to the display's pixel ratio.
- Modified the `draw` function to accept a resolution parameter, allowing dynamic adjustments during rendering.
- Enhanced documentation in `README.md` to reflect the new resolution handling feature in the Redraw example.
2026-09-01 14:58:28 +02:00
konstantin-paulus
54ffda3c66 Add example for Redraw integration on a <surface>
- Introduced a new example file `11-redraw.tsx` demonstrating the "hello" write-on stroke using Redraw, a 2D renderer on WebGPU.
- Implemented a gradient along a handwritten path with adjustable parameters for animation cycles and stroke width.
- Updated `README.md` to include the new example and installation instructions for the required `redraw` tarball package.
- Clarified dependencies for `10-typegpu.tsx` and `11-redraw.tsx` in the documentation.
2026-09-01 14:18:07 +02:00
konstantin-paulus
44f3a081fc Add TypeGPU caustics example and update documentation
- Introduced a new example file `10-typegpu.tsx` demonstrating an underwater caustics shader using TypeGPU and Solid.js.
- Implemented shader functionality with adjustable parameters for tile density, speed, fog color, and ambient light.
- Updated `README.md` to include the new example and installation instructions for required packages.
- Enhanced `module.md` with details on using TypeGPU's compile-time plugins in the project's Babel configuration.
2026-09-01 13:36:27 +02:00
konstantin-paulus
914c2222aa Enhance @inspect variable functionality and UI controls
- Added support for boolean and select types in the @inspect annotation, allowing for more diverse variable configurations.
- Implemented UI controls for boolean toggles and select dropdowns in the inspector, improving user interaction.
- Updated the inspect plugin to validate options for select types and ensure proper initialization.
- Enhanced documentation to reflect the new variable types and their usage in the inspector.
2026-08-29 13:25:06 +02:00
konstantin-paulus
d9cc6b0819 Add @inspect variable support in editor and inspector
- Introduced the `@inspect` annotation for top-level constants, allowing live editing through the inspector.
- Implemented the `VariablesSettings` component to manage and display `@inspect` variables in the sidebar.
- Enhanced the editor to handle variable edits, ensuring changes are reflected in the source code.
- Updated the history management to track variable changes, allowing for undo functionality.
- Added utility functions to manage `@inspect` entries within the project, ensuring consistent access across components.
2026-08-29 13:18:15 +02:00
konstantin-paulus
66051a5b86 Refine canvas handling and opacity management in rendering
- Updated the canvas creation in `createCapture` to ensure it remains within the viewport and utilizes `will-change:opacity` for better performance.
- Modified the `AnimeTimeline` component to use `opacity` for text dimming while clarifying the limitations of using fractional opacity on painted boxes in captures.
- Enhanced documentation in `html.md` to provide clearer guidance on the effects of nested opacity on rendering and captures.
2026-08-25 21:04:51 +02:00
konstantin-paulus
0197f51299 Improve canvas handling and error logging in rendering
- Updated the canvas creation in `createCapture` to ensure it remains within the viewport, preventing issues with cached paints and blank captures.
- Enhanced the `AnimeTimeline` component to use alpha colors instead of opacity for better rendering during animations, avoiding subtree blanking.
- Introduced a `WeakSet` in `render.ts` to track failed HTML roots, preventing console flooding by logging errors only once per root.
- Clarified documentation regarding nested opacity effects on captures to improve user understanding of rendering limitations.
2026-08-25 19:21:33 +02:00
konstantin-paulus
fb241b9851 Refactor stage and scene components to include camera and active properties
- Updated all example files and relevant documentation to incorporate the `camera` property in the `<stage>` component, ensuring proper framing for various scene dimensions.
- Marked one scene as `active` in each example to prevent projects from opening on an empty timeline, enhancing usability and clarity in project structure.
- Adjusted the `StageProps` and `SceneProps` types to reflect the new requirements for camera and active properties, improving type safety and documentation accuracy.
2026-08-25 16:43:40 +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
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
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
e85cee917a Refactor CLI and API structure by removing deprecated components
Eliminated the `compile-project.ts` and `open-folder.ts` files from the CLI, streamlining the codebase. Updated the README to reflect changes in CLI commands, including the removal of outdated examples. Adjusted the API to enhance clarity and maintainability by consolidating asset handling functions and removing unused types. This refactor improves the overall architecture and reduces complexity in the CLI interactions.
2026-08-14 14:52:20 +02:00
konstantin-paulus
2899573a36 Remove example HTML scene and update documentation references
Deleted the `09-html-scene.tsx` example file, which demonstrated an HTML scene as a mount root. Updated the README and related documentation to remove references to this example and clarified that only `<rect>` can be promoted to a scene. Adjusted descriptions in the JSX documentation to reflect this change.
2026-08-08 23:21:54 +02:00
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
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
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
d7e6414b5b Update examples and documentation to include width and height properties for video and text elements
Added width and height properties to various video and text elements across examples and documentation files to ensure consistent sizing. This change enhances the clarity of the examples and improves the user experience by providing explicit dimensions for media elements.
2026-07-20 16:11:45 +02:00
konstantin-paulus
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