feat(effects): add Darkness action effect like freeze

Adds a fullscreen darkness vignette on click and a permanent shadow spot with a black radial gradient (40% edge, 100% center). Includes control panel UI, i18n, eraser support, and tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ivan Fontosh
2026-07-02 16:37:06 +08:00
parent 97c77a025a
commit 657e3c862e
8 changed files with 286 additions and 10 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ export class EffectsStore {
const before = this.state.instances.length;
const kept = this.state.instances.filter((i) => {
// Пятно льда не истекает по таймеру (только «очистить все» или ластик в UI).
if (i.type === 'ice') return true;
if (i.type === 'lightning' || i.type === 'sunbeam' || i.type === 'poisonCloud') {
if (i.type === 'ice' || i.type === 'shadow') return true;
if (i.type === 'lightning' || i.type === 'sunbeam' || i.type === 'poisonCloud' || i.type === 'darkness') {
return now - i.createdAtMs < i.lifetimeMs;
}
if (i.type === 'scorch') {