@pixerate/editor 0.137.0 → 0.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/index.cjs +2 -2
- package/dist/agent/index.d.cts +3 -3
- package/dist/agent/index.d.ts +3 -3
- package/dist/agent/index.js +1 -1
- package/dist/animation-editor/index.cjs +57 -57
- package/dist/animation-editor/index.d.cts +3 -3
- package/dist/animation-editor/index.d.ts +3 -3
- package/dist/animation-editor/index.js +4 -4
- package/dist/{arrange-CKXK_hf7.d.cts → arrange-j_mLiFMO.d.cts} +1 -1
- package/dist/{arrange-BUREmgD9.d.ts → arrange-q5HQvnnB.d.ts} +1 -1
- package/dist/{bezier-CZ2AhjID.d.cts → bezier-CUaH8hcK.d.cts} +1 -1
- package/dist/{bezier-Dywv3Bw8.d.ts → bezier-DPmdGwgR.d.ts} +1 -1
- package/dist/{brushTypes-C7N3EBK7.d.cts → brushTypes-MX5UVs_m.d.cts} +27 -2
- package/dist/{brushTypes-C7N3EBK7.d.ts → brushTypes-MX5UVs_m.d.ts} +27 -2
- package/dist/{brushes-DJmUbIgz.d.ts → brushes-B1ABdDAs.d.ts} +2 -108
- package/dist/{brushes-CnvZSYYU.d.cts → brushes-DnIdJYxN.d.cts} +2 -108
- package/dist/{brushstrokeRender-IMFY3FF6.cjs → brushstrokeRender-PP6NTF6M.cjs} +52 -24
- package/dist/brushstrokeRender-PP6NTF6M.cjs.map +1 -0
- package/dist/{brushstrokeRender-2FAXA3XC.js → brushstrokeRender-QGEYJ4OZ.js} +40 -12
- package/dist/brushstrokeRender-QGEYJ4OZ.js.map +1 -0
- package/dist/{builtins-Cc-bH-3U.d.cts → builtins-BakDiKWf.d.cts} +3 -2
- package/dist/{builtins-ZU1GJnUA.d.ts → builtins-CE33vyv2.d.ts} +3 -2
- package/dist/canvas/index.cjs +16 -9
- package/dist/canvas/index.cjs.map +1 -1
- package/dist/canvas/index.d.cts +56 -11
- package/dist/canvas/index.d.ts +56 -11
- package/dist/canvas/index.js +10 -3
- package/dist/canvas/index.js.map +1 -1
- package/dist/{chunk-QBWEH3IM.cjs → chunk-3T5O225T.cjs} +391 -76
- package/dist/chunk-3T5O225T.cjs.map +1 -0
- package/dist/{chunk-PRSRYHQD.cjs → chunk-7MN75BXI.cjs} +36 -36
- package/dist/{chunk-PRSRYHQD.cjs.map → chunk-7MN75BXI.cjs.map} +1 -1
- package/dist/{chunk-EQQMGO42.js → chunk-C2J7GOMJ.js} +18 -5
- package/dist/chunk-C2J7GOMJ.js.map +1 -0
- package/dist/{chunk-2XS6LTUP.cjs → chunk-C46AZEBE.cjs} +104 -339
- package/dist/chunk-C46AZEBE.cjs.map +1 -0
- package/dist/{chunk-XN2NBLV5.cjs → chunk-CM3LJPR3.cjs} +82 -82
- package/dist/{chunk-XN2NBLV5.cjs.map → chunk-CM3LJPR3.cjs.map} +1 -1
- package/dist/{chunk-HUO3TI4C.js → chunk-CPSMARTX.js} +6 -241
- package/dist/chunk-CPSMARTX.js.map +1 -0
- package/dist/{chunk-KEENUAFN.cjs → chunk-DLLUOVQX.cjs} +18 -5
- package/dist/chunk-DLLUOVQX.cjs.map +1 -0
- package/dist/{chunk-LSXXAJG3.js → chunk-J7DSKTKB.js} +5 -4
- package/dist/chunk-J7DSKTKB.js.map +1 -0
- package/dist/{chunk-6S6362D2.js → chunk-OV7253FC.js} +2 -2
- package/dist/{chunk-5FSRTP6E.js → chunk-PQFVLOMR.js} +319 -4
- package/dist/chunk-PQFVLOMR.js.map +1 -0
- package/dist/{chunk-OIBIRXRG.js → chunk-PSPLRQL6.js} +2 -2
- package/dist/{chunk-SYT2TLQF.js → chunk-QBARQGSG.js} +2 -2
- package/dist/{chunk-5OOIUXNJ.cjs → chunk-SXOTFV3V.cjs} +6 -6
- package/dist/{chunk-5OOIUXNJ.cjs.map → chunk-SXOTFV3V.cjs.map} +1 -1
- package/dist/{chunk-DFSZO2B5.cjs → chunk-UFL5N4DK.cjs} +5 -4
- package/dist/chunk-UFL5N4DK.cjs.map +1 -0
- package/dist/{chunk-3D77LOBM.js → chunk-V45ZTW4R.js} +3 -3
- package/dist/{chunk-TLCTTQFF.cjs → chunk-VEHVXRJU.cjs} +17 -17
- package/dist/{chunk-TLCTTQFF.cjs.map → chunk-VEHVXRJU.cjs.map} +1 -1
- package/dist/commands/index.cjs +2 -2
- package/dist/commands/index.d.cts +3 -3
- package/dist/commands/index.d.ts +3 -3
- package/dist/commands/index.js +1 -1
- package/dist/{export-DwnZ_hvQ.d.ts → export-BwFRiItd.d.ts} +4 -4
- package/dist/{export-CyJdfP_Z.d.cts → export-DuN3dpCg.d.cts} +4 -4
- package/dist/{blending-NgF3qo3d.d.ts → grain-COgYMMHv.d.ts} +58 -1
- package/dist/{blending-D7jCmjO6.d.cts → grain-GCt_O2kv.d.cts} +58 -1
- package/dist/image-editor/index.cjs +695 -677
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +11 -11
- package/dist/image-editor/index.d.ts +11 -11
- package/dist/image-editor/index.js +23 -5
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{opentype-a1KAW-qs.d.ts → opentype-T7bkbR2D.d.ts} +1 -1
- package/dist/{opentype-KR_jj6b_.d.cts → opentype-n99lqxEZ.d.cts} +1 -1
- package/dist/paint/index.cjs +21 -3
- package/dist/paint/index.cjs.map +1 -1
- package/dist/paint/index.d.cts +72 -7
- package/dist/paint/index.d.ts +72 -7
- package/dist/paint/index.js +20 -2
- package/dist/paint-editor/index.cjs +171 -171
- package/dist/paint-editor/index.cjs.map +1 -1
- package/dist/paint-editor/index.d.cts +75 -29
- package/dist/paint-editor/index.d.ts +75 -29
- package/dist/paint-editor/index.js +12 -12
- package/dist/{pathfinder-BHS4vQNm.d.cts → pathfinder-CQlldanv.d.cts} +2 -2
- package/dist/{pathfinder-BVvTIBMo.d.ts → pathfinder-D-V6JLSw.d.ts} +2 -2
- package/dist/{rand-Cw9VLrVC.d.cts → rand-D7nfeD1p.d.cts} +18 -2
- package/dist/{rand-8xbUb6ur.d.ts → rand-DJGxSq9d.d.ts} +18 -2
- package/dist/{svg-CSz3mzkw.d.ts → svg-CnDCpIy9.d.ts} +1 -1
- package/dist/{svg-DTb40ICU.d.cts → svg-DPJMUSNt.d.cts} +1 -1
- package/dist/vector/index.cjs +944 -944
- package/dist/vector/index.d.cts +10 -10
- package/dist/vector/index.d.ts +10 -10
- package/dist/vector/index.js +4 -4
- package/dist/{warp-DTOp0lON.d.cts → warp-C7rMWUgW.d.cts} +1 -1
- package/dist/{warp-pd7hrH4T.d.ts → warp-Doasjpyr.d.ts} +1 -1
- package/package.json +1 -1
- package/skills/pixerate-canvas/SKILL.md +12 -5
- package/dist/brushstrokeRender-2FAXA3XC.js.map +0 -1
- package/dist/brushstrokeRender-IMFY3FF6.cjs.map +0 -1
- package/dist/chunk-2XS6LTUP.cjs.map +0 -1
- package/dist/chunk-5FSRTP6E.js.map +0 -1
- package/dist/chunk-DFSZO2B5.cjs.map +0 -1
- package/dist/chunk-EQQMGO42.js.map +0 -1
- package/dist/chunk-HUO3TI4C.js.map +0 -1
- package/dist/chunk-KEENUAFN.cjs.map +0 -1
- package/dist/chunk-LSXXAJG3.js.map +0 -1
- package/dist/chunk-QBWEH3IM.cjs.map +0 -1
- /package/dist/{chunk-6S6362D2.js.map → chunk-OV7253FC.js.map} +0 -0
- /package/dist/{chunk-OIBIRXRG.js.map → chunk-PSPLRQL6.js.map} +0 -0
- /package/dist/{chunk-SYT2TLQF.js.map → chunk-QBARQGSG.js.map} +0 -0
- /package/dist/{chunk-3D77LOBM.js.map → chunk-V45ZTW4R.js.map} +0 -0
package/dist/commands/index.cjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkUFL5N4DKcjs = require('../chunk-UFL5N4DK.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -982,5 +982,5 @@ function createCanvasAnimationCommands(controller, options = {}) {
|
|
|
982
982
|
|
|
983
983
|
|
|
984
984
|
|
|
985
|
-
exports.CommandRegistry = CommandRegistry; exports.CommandRegistryError = CommandRegistryError; exports.DEFAULT_HISTORY_SHORTCUTS =
|
|
985
|
+
exports.CommandRegistry = CommandRegistry; exports.CommandRegistryError = CommandRegistryError; exports.DEFAULT_HISTORY_SHORTCUTS = _chunkUFL5N4DKcjs.DEFAULT_HISTORY_SHORTCUTS; exports.DEFAULT_RECENT_LIMIT = DEFAULT_RECENT_LIMIT; exports.PLATFORMS = _chunk26BVFKHUcjs.PLATFORMS; exports.ShortcutMap = _chunk26BVFKHUcjs.ShortcutMap; exports.chordToString = _chunk26BVFKHUcjs.chordToString; exports.codeFromKey = _chunk26BVFKHUcjs.codeFromKey; exports.codeToKeyText = _chunk26BVFKHUcjs.codeToKeyText; exports.createArrangeCommands = _chunkUFL5N4DKcjs.createArrangeCommands; exports.createCanvasAnimationCommands = createCanvasAnimationCommands; exports.createCommandPaletteController = createCommandPaletteController; exports.createCommandRegistry = createCommandRegistry; exports.createCommandToolProvider = createCommandToolProvider; exports.createComponentCommands = _chunkUFL5N4DKcjs.createComponentCommands; exports.createDrawCommands = _chunkUFL5N4DKcjs.createDrawCommands; exports.createHistoryCommands = _chunkUFL5N4DKcjs.createHistoryCommands; exports.createShapeCommands = _chunkUFL5N4DKcjs.createShapeCommands; exports.createSpreadsheetCommands = _chunkUFL5N4DKcjs.createSpreadsheetCommands; exports.defineCommand = defineCommand; exports.detectPlatform = _chunk26BVFKHUcjs.detectPlatform; exports.effectiveChord = _chunk26BVFKHUcjs.effectiveChord; exports.effectiveChordKey = _chunk26BVFKHUcjs.effectiveChordKey; exports.eventCode = _chunk26BVFKHUcjs.eventCode; exports.exactBonus = exactBonus; exports.formatShortcut = _chunk26BVFKHUcjs.formatShortcut; exports.fuzzyMatch = fuzzyMatch; exports.fuzzyScore = fuzzyScore; exports.hasVariantCommands = _chunkUFL5N4DKcjs.hasVariantCommands; exports.isEditableEventTarget = _chunk26BVFKHUcjs.isEditableEventTarget; exports.keyToCode = _chunk26BVFKHUcjs.keyToCode; exports.matchHistoryShortcut = _chunkUFL5N4DKcjs.matchHistoryShortcut; exports.matchPaletteHotkey = matchPaletteHotkey; exports.normalizeChord = _chunk26BVFKHUcjs.normalizeChord; exports.parseChord = _chunk26BVFKHUcjs.parseChord; exports.pushRecent = pushRecent; exports.rankCommands = rankCommands; exports.shortcutCode = _chunk26BVFKHUcjs.shortcutCode; exports.toShortcutBindings = _chunk26BVFKHUcjs.toShortcutBindings;
|
|
986
986
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-CaR7LC6W.cjs';
|
|
2
2
|
export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-CaR7LC6W.cjs';
|
|
3
3
|
import { a as AgentToolProvider } from '../registry-BqA1AZt0.cjs';
|
|
4
|
-
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-
|
|
4
|
+
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-BakDiKWf.cjs';
|
|
5
5
|
import '../schema-Di0CS6Pe.cjs';
|
|
6
6
|
import '../types-DsiXGmjo.cjs';
|
|
7
|
-
import '../arrange-
|
|
8
|
-
import '../brushTypes-
|
|
7
|
+
import '../arrange-j_mLiFMO.cjs';
|
|
8
|
+
import '../brushTypes-MX5UVs_m.cjs';
|
|
9
9
|
|
|
10
10
|
/** The fields `rankCommands` searches (a `CommandEntry` satisfies it). */
|
|
11
11
|
interface RankableCommand {
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a as CommandRegistry, P as Platform, b as CommandResult, c as CommandEntry, K as KeyboardEventLike, C as CommandSpec } from '../registry-rVtFJjRM.js';
|
|
2
2
|
export { d as Chord, e as CommandErrorCode, f as CommandHistoryTarget, g as CommandListOptions, h as CommandParamsSchema, i as CommandRegistryError, j as CommandRegistryOptions, E as EffectiveChord, k as PLATFORMS, S as ShortcutBinding, l as ShortcutConflict, m as ShortcutInput, n as ShortcutMap, o as ShortcutMapOptions, p as ShortcutMatch, q as ShortcutResolveOptions, r as chordToString, s as codeFromKey, t as codeToKeyText, u as createCommandRegistry, v as defineCommand, w as detectPlatform, x as effectiveChord, y as effectiveChordKey, z as eventCode, A as formatShortcut, B as isEditableEventTarget, D as keyToCode, F as normalizeChord, G as parseChord, H as shortcutCode, I as toShortcutBindings } from '../registry-rVtFJjRM.js';
|
|
3
3
|
import { a as AgentToolProvider } from '../registry-D-4fit9C.js';
|
|
4
|
-
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-
|
|
4
|
+
export { A as ArrangeCommandOptions, a as ArrangeCommandTarget, C as ComponentCommandOptions, b as ComponentCommandTarget, D as DEFAULT_HISTORY_SHORTCUTS, c as DrawCommandOptions, d as DrawCommandTarget, H as HistoryCommandOptions, e as HistoryCommandTarget, S as ShapeCommandOptions, f as ShapeCommandTarget, g as SpreadsheetCommandOptions, h as SpreadsheetCommandTarget, i as createArrangeCommands, j as createComponentCommands, k as createDrawCommands, l as createHistoryCommands, m as createShapeCommands, n as createSpreadsheetCommands, o as hasVariantCommands, p as matchHistoryShortcut } from '../builtins-CE33vyv2.js';
|
|
5
5
|
import '../schema-Di0CS6Pe.js';
|
|
6
6
|
import '../types-DsiXGmjo.js';
|
|
7
|
-
import '../arrange-
|
|
8
|
-
import '../brushTypes-
|
|
7
|
+
import '../arrange-q5HQvnnB.js';
|
|
8
|
+
import '../brushTypes-MX5UVs_m.js';
|
|
9
9
|
|
|
10
10
|
/** The fields `rankCommands` searches (a `CommandEntry` satisfies it). */
|
|
11
11
|
interface RankableCommand {
|
package/dist/commands/index.js
CHANGED
|
@@ -2,11 +2,11 @@ import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as
|
|
|
2
2
|
import { c as PixelSurface, a as BlendMode, T as TiledSurface, R as RasterRect } from './surface-1MRncXpF.js';
|
|
3
3
|
import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.js';
|
|
4
4
|
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2, H as Homography } from './types-CwMPoRMU.js';
|
|
5
|
-
import { B as BezierPath } from './bezier-
|
|
6
|
-
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-
|
|
5
|
+
import { B as BezierPath } from './bezier-DPmdGwgR.js';
|
|
6
|
+
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-Doasjpyr.js';
|
|
7
7
|
import { e as EffectValue, a3 as VectorSubpath, v as EffectsSlot, E as EffectProvider, b as EffectPixels, f as EffectDescription, X as Vec2$1 } from './helpers-C-RgeyvH.js';
|
|
8
|
-
import { B as BrushSettings,
|
|
9
|
-
import { R as RetouchSettings, C as CloneTransform, a as RetouchApply, b as RetouchPaint } from './rand-
|
|
8
|
+
import { B as BrushSettings, f as PaintSource, M as MixerSettings, h as MixerLoad, i as StrokeCoverage, j as MixerTarget, k as MixerStroke, S as StrokePoint, C as CoverageMap, a as PaintTileTarget, l as StrokeApply } from './grain-COgYMMHv.js';
|
|
9
|
+
import { R as RetouchSettings, C as CloneTransform, a as RetouchApply, b as RetouchPaint } from './rand-DJGxSq9d.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A selection: one 8-bit coverage value per image pixel (0 = not selected, 255 = fully
|
|
@@ -2,11 +2,11 @@ import { a2 as RasterLayerBase, a3 as RasterMask$1, a5 as RasterPixelLayer, H as
|
|
|
2
2
|
import { c as PixelSurface, a as BlendMode, T as TiledSurface, R as RasterRect } from './surface-1MRncXpF.cjs';
|
|
3
3
|
import { b as BuiltinProfileId, j as Intent, P as Profile, T as Transform, d as ColorSpace } from './builtin-CY97ppKM.cjs';
|
|
4
4
|
import { A as AffineMatrix, Q as Quad, a as WarpMesh, V as Vec2, H as Homography } from './types-CwMPoRMU.cjs';
|
|
5
|
-
import { B as BezierPath } from './bezier-
|
|
6
|
-
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-
|
|
5
|
+
import { B as BezierPath } from './bezier-CUaH8hcK.cjs';
|
|
6
|
+
import { b as TextRun, P as ParagraphRun, T as TextShaper, c as ParagraphStyle, d as TextStyle, L as LaidFragment, W as WarpPreset, e as TextLayout } from './warp-C7rMWUgW.cjs';
|
|
7
7
|
import { e as EffectValue, a3 as VectorSubpath, v as EffectsSlot, E as EffectProvider, b as EffectPixels, f as EffectDescription, X as Vec2$1 } from './helpers-v6GMazzg.cjs';
|
|
8
|
-
import { B as BrushSettings,
|
|
9
|
-
import { R as RetouchSettings, C as CloneTransform, a as RetouchApply, b as RetouchPaint } from './rand-
|
|
8
|
+
import { B as BrushSettings, f as PaintSource, M as MixerSettings, h as MixerLoad, i as StrokeCoverage, j as MixerTarget, k as MixerStroke, S as StrokePoint, C as CoverageMap, a as PaintTileTarget, l as StrokeApply } from './grain-GCt_O2kv.cjs';
|
|
9
|
+
import { R as RetouchSettings, C as CloneTransform, a as RetouchApply, b as RetouchPaint } from './rand-D7nfeD1p.cjs';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* A selection: one 8-bit coverage value per image pixel (0 = not selected, 255 = fully
|
|
@@ -1023,4 +1023,61 @@ declare class SmudgeTip {
|
|
|
1023
1023
|
dab(medium: TileMedium, d: SmudgeDab, rect: RasterRect, cov: ArrayLike<number>): void;
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
|
|
1026
|
+
/** Grain generators. Each is our own procedural pattern (no scanned textures). */
|
|
1027
|
+
type GrainPattern = 'smooth' | 'cold-pressed' | 'hot-pressed' | 'rough' | 'vellum' | 'laid' | 'ingres' | 'sanded' | 'canvas' | 'linen' | 'gesso';
|
|
1028
|
+
declare const GRAIN_PATTERNS: readonly GrainPattern[];
|
|
1029
|
+
/** How a height map is tuned for one kind of media. */
|
|
1030
|
+
interface GrainTuning {
|
|
1031
|
+
/** Height contrast around the middle, 0..3 (default 1). */
|
|
1032
|
+
contrast: number;
|
|
1033
|
+
/** Swap peaks and valleys (default false). */
|
|
1034
|
+
invert: boolean;
|
|
1035
|
+
}
|
|
1036
|
+
type PaperTiling = 'repeat' | 'mirror';
|
|
1037
|
+
/** What a `PaperGrain` reads from a paper (the paint editor's `PaperSettings` has it all). */
|
|
1038
|
+
interface PaperGrainSettings {
|
|
1039
|
+
pattern: GrainPattern;
|
|
1040
|
+
/** Grain seed: another seed gives another sheet of the same paper. */
|
|
1041
|
+
seed: number;
|
|
1042
|
+
/** Grain scale: 1 is the pattern's natural size, 2 twice as coarse. */
|
|
1043
|
+
scale: number;
|
|
1044
|
+
tiling: PaperTiling;
|
|
1045
|
+
dry: GrainTuning;
|
|
1046
|
+
wet: GrainTuning;
|
|
1047
|
+
}
|
|
1048
|
+
/** Side of the generated grain tile in pixels (at scale 1). */
|
|
1049
|
+
declare const GRAIN_TILE = 256;
|
|
1050
|
+
/** The raw height map of a pattern (`GRAIN_TILE` square, 0..1), generated once per pattern and seed. */
|
|
1051
|
+
declare function grainHeights(pattern: GrainPattern, seed: number, size?: number): Float32Array;
|
|
1052
|
+
/**
|
|
1053
|
+
* A paper's height field over the canvas (document pixels), tuned for one kind of media. Read it
|
|
1054
|
+
* with `at(x, y)`: bilinear, tiled by `paper.tiling`, at `paper.scale`.
|
|
1055
|
+
*/
|
|
1056
|
+
declare class PaperGrain {
|
|
1057
|
+
readonly size = 256;
|
|
1058
|
+
private readonly heights;
|
|
1059
|
+
private readonly scale;
|
|
1060
|
+
private readonly mirror;
|
|
1061
|
+
readonly flat: boolean;
|
|
1062
|
+
constructor(paper: PaperGrainSettings, media?: 'dry' | 'wet');
|
|
1063
|
+
/** Tile cell index for a coordinate in grain pixels (mirrored on odd tiles when mirroring). */
|
|
1064
|
+
private wrap;
|
|
1065
|
+
/** Height 0..1 at document position (x, y). */
|
|
1066
|
+
at(x: number, y: number): number;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* How much of a dry dab lands at grain height `h` (0..1): the media catches the peaks first, and
|
|
1070
|
+
* pressure pushes it into the valleys. `depth` is the paper's grain depth times the brush's grain
|
|
1071
|
+
* response; at 0 everything lands (1).
|
|
1072
|
+
*/
|
|
1073
|
+
declare function grainCatch(h: number, depth: number, pressure: number): number;
|
|
1074
|
+
/**
|
|
1075
|
+
* How much of a finished standalone stroke stays at grain height `h` (0..1): `renderBrushstroke`
|
|
1076
|
+
* applies it once to the whole stroke's coverage. Unlike `grainCatch` (applied dab by dab while a
|
|
1077
|
+
* painter goes over the paper, and filling the valleys at full pressure), it keeps texture at full
|
|
1078
|
+
* pressure, which is all a mouse reports: the valleys lose up to `depth × (1.4 − 0.6 × pressure)`
|
|
1079
|
+
* of the paint, the peaks keep it all.
|
|
1080
|
+
*/
|
|
1081
|
+
declare function strokeGrainCatch(h: number, depth: number, pressure: number): number;
|
|
1082
|
+
|
|
1083
|
+
export { addPaintGradientStop as $, PAINT_GRADIENT_REPEATS as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_REPEAT_LABELS as E, PAINT_GRADIENT_SPACES as F, type GrainPattern as G, PAINT_GRADIENT_SPACE_LABELS as H, PAINT_SOURCE_JSON_SCHEMA as I, type PaintColorSource as J, type PaintDabParams as K, type PaintGradientKit as L, type MixerSettings as M, type PaintGradientMapping as N, type PaintGradientMappingKind as O, PaperGrain as P, type PaintGradientRepeat as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, type PaintGradientSample as U, PaintGradientSampler as V, type PaintGradientSpace as W, type PaintGradientStop as X, type PaintRgb as Y, PaintSourceError as Z, type PaperGrainSettings as _, type PaintTileTarget as a, grainCatch as a0, grainHeights as a1, hexToPaintRgb as a2, isGradientPaint as a3, normalizeHexColor as a4, paintGradientMappingFor as a5, paintSourceColor as a6, paintSourceCss as a7, parsePaintSource as a8, readPaintSource as a9, blendRadius as aA, blenderDab as aB, cleanMixer as aC, coverageTileCoord as aD, createBlenderScratch as aE, dabCoverage as aF, dabRect as aG, exchangeRates as aH, gradientDabColor as aI, loadMixer as aJ, mixerRates as aK, normalizeBlender as aL, normalizeBrush as aM, normalizeMixer as aN, normalizeSmudge as aO, put255 as aP, rasterizeDab as aQ, smoothPoints as aR, strokeGrainCatch as aS, tipFalloff as aT, tipReach as aU, tipShape as aV, walkDabs as aW, removePaintGradientStop as aa, resolvePaintGradient as ab, reversePaintGradient as ac, scalePaintGradient as ad, solidPaint as ae, updatePaintGradientStop as af, type BlenderScratch as ag, DEFAULT_BLENDER as ah, DEFAULT_BRUSH as ai, DEFAULT_MIXER as aj, DEFAULT_SMUDGE as ak, DabWalker as al, EMPTY_MIXER_LOAD as am, type ExchangeRates as an, MIXER_DRAIN as ao, MIXER_PICKUP_RATE as ap, MIXING_MODELS as aq, PaintExchange as ar, type PaintMedium as as, type PaintSample as at, type SmudgeDab as au, SmudgeTip as av, TIP_GRADIENT_STEPS as aw, type TileMediumOptions as ax, applyStrokeToDeepTile as ay, applyStrokeToTile as az, type PaintGradientSource as b, type MixingModel as c, type BlenderSettings as d, type SmudgeSettings as e, type PaintSource as f, type PaintPixels as g, type MixerLoad as h, StrokeCoverage as i, type MixerTarget as j, MixerStroke as k, type StrokeApply as l, type PaperTiling as m, type GrainTuning as n, DEFAULT_PAINT_GRADIENT as o, DEFAULT_PAINT_GRADIENT_MAPPING as p, GRAIN_PATTERNS as q, GRAIN_TILE as r, MAX_BRUSH_SIZE as s, PAINT_COLOR_JSON_SCHEMA as t, PAINT_GRADIENT_FULL_SPEED as u, PAINT_GRADIENT_JSON_SCHEMA as v, PAINT_GRADIENT_KIT as w, PAINT_GRADIENT_MAPPINGS as x, PAINT_GRADIENT_MAPPING_LABELS as y, PAINT_GRADIENT_PRESETS as z };
|
|
@@ -1023,4 +1023,61 @@ declare class SmudgeTip {
|
|
|
1023
1023
|
dab(medium: TileMedium, d: SmudgeDab, rect: RasterRect, cov: ArrayLike<number>): void;
|
|
1024
1024
|
}
|
|
1025
1025
|
|
|
1026
|
-
|
|
1026
|
+
/** Grain generators. Each is our own procedural pattern (no scanned textures). */
|
|
1027
|
+
type GrainPattern = 'smooth' | 'cold-pressed' | 'hot-pressed' | 'rough' | 'vellum' | 'laid' | 'ingres' | 'sanded' | 'canvas' | 'linen' | 'gesso';
|
|
1028
|
+
declare const GRAIN_PATTERNS: readonly GrainPattern[];
|
|
1029
|
+
/** How a height map is tuned for one kind of media. */
|
|
1030
|
+
interface GrainTuning {
|
|
1031
|
+
/** Height contrast around the middle, 0..3 (default 1). */
|
|
1032
|
+
contrast: number;
|
|
1033
|
+
/** Swap peaks and valleys (default false). */
|
|
1034
|
+
invert: boolean;
|
|
1035
|
+
}
|
|
1036
|
+
type PaperTiling = 'repeat' | 'mirror';
|
|
1037
|
+
/** What a `PaperGrain` reads from a paper (the paint editor's `PaperSettings` has it all). */
|
|
1038
|
+
interface PaperGrainSettings {
|
|
1039
|
+
pattern: GrainPattern;
|
|
1040
|
+
/** Grain seed: another seed gives another sheet of the same paper. */
|
|
1041
|
+
seed: number;
|
|
1042
|
+
/** Grain scale: 1 is the pattern's natural size, 2 twice as coarse. */
|
|
1043
|
+
scale: number;
|
|
1044
|
+
tiling: PaperTiling;
|
|
1045
|
+
dry: GrainTuning;
|
|
1046
|
+
wet: GrainTuning;
|
|
1047
|
+
}
|
|
1048
|
+
/** Side of the generated grain tile in pixels (at scale 1). */
|
|
1049
|
+
declare const GRAIN_TILE = 256;
|
|
1050
|
+
/** The raw height map of a pattern (`GRAIN_TILE` square, 0..1), generated once per pattern and seed. */
|
|
1051
|
+
declare function grainHeights(pattern: GrainPattern, seed: number, size?: number): Float32Array;
|
|
1052
|
+
/**
|
|
1053
|
+
* A paper's height field over the canvas (document pixels), tuned for one kind of media. Read it
|
|
1054
|
+
* with `at(x, y)`: bilinear, tiled by `paper.tiling`, at `paper.scale`.
|
|
1055
|
+
*/
|
|
1056
|
+
declare class PaperGrain {
|
|
1057
|
+
readonly size = 256;
|
|
1058
|
+
private readonly heights;
|
|
1059
|
+
private readonly scale;
|
|
1060
|
+
private readonly mirror;
|
|
1061
|
+
readonly flat: boolean;
|
|
1062
|
+
constructor(paper: PaperGrainSettings, media?: 'dry' | 'wet');
|
|
1063
|
+
/** Tile cell index for a coordinate in grain pixels (mirrored on odd tiles when mirroring). */
|
|
1064
|
+
private wrap;
|
|
1065
|
+
/** Height 0..1 at document position (x, y). */
|
|
1066
|
+
at(x: number, y: number): number;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* How much of a dry dab lands at grain height `h` (0..1): the media catches the peaks first, and
|
|
1070
|
+
* pressure pushes it into the valleys. `depth` is the paper's grain depth times the brush's grain
|
|
1071
|
+
* response; at 0 everything lands (1).
|
|
1072
|
+
*/
|
|
1073
|
+
declare function grainCatch(h: number, depth: number, pressure: number): number;
|
|
1074
|
+
/**
|
|
1075
|
+
* How much of a finished standalone stroke stays at grain height `h` (0..1): `renderBrushstroke`
|
|
1076
|
+
* applies it once to the whole stroke's coverage. Unlike `grainCatch` (applied dab by dab while a
|
|
1077
|
+
* painter goes over the paper, and filling the valleys at full pressure), it keeps texture at full
|
|
1078
|
+
* pressure, which is all a mouse reports: the valleys lose up to `depth × (1.4 − 0.6 × pressure)`
|
|
1079
|
+
* of the paint, the peaks keep it all.
|
|
1080
|
+
*/
|
|
1081
|
+
declare function strokeGrainCatch(h: number, depth: number, pressure: number): number;
|
|
1082
|
+
|
|
1083
|
+
export { addPaintGradientStop as $, PAINT_GRADIENT_REPEATS as A, type BrushSettings as B, CoverageMap as C, type Dab as D, PAINT_GRADIENT_REPEAT_LABELS as E, PAINT_GRADIENT_SPACES as F, type GrainPattern as G, PAINT_GRADIENT_SPACE_LABELS as H, PAINT_SOURCE_JSON_SCHEMA as I, type PaintColorSource as J, type PaintDabParams as K, type PaintGradientKit as L, type MixerSettings as M, type PaintGradientMapping as N, type PaintGradientMappingKind as O, PaperGrain as P, type PaintGradientRepeat as Q, type RgbTriple as R, type StrokePoint as S, TileMedium as T, type PaintGradientSample as U, PaintGradientSampler as V, type PaintGradientSpace as W, type PaintGradientStop as X, type PaintRgb as Y, PaintSourceError as Z, type PaperGrainSettings as _, type PaintTileTarget as a, grainCatch as a0, grainHeights as a1, hexToPaintRgb as a2, isGradientPaint as a3, normalizeHexColor as a4, paintGradientMappingFor as a5, paintSourceColor as a6, paintSourceCss as a7, parsePaintSource as a8, readPaintSource as a9, blendRadius as aA, blenderDab as aB, cleanMixer as aC, coverageTileCoord as aD, createBlenderScratch as aE, dabCoverage as aF, dabRect as aG, exchangeRates as aH, gradientDabColor as aI, loadMixer as aJ, mixerRates as aK, normalizeBlender as aL, normalizeBrush as aM, normalizeMixer as aN, normalizeSmudge as aO, put255 as aP, rasterizeDab as aQ, smoothPoints as aR, strokeGrainCatch as aS, tipFalloff as aT, tipReach as aU, tipShape as aV, walkDabs as aW, removePaintGradientStop as aa, resolvePaintGradient as ab, reversePaintGradient as ac, scalePaintGradient as ad, solidPaint as ae, updatePaintGradientStop as af, type BlenderScratch as ag, DEFAULT_BLENDER as ah, DEFAULT_BRUSH as ai, DEFAULT_MIXER as aj, DEFAULT_SMUDGE as ak, DabWalker as al, EMPTY_MIXER_LOAD as am, type ExchangeRates as an, MIXER_DRAIN as ao, MIXER_PICKUP_RATE as ap, MIXING_MODELS as aq, PaintExchange as ar, type PaintMedium as as, type PaintSample as at, type SmudgeDab as au, SmudgeTip as av, TIP_GRADIENT_STEPS as aw, type TileMediumOptions as ax, applyStrokeToDeepTile as ay, applyStrokeToTile as az, type PaintGradientSource as b, type MixingModel as c, type BlenderSettings as d, type SmudgeSettings as e, type PaintSource as f, type PaintPixels as g, type MixerLoad as h, StrokeCoverage as i, type MixerTarget as j, MixerStroke as k, type StrokeApply as l, type PaperTiling as m, type GrainTuning as n, DEFAULT_PAINT_GRADIENT as o, DEFAULT_PAINT_GRADIENT_MAPPING as p, GRAIN_PATTERNS as q, GRAIN_TILE as r, MAX_BRUSH_SIZE as s, PAINT_COLOR_JSON_SCHEMA as t, PAINT_GRADIENT_FULL_SPEED as u, PAINT_GRADIENT_JSON_SCHEMA as v, PAINT_GRADIENT_KIT as w, PAINT_GRADIENT_MAPPINGS as x, PAINT_GRADIENT_MAPPING_LABELS as y, PAINT_GRADIENT_PRESETS as z };
|