Skip to content

Conversation

@dunkeroni
Copy link
Owner

Summary

Adds two new features that expose utility of the globalCompositeOperation to the canvas raster layers.
Color Blend mode can be enabled on a layer via the right click menu, and will persistently update with layer changes as the user draws/edits. Merging, creating a raster layer out of the current view, or applying booleans will bake the composite view in.
Boolean operations are exposed via a submenu on right click. They are:

  • Intersection (keep current layer where it overlaps the next layer down)
  • Cut Out (keep lower layer where it overlaps current layer)
  • Cut Away (keep current layer where it does not overlap the next layer down)
  • Exclude (keep the merge of both layers where they do not overlap)

Related Issues / Discussions

QA Instructions

Merge Plan

…menu; support per-layer globalCompositeOperation in compositor; UI to toggle and select color blend modes (multiply, screen, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, hue, saturation, color, luminosity).
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for per-layer blend modes (global composite operations) to raster and control layers. Users can now apply different blending operations to individual layers and perform boolean operations between layers.

  • Adds a new globalCompositeOperation optional field to raster and control layer states
  • Implements UI components for selecting and managing blend modes
  • Adds boolean operation support (intersection, cutout, cut-away, exclude) using composite operations

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
compositeOperations.ts Defines available composite operations as a constant array and exports the CompositeOperation type
types.ts Adds globalCompositeOperation field to CanvasRasterLayerState schema using the new COMPOSITE_OPERATIONS enum
canvasSlice.ts Adds reducer action for updating the globalCompositeOperation field on raster layers
CanvasEntityAdapterRasterLayer.ts Implements syncing of composite operation to canvas element's mix-blend-mode CSS property for live preview
CanvasCompositorModule.ts Updates compositing logic to apply per-layer composite operations with proper priority handling
RasterLayerMenuItemsCompositeOperation.tsx New component for toggling blend mode on/off from layer menu
RasterLayerMenuItemsBooleanSubMenu.tsx New component providing boolean operations submenu using composite operations
RasterLayerCompositeOperationSettings.tsx New component for selecting specific blend mode from a dropdown
RasterLayer.tsx Integrates composite operation settings panel into layer UI
RasterLayerMenuItems.tsx Adds new menu items for composite operations and boolean operations
en.json Adds translation strings for blend mode and boolean operation UI labels

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dunkeroni dunkeroni requested a review from Copilot November 2, 2025 06:43
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants