feat(control): инструмент «Маркер» на области видимости
Добавлена кисть маркера на пульте и презентации с настройками в панели эффектов; штрихи привязаны к жёлтой рамке, ластик и очистка работают с отдельным сессионным слоем. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,6 +12,7 @@ export type EffectToolType =
|
||||
| 'freeze'
|
||||
| 'exploreBrush'
|
||||
| 'closeBrush'
|
||||
| 'marker'
|
||||
| 'eraser';
|
||||
|
||||
export type EffectInstanceType =
|
||||
|
||||
@@ -9,6 +9,7 @@ export * from './npcDisposition';
|
||||
export * from './npcExternalUrl';
|
||||
export * from './npcs';
|
||||
export * from './sceneDarkness';
|
||||
export * from './sceneMarker';
|
||||
export * from './sceneGrid';
|
||||
export * from './sceneGridSnap';
|
||||
export * from './tokenPath';
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
import type { NPoint } from './effects';
|
||||
|
||||
export type SceneMarkerBrushShape = 'circle' | 'square';
|
||||
|
||||
export type SceneMarkerStroke = {
|
||||
id: string;
|
||||
seed: number;
|
||||
createdAtMs: number;
|
||||
points: NPoint[];
|
||||
radiusN: number;
|
||||
color: string;
|
||||
shape?: SceneMarkerBrushShape;
|
||||
};
|
||||
|
||||
export type SceneMarkerDraft = {
|
||||
points: NPoint[];
|
||||
radiusN: number;
|
||||
color: string;
|
||||
shape?: SceneMarkerBrushShape;
|
||||
};
|
||||
|
||||
export type SceneMarkerState = {
|
||||
revision: number;
|
||||
cacheKey: string | null;
|
||||
strokes: SceneMarkerStroke[];
|
||||
draft: SceneMarkerDraft | null;
|
||||
};
|
||||
|
||||
export type SceneMarkerEvent =
|
||||
| { kind: 'draft.set'; draft: SceneMarkerDraft | null }
|
||||
| { kind: 'stroke.add'; stroke: SceneMarkerStroke }
|
||||
| { kind: 'strokes.erase'; points: NPoint[]; radiusN: number }
|
||||
| { kind: 'strokes.clear' };
|
||||
|
||||
export function normalizeSceneMarkerBrushShape(raw: unknown): SceneMarkerBrushShape {
|
||||
return raw === 'square' ? 'square' : 'circle';
|
||||
}
|
||||
Reference in New Issue
Block a user