Files
image-studio/core/base-layer.ts
syntaxbullet 5eaf37ba28 feat: enhance layer mask handling and opacity management
- Introduced `getLayerMask` utility to streamline layer mask retrieval.
- Updated layer rendering logic to incorporate layer masks and opacity adjustments.
- Added functionality to prevent dropping a group into its descendants.
- Enhanced image texture rendering to support opacity parameters across various rendering functions.
- Implemented group layer bounds application for better scaling and positioning.
- Added tests to ensure correct behavior when handling layer masks and group layers.
- Created new types for asset generation provenance to track generated assets more effectively.
2026-07-05 16:06:23 +02:00

20 lines
466 B
TypeScript

import type { Transform } from "./geometry";
import type { LayerId } from "./id";
import type { LayerMask } from "./layer-mask";
export type LayerClippingMask = {
maskLayerId: LayerId;
};
export type BaseLayer = {
id: LayerId;
name: string;
visible: boolean;
locked: boolean;
opacity: number;
transform: Transform;
layerMask?: LayerMask;
/** @deprecated Use layerMask. Kept readable for older documents. */
clippingMask?: LayerClippingMask;
};