-
Notifications
You must be signed in to change notification settings - Fork 275
Effect editor #755
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Effect editor #755
Conversation
…ding add, delete, and context menu interactions
…g initialization, emission, and behaviors
…tors for particle management
…ure for improved readability
…ed UI for adding and removing items
…icle and group data management
…pdates and matrix decomposition logging
…viors, geometry handling, and new types for improved visual effects management
…or components for improved clarity and performance
… improved readability and consistency
…onsistency and clarity
…imports for improved clarity and consistency
…Editor for improved node handling and clarity
…reation and transformation application for improved performance and clarity
…proved data handling and clarity
…proved data handling and clarity
…and consolidating emitter factories for improved clarity and performance
… by integrating emitter logic into VFXSystemFactory for improved clarity and performance
…d matrix utility classes, improving particle system initialization and configuration for better performance and clarity
…ce management and streamline geometry and material creation processes
…factories and enhancing gradient systems for improved performance and clarity
…error handling, improving data conversion processes, and introducing a unified system interface for better performance and clarity
…on and ensuring vertex colors and alpha support in VFXSolidParticleSystem for better visual fidelity
…ensive rotation and color editors, improving initialization properties handling, and introducing new VFX value types for better flexibility and clarity
…or improved emitter creation, integrating emitter logic into particle systems, and refining emitter configuration handling for better performance and clarity
…components for enhanced gradient editing capabilities in the VFX editor, improving user experience and flexibility in color and alpha key management
…fixed interfaces, enhancing code clarity and consistency
…hancing type clarity and consistency across effect systems and parsers
…ffect system and enhance maintainability
… introduce emission burst handling as gradients to enhance effect system functionality
…r improved readability and maintainability
…ty assignments, improving gradient handling, and consolidating type definitions for clarity and maintainability
…mitter type consistency in properties
…ing new emitter types, improving property handling, and refining particle initialization methods for better consistency and functionality
…by adding support for new rotation types, improving color parsing, and optimizing force application for better performance and maintainability
…ng a consistent IColorFunction structure, enhancing data conversion, and improving color parsing for better maintainability
…ting a new method to replace particle meshes, improving geometry handling, and ensuring proper resource management during updates
…implementing Unity prefab import, improving data handling, and introducing new converter methods for better integration and maintainability
…anagement, enhancing node handling with a new NodeFactory, and improving recursive search methods for better performance and maintainability
…a handling - Replaced the use of Parser from babylonjs-editor-tools with QuarksConverter for converting Quarks JSON to IData. - Updated references from `nodeData.system` to `nodeData.data` across various components to standardize data handling. - Adjusted imports to use specific Babylon.js core modules for better performance and clarity. - Removed unnecessary prewarm application calls in effect initialization.
- Added a new method to import Quarks files in the EffectEditorWindow, allowing users to load effects from Quarks JSON format. - Refactored the existing loadFromFile method to load from Quarks files and updated the corresponding import logic in the toolbar. - Improved error handling and user feedback with toast notifications for successful and failed imports. - Updated imports to utilize specific Babylon.js core modules for better clarity and performance.
- Consolidated imports from individual files to a single import statement for EffectParticleSystem and EffectSolidParticleSystem. - Updated logger and utility imports to reference the appropriate core modules from @BabylonJS. - Improved code clarity and maintainability by standardizing import paths.
- Updated import statements to use specific modules from @babylonjs/core for Color4, Vector3, and Quaternion. - Improved code clarity and maintainability by ensuring consistent import paths across multiple files.
- Added new optional properties to the EffectSolidParticleSystem constructor, including boundingSphereOnly, bSphereRadiusFactor, expandable, enableMultiMaterial, computeBoundingBox, and autoFixFaceOrientation. - Enhanced flexibility and configurability of the particle system for improved user experience.
- Introduced createGroup and createParticleSystem methods to NodeFactory for creating group nodes and particle systems with specified configurations. - Refactored create method to utilize a private _createRootNode method for improved readability and maintainability. - Updated internal logic to streamline node creation and enhance the overall structure of the NodeFactory class.
- Included necessary shader imports to enable particle system functionality. - Note: This approach is not ideal but is currently required for proper shader loading.
- Changed rotation representation from Quaternion to Vector3 in QuarksConverter and UnityConverter for consistency. - Simplified rotation handling in EffectEditorObjectProperties by removing the custom rotation inspector and directly using Vector3. - Updated NodeFactory and EffectSolidParticleSystem to reflect the new rotation type, ensuring compatibility across the system. - Adjusted ITransform interface to use Vector3 for rotation, enhancing clarity in transformation definitions.
| /** | ||
| * Logger utility for operations | ||
| */ | ||
| export class Logger { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me there is already a lotter in Babylon.js (like Tools.Warn(...) etc.).
Is it not enought? Saying it's not fitting your needs is completely acceptable and we could go with that logger you propose
| /** | ||
| * Utility for calculating particle system capacity | ||
| */ | ||
| export class CapacityCalculator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static classes are considered deprecated. In the editor, functions like those static methods are exposed as simple exported functions like export function (calculateForParticleSystem) { ... }
| @@ -0,0 +1,407 @@ | |||
| import { ReactNode, MouseEvent, useState, useRef, useEffect } from "react"; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really awesome, I'll check if they fit the requirements for the generic particle systems already supported by the editor. The particle system inspector also defines a gradient component to help modifying the gradients. If it fits, maybe replace the existing one with the one you propose combined with the gradient.tsx provided in the inspector/fields folder
| {mesh && ( | ||
| <div className="flex flex-col gap-1 mt-1 w-full"> | ||
| <EditorInspectorNumberField noUndoRedo={this.props.noUndoRedo} label="Vertices" object={{ count: mesh.getTotalVertices() }} property="count" /> | ||
| <EditorInspectorNumberField |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be drawn as a simple react element like here for example: https://github.com/BabylonJS/Editor/blob/master/editor/src/editor/layout/inspector/mesh/mesh.tsx#L105
This example draws the type of the mesh which is not editable but here just for information
| <MenubarMenu> | ||
| <MenubarTrigger>Window</MenubarTrigger> | ||
| <MenubarContent className="border-black/50"> | ||
| <MenubarItem onClick={() => this._handleOpenFXEditor()}>FX Editor...</MenubarItem> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we treat FX like an asset. And then the FX Editor would open on the user double-clicks the asset in the assets panel. And everything saved in the FX Editor would be saved in the asset (the asset can be a folder). We can discuss it together so I can present you how I managed .navmesh asset type (which is a folder asset containing the configuration of navmesh and bin files for pre-computed navmesh to improve loading time when playing the game)
No description provided.