Skip to content

Dev - #29

Merged
NiceArti merged 6 commits into
mainfrom
dev
Aug 6, 2026
Merged

Dev#29
NiceArti merged 6 commits into
mainfrom
dev

Conversation

@NiceArti

@NiceArti NiceArti commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

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

  • Added public APIs and types for creating, updating, ordering, enabling, disabling, and removing shape effects.
  • Added support for DropShadow, InnerShadow, LayerBlur, and BackgroundBlur.
  • Implemented dedicated Konva renderers and effect layers with correct composition of fill, stroke, and shadows.
  • Added reusable shadow geometry for rendering outer and inner shadows from shape paths.
  • Added layer blur for blurring the complete rendered content of a node.
  • Added backdrop capture and shape-based masking for background blur.
  • Reused the existing shape path renderer for background-blur masks without coupling it to the shadow pipeline.
  • Updated effect bounds and renderer lifecycle behavior.
  • Added Playground examples for testing effects individually and in combination.

Testing

The effects were tested manually in the Playground with different shapes, transforms, fills, strokes, and effect combinations.

The following behavior was verified:

  • Drop shadows render outside the shape.
  • Inner shadows remain clipped to the shape geometry.
  • Layer blur affects the complete visual content of the node.
  • Background blur affects only content behind the node while its fill, stroke, and shadows remain sharp.
  • Multiple effects preserve their configured order.
  • Disabled and removed effects are no longer rendered.
  • Effect changes are reflected immediately.
  • Background blur updates when underlying scene content changes.
  • Effects remain aligned while nodes are moved, scaled, and rotated.

Public API

  • No public API changes
  • Public API was added or changed
  • Breaking change

Added the shape-effects API and the public types required to configure:

  • drop shadows;
  • inner shadows;
  • layer blur;
  • background blur.

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

  • The project builds successfully
  • Type checking passes
  • Linting passes
  • Tests pass
  • Relevant behavior was tested in the Playground
  • New behavior has tests where practical
  • Documentation was updated where necessary
  • CHANGELOG.md was updated where necessary
  • No unrelated refactoring was included

…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.
@NiceArti
NiceArti merged commit 3d5c21a into main Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant