ag-psd 30.2.0 → 31.0.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/.v8-cache/v24.13.1-x64-cf738c9d/01e5e61b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/05135617 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/06423db9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/06e765df +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0930679d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/09519a62 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0a6607b0 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0ad8fa6e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0d390e10 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0dfa7b16 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/0e9e09db +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1130885f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1222cb8c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/15e2c039 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1a2d469d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1b300c82 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1bc3d370 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1e44e5af +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1efa10a1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/1f6c8743 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/20b27e40 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/257c62ba +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/25d60154 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/26f822f3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2a1e2a8d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2b02fded +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2c76dc0d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/2deb286a +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/32018e44 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/341402c3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/34e0fa2e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/3bbf643e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/3ceff89e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/404f5cdc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4087aa2b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4376c1f9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/44903df4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/44d58dc8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4511bacf +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/47da0ce8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/48cd54a9 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4d938476 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4ec6d390 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/4f5702bd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/514cc428 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/557d3b42 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/56abbff7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/57b540ee +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/5e20c081 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/651c4ada +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/652a0d59 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6a0e89ee +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6af33b91 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6c2562d2 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6dae0cfa +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/6e2529ce +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/71df9cb3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/72e1d543 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/75519c80 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/79bf115c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7a39347c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7b83e3d3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7cd71bc5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7da78512 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/7ea06cea +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/82c3b573 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/84c186e4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8607bd36 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/87372817 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/87cf2209 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/882aaa05 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8a4d3de8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/8e223473 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/92b7aefd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/932f0770 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/937c03a1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/991e4758 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9af658fb +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9ed80ba5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/9f0dc993 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a19c0c4f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a6409d95 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/a7e80865 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ac9802c6 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/acc36e66 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ad11e2dc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b0c8fcd8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b1762958 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b3c2fab7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b5b3329b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/b806679e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/bc1cdd48 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/bc7ebd1d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c0b789d2 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c314aece +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c399a5dc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c681cbc8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c6834ffc +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/c6f12ed5 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cb0f0a3d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cbcb7c95 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cdd9107c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cdf2c4a3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cfc49f4f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/cff9434a +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d02dd6f7 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d0507bf3 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d60fce19 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d733d619 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/d75b7803 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/dc86f000 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/defa4f7f +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e03e2acd +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e0e3f52c +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e158d332 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6735171 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6745c2b +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6b99945 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e6d8ceb8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/e7ffec37 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ea33b6de +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/eaafa3c4 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ebb50fca +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ec805f2e +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/edaef8f1 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/ee4401c8 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/eeeebdfe +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/f3d51676 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/f7b50a75 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fa58ca72 +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fc97d72d +0 -0
- package/.v8-cache/v24.13.1-x64-cf738c9d/fd0a2987 +0 -0
- package/CHANGELOG.md +6 -0
- package/README.md +64 -0
- package/TODO.md +2 -0
- package/dist/abr.d.ts +196 -196
- package/dist/abr.js +364 -365
- package/dist/abr.js.map +1 -1
- package/dist/additionalInfo.d.ts +26 -26
- package/dist/additionalInfo.js +3478 -3478
- package/dist/additionalInfo.js.map +1 -1
- package/dist/ase.d.ts +32 -32
- package/dist/ase.js +81 -82
- package/dist/ase.js.map +1 -1
- package/dist/bundle.js +12380 -12259
- package/dist/csh.d.ts +10 -10
- package/dist/csh.js +35 -36
- package/dist/csh.js.map +1 -1
- package/dist/descriptor.d.ts +601 -601
- package/dist/descriptor.js +2003 -2003
- package/dist/descriptor.js.map +1 -1
- package/dist/effectsHelpers.d.ts +5 -5
- package/dist/effectsHelpers.js +286 -287
- package/dist/effectsHelpers.js.map +1 -1
- package/dist/engineData.d.ts +2 -2
- package/dist/engineData.js +334 -335
- package/dist/engineData.js.map +1 -1
- package/dist/engineData2.d.ts +2 -2
- package/dist/engineData2.js +409 -410
- package/dist/engineData2.js.map +1 -1
- package/dist/helpers.d.ts +74 -74
- package/dist/helpers.js +353 -342
- package/dist/helpers.js.map +1 -1
- package/dist/imageResources.d.ts +17 -17
- package/dist/imageResources.js +1040 -1040
- package/dist/imageResources.js.map +1 -1
- package/dist/index.d.ts +20 -22
- package/dist/index.js +61 -56
- package/dist/index.js.map +1 -1
- package/dist/initializeCanvas.d.ts +1 -1
- package/dist/initializeCanvas.js +9 -10
- package/dist/initializeCanvas.js.map +1 -1
- package/dist/jpeg.d.ts +1 -1
- package/dist/jpeg.js +1020 -1021
- package/dist/jpeg.js.map +1 -1
- package/dist/psd.d.ts +1877 -1873
- package/dist/psd.js +45 -45
- package/dist/psd.js.map +1 -1
- package/dist/psdReader.d.ts +52 -45
- package/dist/psdReader.js +1385 -1282
- package/dist/psdReader.js.map +1 -1
- package/dist/psdWriter.d.ts +34 -34
- package/dist/psdWriter.js +834 -824
- package/dist/psdWriter.js.map +1 -1
- package/dist/text.d.ts +179 -179
- package/dist/text.js +552 -553
- package/dist/text.js.map +1 -1
- package/dist/utf8.d.ts +4 -6
- package/dist/utf8.js +156 -157
- package/dist/utf8.js.map +1 -1
- package/dist-es/abr.d.ts +196 -196
- package/dist-es/abr.js +364 -361
- package/dist-es/abr.js.map +1 -1
- package/dist-es/additionalInfo.d.ts +26 -26
- package/dist-es/additionalInfo.js +3478 -3472
- package/dist-es/additionalInfo.js.map +1 -1
- package/dist-es/ase.d.ts +32 -32
- package/dist-es/ase.js +81 -78
- package/dist-es/ase.js.map +1 -1
- package/dist-es/csh.d.ts +10 -10
- package/dist-es/csh.js +35 -32
- package/dist-es/csh.js.map +1 -1
- package/dist-es/descriptor.d.ts +601 -601
- package/dist-es/descriptor.js +2003 -1970
- package/dist-es/descriptor.js.map +1 -1
- package/dist-es/effectsHelpers.d.ts +5 -5
- package/dist-es/effectsHelpers.js +286 -282
- package/dist-es/effectsHelpers.js.map +1 -1
- package/dist-es/engineData.d.ts +2 -2
- package/dist-es/engineData.js +334 -330
- package/dist-es/engineData.js.map +1 -1
- package/dist-es/engineData2.d.ts +2 -2
- package/dist-es/engineData2.js +409 -406
- package/dist-es/engineData2.js.map +1 -1
- package/dist-es/helpers.d.ts +74 -74
- package/dist-es/helpers.js +353 -324
- package/dist-es/helpers.js.map +1 -1
- package/dist-es/imageResources.d.ts +17 -17
- package/dist-es/imageResources.js +1040 -1037
- package/dist-es/imageResources.js.map +1 -1
- package/dist-es/index.d.ts +20 -22
- package/dist-es/index.js +61 -33
- package/dist-es/index.js.map +1 -1
- package/dist-es/initializeCanvas.d.ts +1 -1
- package/dist-es/initializeCanvas.js +9 -6
- package/dist-es/initializeCanvas.js.map +1 -1
- package/dist-es/jpeg.d.ts +1 -1
- package/dist-es/jpeg.js +1020 -1017
- package/dist-es/jpeg.js.map +1 -1
- package/dist-es/psd.d.ts +1877 -1873
- package/dist-es/psd.js +45 -42
- package/dist-es/psd.js.map +1 -1
- package/dist-es/psdReader.d.ts +52 -45
- package/dist-es/psdReader.js +1385 -1244
- package/dist-es/psdReader.js.map +1 -1
- package/dist-es/psdWriter.d.ts +34 -34
- package/dist-es/psdWriter.js +834 -794
- package/dist-es/psdWriter.js.map +1 -1
- package/dist-es/text.d.ts +179 -179
- package/dist-es/text.js +552 -548
- package/dist-es/text.js.map +1 -1
- package/dist-es/utf8.d.ts +4 -6
- package/dist-es/utf8.js +156 -150
- package/dist-es/utf8.js.map +1 -1
- package/package.json +4 -3
- package/src/helpers.ts +13 -3
- package/src/index.ts +4 -6
- package/src/psd.ts +4 -0
- package/src/psdReader.ts +136 -43
- package/src/psdWriter.ts +42 -23
- package/tsconfig-es6.json +2 -1
- package/tsconfig.json +1 -0
package/dist-es/abr.d.ts
CHANGED
|
@@ -1,196 +1,196 @@
|
|
|
1
|
-
import { BlendMode, PatternInfo } from './psd';
|
|
2
|
-
export interface Abr {
|
|
3
|
-
brushes: Brush[];
|
|
4
|
-
samples: SampleInfo[];
|
|
5
|
-
patterns: PatternInfo[];
|
|
6
|
-
}
|
|
7
|
-
export interface SampleInfo {
|
|
8
|
-
id: string;
|
|
9
|
-
bounds: {
|
|
10
|
-
x: number;
|
|
11
|
-
y: number;
|
|
12
|
-
w: number;
|
|
13
|
-
h: number;
|
|
14
|
-
};
|
|
15
|
-
alpha: Uint8Array;
|
|
16
|
-
}
|
|
17
|
-
export interface BrushDynamics {
|
|
18
|
-
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
|
|
19
|
-
steps: number;
|
|
20
|
-
jitter: number;
|
|
21
|
-
minimum: number;
|
|
22
|
-
}
|
|
23
|
-
type DynamicBrushShapeShape = 'round point' | 'round blunt' | 'round curve' | 'round angle' | 'round fan' | 'flat point' | 'flat blunt' | 'flat curve' | 'flat angle' | 'flat fan';
|
|
24
|
-
type TipsBrushShapeShape = 'erodible point' | 'erodible flat' | 'erodible round' | 'erodible square' | 'erodible triangle' | 'custom';
|
|
25
|
-
export type BrushShape = ComputedBrushShape | SampledBrushShape | TipsBrushShape | DynamicBrushShape;
|
|
26
|
-
interface ComputedBrushShape {
|
|
27
|
-
type: 'computed';
|
|
28
|
-
size: number;
|
|
29
|
-
angle: number;
|
|
30
|
-
roundness: number;
|
|
31
|
-
hardness: number;
|
|
32
|
-
spacingOn: boolean;
|
|
33
|
-
spacing: number;
|
|
34
|
-
flipX: boolean;
|
|
35
|
-
flipY: boolean;
|
|
36
|
-
}
|
|
37
|
-
interface SampledBrushShape {
|
|
38
|
-
type: 'sampled';
|
|
39
|
-
name: string;
|
|
40
|
-
size: number;
|
|
41
|
-
angle: number;
|
|
42
|
-
roundness: number;
|
|
43
|
-
spacingOn: boolean;
|
|
44
|
-
spacing: number;
|
|
45
|
-
flipX: boolean;
|
|
46
|
-
flipY: boolean;
|
|
47
|
-
sampledData: string;
|
|
48
|
-
}
|
|
49
|
-
interface TipsBrushShape {
|
|
50
|
-
type: 'tips';
|
|
51
|
-
angle: number;
|
|
52
|
-
size: number;
|
|
53
|
-
shape: DynamicBrushShapeShape;
|
|
54
|
-
physics: boolean;
|
|
55
|
-
spacing: number;
|
|
56
|
-
spacingOn: boolean;
|
|
57
|
-
flipX: boolean;
|
|
58
|
-
flipY: boolean;
|
|
59
|
-
tipsType: TipsBrushShapeShape;
|
|
60
|
-
tipsLengthRatio: number;
|
|
61
|
-
tipsHardness: number;
|
|
62
|
-
tipsGridSize?: number;
|
|
63
|
-
tipsErodibleTipHeightMap?: number[];
|
|
64
|
-
tipsAirbrushCutoffAngle: number;
|
|
65
|
-
tipsAirbrushGranularity: number;
|
|
66
|
-
tipsAirbrushStreakiness: number;
|
|
67
|
-
tipsAirbrushSplatSize: number;
|
|
68
|
-
tipsAirbrushSplatCount: number;
|
|
69
|
-
}
|
|
70
|
-
interface DynamicBrushShape {
|
|
71
|
-
type: 'dynamic';
|
|
72
|
-
size: number;
|
|
73
|
-
angle: number;
|
|
74
|
-
shape: DynamicBrushShapeShape;
|
|
75
|
-
density: number;
|
|
76
|
-
length: number;
|
|
77
|
-
clumping: number;
|
|
78
|
-
thickness: number;
|
|
79
|
-
stiffness: number;
|
|
80
|
-
physics: boolean;
|
|
81
|
-
spacing: number;
|
|
82
|
-
spacingOn: boolean;
|
|
83
|
-
flipX: boolean;
|
|
84
|
-
flipY: boolean;
|
|
85
|
-
}
|
|
86
|
-
export interface Brush {
|
|
87
|
-
name: string;
|
|
88
|
-
shape: BrushShape;
|
|
89
|
-
shapeDynamics?: {
|
|
90
|
-
sizeDynamics: BrushDynamics;
|
|
91
|
-
minimumDiameter: number;
|
|
92
|
-
tiltScale: number;
|
|
93
|
-
angleDynamics: BrushDynamics;
|
|
94
|
-
roundnessDynamics: BrushDynamics;
|
|
95
|
-
minimumRoundness: number;
|
|
96
|
-
flipX: boolean;
|
|
97
|
-
flipY: boolean;
|
|
98
|
-
brushProjection: boolean;
|
|
99
|
-
};
|
|
100
|
-
scatter?: {
|
|
101
|
-
bothAxes: boolean;
|
|
102
|
-
scatterDynamics: BrushDynamics;
|
|
103
|
-
countDynamics: BrushDynamics;
|
|
104
|
-
count: number;
|
|
105
|
-
};
|
|
106
|
-
texture?: {
|
|
107
|
-
id: string;
|
|
108
|
-
name: string;
|
|
109
|
-
invert: boolean;
|
|
110
|
-
scale: number;
|
|
111
|
-
brightness: number;
|
|
112
|
-
contrast: number;
|
|
113
|
-
blendMode: BlendMode;
|
|
114
|
-
depth: number;
|
|
115
|
-
depthMinimum: number;
|
|
116
|
-
depthDynamics: BrushDynamics;
|
|
117
|
-
textureEachTip: boolean;
|
|
118
|
-
};
|
|
119
|
-
dualBrush?: {
|
|
120
|
-
flip: boolean;
|
|
121
|
-
shape: BrushShape;
|
|
122
|
-
blendMode: BlendMode;
|
|
123
|
-
useScatter: boolean;
|
|
124
|
-
spacing: number;
|
|
125
|
-
count: number;
|
|
126
|
-
bothAxes: boolean;
|
|
127
|
-
countDynamics: BrushDynamics;
|
|
128
|
-
scatterDynamics: BrushDynamics;
|
|
129
|
-
};
|
|
130
|
-
colorDynamics?: {
|
|
131
|
-
foregroundBackground: BrushDynamics;
|
|
132
|
-
hue: number;
|
|
133
|
-
saturation: number;
|
|
134
|
-
brightness: number;
|
|
135
|
-
purity: number;
|
|
136
|
-
perTip: boolean;
|
|
137
|
-
};
|
|
138
|
-
transfer?: {
|
|
139
|
-
flowDynamics: BrushDynamics;
|
|
140
|
-
opacityDynamics: BrushDynamics;
|
|
141
|
-
wetnessDynamics: BrushDynamics;
|
|
142
|
-
mixDynamics: BrushDynamics;
|
|
143
|
-
};
|
|
144
|
-
brushPose?: {
|
|
145
|
-
overrideAngle: boolean;
|
|
146
|
-
overrideTiltX: boolean;
|
|
147
|
-
overrideTiltY: boolean;
|
|
148
|
-
overridePressure: boolean;
|
|
149
|
-
pressure: number;
|
|
150
|
-
tiltX: number;
|
|
151
|
-
tiltY: number;
|
|
152
|
-
angle: number;
|
|
153
|
-
};
|
|
154
|
-
noise: boolean;
|
|
155
|
-
wetEdges: boolean;
|
|
156
|
-
protectTexture?: boolean;
|
|
157
|
-
spacing: number;
|
|
158
|
-
brushGroup?: undefined;
|
|
159
|
-
interpretation?: boolean;
|
|
160
|
-
useBrushSize: boolean;
|
|
161
|
-
toolOptions?: {
|
|
162
|
-
type: 'brush' | 'mixer brush' | 'smudge brush';
|
|
163
|
-
brushPreset: boolean;
|
|
164
|
-
flow: number;
|
|
165
|
-
wetness?: number;
|
|
166
|
-
dryness?: number;
|
|
167
|
-
mix?: number;
|
|
168
|
-
smooth: number;
|
|
169
|
-
mode: BlendMode;
|
|
170
|
-
opacity: number;
|
|
171
|
-
smoothing: boolean;
|
|
172
|
-
smoothingValue: number;
|
|
173
|
-
smoothingRadiusMode: boolean;
|
|
174
|
-
smoothingCatchup: boolean;
|
|
175
|
-
smoothingCatchupAtEnd: boolean;
|
|
176
|
-
smoothingZoomCompensation: boolean;
|
|
177
|
-
pressureSmoothing: boolean;
|
|
178
|
-
usePressureOverridesSize: boolean;
|
|
179
|
-
usePressureOverridesOpacity: boolean;
|
|
180
|
-
useLegacy: boolean;
|
|
181
|
-
autoFill?: boolean;
|
|
182
|
-
autoClean?: boolean;
|
|
183
|
-
loadSolidColorOnly?: boolean;
|
|
184
|
-
sampleAllLayers?: boolean;
|
|
185
|
-
flowDynamics?: BrushDynamics;
|
|
186
|
-
opacityDynamics?: BrushDynamics;
|
|
187
|
-
sizeDynamics?: BrushDynamics;
|
|
188
|
-
smudgeFingerPainting?: boolean;
|
|
189
|
-
smudgeSampleAllLayers?: boolean;
|
|
190
|
-
strength?: number;
|
|
191
|
-
};
|
|
192
|
-
}
|
|
193
|
-
export declare function readAbr(buffer: ArrayBufferView, options?: {
|
|
194
|
-
logMissingFeatures?: boolean;
|
|
195
|
-
}): Abr;
|
|
196
|
-
export {};
|
|
1
|
+
import { BlendMode, PatternInfo } from './psd';
|
|
2
|
+
export interface Abr {
|
|
3
|
+
brushes: Brush[];
|
|
4
|
+
samples: SampleInfo[];
|
|
5
|
+
patterns: PatternInfo[];
|
|
6
|
+
}
|
|
7
|
+
export interface SampleInfo {
|
|
8
|
+
id: string;
|
|
9
|
+
bounds: {
|
|
10
|
+
x: number;
|
|
11
|
+
y: number;
|
|
12
|
+
w: number;
|
|
13
|
+
h: number;
|
|
14
|
+
};
|
|
15
|
+
alpha: Uint8Array;
|
|
16
|
+
}
|
|
17
|
+
export interface BrushDynamics {
|
|
18
|
+
control: 'off' | 'fade' | 'pen pressure' | 'pen tilt' | 'stylus wheel' | 'initial direction' | 'direction' | 'initial rotation' | 'rotation';
|
|
19
|
+
steps: number;
|
|
20
|
+
jitter: number;
|
|
21
|
+
minimum: number;
|
|
22
|
+
}
|
|
23
|
+
type DynamicBrushShapeShape = 'round point' | 'round blunt' | 'round curve' | 'round angle' | 'round fan' | 'flat point' | 'flat blunt' | 'flat curve' | 'flat angle' | 'flat fan';
|
|
24
|
+
type TipsBrushShapeShape = 'erodible point' | 'erodible flat' | 'erodible round' | 'erodible square' | 'erodible triangle' | 'custom';
|
|
25
|
+
export type BrushShape = ComputedBrushShape | SampledBrushShape | TipsBrushShape | DynamicBrushShape;
|
|
26
|
+
interface ComputedBrushShape {
|
|
27
|
+
type: 'computed';
|
|
28
|
+
size: number;
|
|
29
|
+
angle: number;
|
|
30
|
+
roundness: number;
|
|
31
|
+
hardness: number;
|
|
32
|
+
spacingOn: boolean;
|
|
33
|
+
spacing: number;
|
|
34
|
+
flipX: boolean;
|
|
35
|
+
flipY: boolean;
|
|
36
|
+
}
|
|
37
|
+
interface SampledBrushShape {
|
|
38
|
+
type: 'sampled';
|
|
39
|
+
name: string;
|
|
40
|
+
size: number;
|
|
41
|
+
angle: number;
|
|
42
|
+
roundness: number;
|
|
43
|
+
spacingOn: boolean;
|
|
44
|
+
spacing: number;
|
|
45
|
+
flipX: boolean;
|
|
46
|
+
flipY: boolean;
|
|
47
|
+
sampledData: string;
|
|
48
|
+
}
|
|
49
|
+
interface TipsBrushShape {
|
|
50
|
+
type: 'tips';
|
|
51
|
+
angle: number;
|
|
52
|
+
size: number;
|
|
53
|
+
shape: DynamicBrushShapeShape;
|
|
54
|
+
physics: boolean;
|
|
55
|
+
spacing: number;
|
|
56
|
+
spacingOn: boolean;
|
|
57
|
+
flipX: boolean;
|
|
58
|
+
flipY: boolean;
|
|
59
|
+
tipsType: TipsBrushShapeShape;
|
|
60
|
+
tipsLengthRatio: number;
|
|
61
|
+
tipsHardness: number;
|
|
62
|
+
tipsGridSize?: number;
|
|
63
|
+
tipsErodibleTipHeightMap?: number[];
|
|
64
|
+
tipsAirbrushCutoffAngle: number;
|
|
65
|
+
tipsAirbrushGranularity: number;
|
|
66
|
+
tipsAirbrushStreakiness: number;
|
|
67
|
+
tipsAirbrushSplatSize: number;
|
|
68
|
+
tipsAirbrushSplatCount: number;
|
|
69
|
+
}
|
|
70
|
+
interface DynamicBrushShape {
|
|
71
|
+
type: 'dynamic';
|
|
72
|
+
size: number;
|
|
73
|
+
angle: number;
|
|
74
|
+
shape: DynamicBrushShapeShape;
|
|
75
|
+
density: number;
|
|
76
|
+
length: number;
|
|
77
|
+
clumping: number;
|
|
78
|
+
thickness: number;
|
|
79
|
+
stiffness: number;
|
|
80
|
+
physics: boolean;
|
|
81
|
+
spacing: number;
|
|
82
|
+
spacingOn: boolean;
|
|
83
|
+
flipX: boolean;
|
|
84
|
+
flipY: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface Brush {
|
|
87
|
+
name: string;
|
|
88
|
+
shape: BrushShape;
|
|
89
|
+
shapeDynamics?: {
|
|
90
|
+
sizeDynamics: BrushDynamics;
|
|
91
|
+
minimumDiameter: number;
|
|
92
|
+
tiltScale: number;
|
|
93
|
+
angleDynamics: BrushDynamics;
|
|
94
|
+
roundnessDynamics: BrushDynamics;
|
|
95
|
+
minimumRoundness: number;
|
|
96
|
+
flipX: boolean;
|
|
97
|
+
flipY: boolean;
|
|
98
|
+
brushProjection: boolean;
|
|
99
|
+
};
|
|
100
|
+
scatter?: {
|
|
101
|
+
bothAxes: boolean;
|
|
102
|
+
scatterDynamics: BrushDynamics;
|
|
103
|
+
countDynamics: BrushDynamics;
|
|
104
|
+
count: number;
|
|
105
|
+
};
|
|
106
|
+
texture?: {
|
|
107
|
+
id: string;
|
|
108
|
+
name: string;
|
|
109
|
+
invert: boolean;
|
|
110
|
+
scale: number;
|
|
111
|
+
brightness: number;
|
|
112
|
+
contrast: number;
|
|
113
|
+
blendMode: BlendMode;
|
|
114
|
+
depth: number;
|
|
115
|
+
depthMinimum: number;
|
|
116
|
+
depthDynamics: BrushDynamics;
|
|
117
|
+
textureEachTip: boolean;
|
|
118
|
+
};
|
|
119
|
+
dualBrush?: {
|
|
120
|
+
flip: boolean;
|
|
121
|
+
shape: BrushShape;
|
|
122
|
+
blendMode: BlendMode;
|
|
123
|
+
useScatter: boolean;
|
|
124
|
+
spacing: number;
|
|
125
|
+
count: number;
|
|
126
|
+
bothAxes: boolean;
|
|
127
|
+
countDynamics: BrushDynamics;
|
|
128
|
+
scatterDynamics: BrushDynamics;
|
|
129
|
+
};
|
|
130
|
+
colorDynamics?: {
|
|
131
|
+
foregroundBackground: BrushDynamics;
|
|
132
|
+
hue: number;
|
|
133
|
+
saturation: number;
|
|
134
|
+
brightness: number;
|
|
135
|
+
purity: number;
|
|
136
|
+
perTip: boolean;
|
|
137
|
+
};
|
|
138
|
+
transfer?: {
|
|
139
|
+
flowDynamics: BrushDynamics;
|
|
140
|
+
opacityDynamics: BrushDynamics;
|
|
141
|
+
wetnessDynamics: BrushDynamics;
|
|
142
|
+
mixDynamics: BrushDynamics;
|
|
143
|
+
};
|
|
144
|
+
brushPose?: {
|
|
145
|
+
overrideAngle: boolean;
|
|
146
|
+
overrideTiltX: boolean;
|
|
147
|
+
overrideTiltY: boolean;
|
|
148
|
+
overridePressure: boolean;
|
|
149
|
+
pressure: number;
|
|
150
|
+
tiltX: number;
|
|
151
|
+
tiltY: number;
|
|
152
|
+
angle: number;
|
|
153
|
+
};
|
|
154
|
+
noise: boolean;
|
|
155
|
+
wetEdges: boolean;
|
|
156
|
+
protectTexture?: boolean;
|
|
157
|
+
spacing: number;
|
|
158
|
+
brushGroup?: undefined;
|
|
159
|
+
interpretation?: boolean;
|
|
160
|
+
useBrushSize: boolean;
|
|
161
|
+
toolOptions?: {
|
|
162
|
+
type: 'brush' | 'mixer brush' | 'smudge brush';
|
|
163
|
+
brushPreset: boolean;
|
|
164
|
+
flow: number;
|
|
165
|
+
wetness?: number;
|
|
166
|
+
dryness?: number;
|
|
167
|
+
mix?: number;
|
|
168
|
+
smooth: number;
|
|
169
|
+
mode: BlendMode;
|
|
170
|
+
opacity: number;
|
|
171
|
+
smoothing: boolean;
|
|
172
|
+
smoothingValue: number;
|
|
173
|
+
smoothingRadiusMode: boolean;
|
|
174
|
+
smoothingCatchup: boolean;
|
|
175
|
+
smoothingCatchupAtEnd: boolean;
|
|
176
|
+
smoothingZoomCompensation: boolean;
|
|
177
|
+
pressureSmoothing: boolean;
|
|
178
|
+
usePressureOverridesSize: boolean;
|
|
179
|
+
usePressureOverridesOpacity: boolean;
|
|
180
|
+
useLegacy: boolean;
|
|
181
|
+
autoFill?: boolean;
|
|
182
|
+
autoClean?: boolean;
|
|
183
|
+
loadSolidColorOnly?: boolean;
|
|
184
|
+
sampleAllLayers?: boolean;
|
|
185
|
+
flowDynamics?: BrushDynamics;
|
|
186
|
+
opacityDynamics?: BrushDynamics;
|
|
187
|
+
sizeDynamics?: BrushDynamics;
|
|
188
|
+
smudgeFingerPainting?: boolean;
|
|
189
|
+
smudgeSampleAllLayers?: boolean;
|
|
190
|
+
strength?: number;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
export declare function readAbr(buffer: ArrayBufferView, options?: {
|
|
194
|
+
logMissingFeatures?: boolean;
|
|
195
|
+
}): Abr;
|
|
196
|
+
export {};
|