Conversation
…sses - Removed the ShapeEffect class and its methods for managing shape effects. - Introduced ShapeEffectManager to handle multiple shape effects more efficiently. - Created ShapeEffectBase as an abstract class for common behavior of shape effects. - Implemented specific shadow effects: ShapeEffectDropShadow and ShapeEffectInnerShadow. - Updated types and interfaces to reflect the new structure of shape effects. - Removed obsolete renderer effect classes and their associated types. - Adjusted the renderer to accommodate the new shape effect management system.
- Refactored RendererEffectInnerShadow to support inner shadow rendering. - Introduced new utility functions for raster bounds and rendering inner shadows. - Updated RendererCanvasShape to handle inner shadow effects alongside drop shadows. - Enhanced shadow geometry creation to accommodate inner shadows. - Added types for canvas shadow states and geometry. - Improved performance by caching raster data and signatures.
- Adjusted indentation and formatting in various files for better clarity. - Consolidated import statements and removed unnecessary line breaks. - Enhanced the structure of conditional statements and function parameters for improved readability. - Ensured consistent use of spacing and line breaks across multiple files. - Updated comments and method signatures for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a complete effects system for shape nodes, including drop shadows, inner shadows, layer blur, and background blur.
Motivation
Shape nodes previously lacked a unified way to apply common visual effects. This change introduces a reusable effects API and renderer architecture that supports the core effects required by modern canvas-based editors.
Changes
DropShadow,InnerShadow,LayerBlur, andBackgroundBlur.Testing
The effects were tested manually in the Playground with different shapes, transforms, fills, strokes, and effect combinations.
The following behavior was verified:
Public API
Added the shape-effects API and the public types required to configure:
The API allows effects to be added, inspected, updated, reordered, enabled, disabled, and removed from shape nodes.
Visual changes
Shape nodes can now render drop shadows, inner shadows, layer blur, and background blur.
Screenshots or recordings from the Playground should be added to demonstrate the effects individually and in combination.
Checklist