modern-canvas 0.5.2 → 0.6.1
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/index.cjs +617 -710
- package/dist/index.d.cts +122 -144
- package/dist/index.d.mts +122 -144
- package/dist/index.d.ts +122 -144
- package/dist/index.js +48 -47
- package/dist/index.mjs +619 -711
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Font } from 'modern-font';
|
|
2
|
-
import { PropertyDeclaration, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
|
|
2
|
+
import { PropertyDeclaration, ReactiveObject, ReactiveObjectPropertyAccessorContext, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, NormalizedStyle, Text as Text$1, Style, ImageFillCropRect } from 'modern-idoc';
|
|
3
3
|
export { Color as ColorValue } from 'modern-idoc';
|
|
4
4
|
import { AnimationItem } from 'lottie-web';
|
|
5
5
|
import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
|
|
@@ -17,9 +17,7 @@ declare class FontLoader extends Loader {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
declare const customNodes: Map<string, any>;
|
|
20
|
-
declare function customNode<T = Record<string, any>>(
|
|
21
|
-
|
|
22
|
-
declare function protectedProperty(options?: Omit<PropertyDeclaration, 'protected'>): PropertyDecorator;
|
|
20
|
+
declare function customNode<T = Record<string, any>>(name: string, defaultProperties?: Partial<T>): ClassDecorator;
|
|
23
21
|
|
|
24
22
|
declare function createNode<T = any>(tag?: string, options?: Record<string, any>): T;
|
|
25
23
|
|
|
@@ -68,7 +66,11 @@ declare class EventEmitter {
|
|
|
68
66
|
}
|
|
69
67
|
|
|
70
68
|
interface CoreObjectEventMap {
|
|
71
|
-
updateProperty: (key:
|
|
69
|
+
updateProperty: (key: string, newValue: any, oldValue: any, declaration?: PropertyDeclaration) => void;
|
|
70
|
+
}
|
|
71
|
+
interface CustomPropertyAccessor {
|
|
72
|
+
get: (key: string, fallback: () => any) => any;
|
|
73
|
+
set: (key: string, value: any) => void;
|
|
72
74
|
}
|
|
73
75
|
interface CoreObject {
|
|
74
76
|
on: (<K extends keyof CoreObjectEventMap>(type: K, listener: CoreObjectEventMap[K], options?: EventListenerOptions) => this) & ((type: string, listener: EventListenerValue, options?: EventListenerOptions) => this);
|
|
@@ -76,28 +78,33 @@ interface CoreObject {
|
|
|
76
78
|
off: (<K extends keyof CoreObjectEventMap>(type: K, listener?: CoreObjectEventMap[K], options?: EventListenerOptions) => this) & ((type: string, listener: EventListenerValue, options?: EventListenerOptions) => this);
|
|
77
79
|
emit: (<K extends keyof CoreObjectEventMap>(type: K, ...args: Parameters<CoreObjectEventMap[K]>) => boolean) & ((type: string, ...args: any[]) => boolean);
|
|
78
80
|
}
|
|
79
|
-
declare class CoreObject extends EventEmitter {
|
|
81
|
+
declare class CoreObject extends EventEmitter implements Required<ReactiveObject> {
|
|
80
82
|
readonly instanceId: number;
|
|
81
|
-
protected
|
|
82
|
-
protected
|
|
83
|
-
protected
|
|
83
|
+
protected _customPropertyAccessor?: CustomPropertyAccessor;
|
|
84
|
+
protected _properties: Map<string, unknown>;
|
|
85
|
+
protected _updatedProperties: Map<string, unknown>;
|
|
86
|
+
protected _changedProperties: Set<string>;
|
|
84
87
|
protected _updatingPromise: Promise<void>;
|
|
85
88
|
protected _updating: boolean;
|
|
86
|
-
|
|
89
|
+
useCustomPropertyAccessor(accessor: CustomPropertyAccessor): this;
|
|
90
|
+
getter(key: string, context: ReactiveObjectPropertyAccessorContext): any;
|
|
91
|
+
setter(key: string, value: any, context: ReactiveObjectPropertyAccessorContext): void;
|
|
92
|
+
equal(target: CoreObject | undefined | null): boolean;
|
|
87
93
|
protected _enqueueUpdate(): Promise<void>;
|
|
88
94
|
update(): void;
|
|
89
|
-
protected _update(changed: Map<
|
|
90
|
-
protected _updateProperty(key:
|
|
95
|
+
protected _update(changed: Map<string, any>): void;
|
|
96
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
91
97
|
isDirty(key: string): boolean;
|
|
92
|
-
getPropertyDeclarations(): Map<
|
|
93
|
-
getPropertyDeclaration(key:
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
getProperties(keys?: PropertyKey[]): Record<PropertyKey, any>;
|
|
98
|
+
getPropertyDeclarations(): Map<string, PropertyDeclaration>;
|
|
99
|
+
getPropertyDeclaration(key: string): PropertyDeclaration | undefined;
|
|
100
|
+
getProperty(key: string): any | undefined;
|
|
101
|
+
setProperty(key: string, value: any): this;
|
|
102
|
+
getProperties(keys?: string[]): Record<string, any>;
|
|
98
103
|
setProperties(properties?: any): this;
|
|
99
104
|
resetProperties(): this;
|
|
100
|
-
|
|
105
|
+
onUpdateProperty(key: string, newValue: unknown, oldValue: unknown, declaration: PropertyDeclaration): void;
|
|
106
|
+
requestUpdate(key?: string, newValue?: unknown, oldValue?: unknown, declaration?: PropertyDeclaration): void;
|
|
107
|
+
toPropsJSON(): Record<string, any>;
|
|
101
108
|
toJSON(): Record<string, any>;
|
|
102
109
|
clone(): this;
|
|
103
110
|
free(): void;
|
|
@@ -1161,7 +1168,7 @@ declare class IndexBuffer extends Resource {
|
|
|
1161
1168
|
_glBufferOptions(): WebGLBufferOptions;
|
|
1162
1169
|
/** @internal */
|
|
1163
1170
|
_glBuffer(renderer: WebGLRenderer): WebGLBuffer;
|
|
1164
|
-
protected _updateProperty(key:
|
|
1171
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1165
1172
|
upload(renderer: WebGLRenderer): boolean;
|
|
1166
1173
|
}
|
|
1167
1174
|
|
|
@@ -1178,7 +1185,7 @@ declare class VertexBuffer extends Resource {
|
|
|
1178
1185
|
_glBufferOptions(): WebGLBufferOptions;
|
|
1179
1186
|
/** @internal */
|
|
1180
1187
|
_glBuffer(renderer: WebGLRenderer): WebGLBuffer;
|
|
1181
|
-
protected _updateProperty(key:
|
|
1188
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1182
1189
|
upload(renderer: WebGLRenderer): boolean;
|
|
1183
1190
|
}
|
|
1184
1191
|
|
|
@@ -1196,12 +1203,12 @@ declare class VertexAttribute extends Resource {
|
|
|
1196
1203
|
size: number;
|
|
1197
1204
|
normalized: boolean;
|
|
1198
1205
|
type: 'float' | 'unsigned_byte' | 'unsigned_short';
|
|
1199
|
-
stride
|
|
1200
|
-
offset
|
|
1201
|
-
divisor
|
|
1206
|
+
stride: number | undefined;
|
|
1207
|
+
offset: number | undefined;
|
|
1208
|
+
divisor: number | undefined;
|
|
1202
1209
|
needsUpload: boolean;
|
|
1203
1210
|
constructor(options?: VertexAttributeOptions);
|
|
1204
|
-
protected _updateProperty(key:
|
|
1211
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1205
1212
|
upload(): boolean;
|
|
1206
1213
|
}
|
|
1207
1214
|
|
|
@@ -1299,7 +1306,7 @@ declare class Texture2D<T extends Texture2DSource = Texture2DSource> extends Res
|
|
|
1299
1306
|
_glTextureOptions(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): WebGLTextureOptions;
|
|
1300
1307
|
/** @internal */
|
|
1301
1308
|
_glTexture(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): WebGLTexture;
|
|
1302
|
-
protected _updateProperty(key:
|
|
1309
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1303
1310
|
protected _updatePOT(): void;
|
|
1304
1311
|
protected _updateSize(): void;
|
|
1305
1312
|
requestUpload(): void;
|
|
@@ -1324,7 +1331,7 @@ declare class AnimatedTexture extends Resource {
|
|
|
1324
1331
|
declare class CanvasTexture extends Texture2D<HTMLCanvasElement> {
|
|
1325
1332
|
pixelRatio: number;
|
|
1326
1333
|
constructor(source?: HTMLCanvasElement);
|
|
1327
|
-
protected _updateProperty(key:
|
|
1334
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1328
1335
|
}
|
|
1329
1336
|
|
|
1330
1337
|
declare class ColorTexture extends Texture2D {
|
|
@@ -1358,7 +1365,7 @@ declare class ImageTexture extends Texture2D<HTMLImageElement> {
|
|
|
1358
1365
|
|
|
1359
1366
|
declare class PixelsTexture extends Texture2D<Texture2DPixelsSource> {
|
|
1360
1367
|
constructor(pixels?: number[] | ArrayBufferLike | ArrayBufferView | null, width?: number, height?: number);
|
|
1361
|
-
protected _updateProperty(key:
|
|
1368
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1362
1369
|
}
|
|
1363
1370
|
|
|
1364
1371
|
interface VideoTextureOptions {
|
|
@@ -1393,7 +1400,7 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
|
|
|
1393
1400
|
protected _resolve?: (val: this) => void;
|
|
1394
1401
|
protected _reject?: (event: ErrorEvent) => void;
|
|
1395
1402
|
constructor(source: HTMLVideoElement | (string | VideoTextureSource)[] | string, options?: VideoTextureOptions);
|
|
1396
|
-
protected _updateProperty(key:
|
|
1403
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1397
1404
|
protected _onPlayStart: () => void;
|
|
1398
1405
|
protected _onPlayStop: () => void;
|
|
1399
1406
|
protected _onCanPlay: () => void;
|
|
@@ -1486,7 +1493,7 @@ declare class Timeline extends Node {
|
|
|
1486
1493
|
loop: boolean;
|
|
1487
1494
|
static from(range: number | number[], loop?: boolean): Timeline;
|
|
1488
1495
|
constructor(properties?: Partial<TimelineProperties>);
|
|
1489
|
-
protected _updateProperty(key:
|
|
1496
|
+
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
1490
1497
|
addTime(delta: number): this;
|
|
1491
1498
|
protected _process(delta: number): void;
|
|
1492
1499
|
}
|
|
@@ -1518,14 +1525,14 @@ interface Viewport {
|
|
|
1518
1525
|
}
|
|
1519
1526
|
declare class Viewport extends Node implements Rectangulable {
|
|
1520
1527
|
flipY: boolean;
|
|
1528
|
+
protected _projection: Projection2D;
|
|
1529
|
+
protected _framebufferIndex: number;
|
|
1530
|
+
protected _framebuffers: ViewportFramebuffer[];
|
|
1521
1531
|
x: number;
|
|
1522
1532
|
y: number;
|
|
1523
1533
|
width: number;
|
|
1524
1534
|
height: number;
|
|
1525
1535
|
get valid(): boolean;
|
|
1526
|
-
protected _projection: Projection2D;
|
|
1527
|
-
protected _framebufferIndex: number;
|
|
1528
|
-
protected _framebuffers: ViewportFramebuffer[];
|
|
1529
1536
|
get framebuffer(): ViewportFramebuffer;
|
|
1530
1537
|
get texture(): ViewportTexture;
|
|
1531
1538
|
constructor(flipY?: boolean);
|
|
@@ -1533,7 +1540,7 @@ declare class Viewport extends Node implements Rectangulable {
|
|
|
1533
1540
|
_glFramebufferOptions(renderer: WebGLRenderer): WebGLFramebufferOptions;
|
|
1534
1541
|
/** @internal */
|
|
1535
1542
|
_glFramebuffer(renderer: WebGLRenderer): WebGLFramebuffer;
|
|
1536
|
-
protected _updateProperty(key:
|
|
1543
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1537
1544
|
requestUpload(): void;
|
|
1538
1545
|
resize(width: number, height: number): void;
|
|
1539
1546
|
upload(renderer: WebGLRenderer): boolean;
|
|
@@ -1561,18 +1568,19 @@ interface SceneTree {
|
|
|
1561
1568
|
}
|
|
1562
1569
|
declare class SceneTree extends MainLoop {
|
|
1563
1570
|
processPaused: boolean;
|
|
1564
|
-
backgroundColor
|
|
1571
|
+
backgroundColor: Color$1 | undefined;
|
|
1565
1572
|
debug: boolean;
|
|
1566
1573
|
readonly input: Input;
|
|
1567
1574
|
readonly renderStack: RenderStack;
|
|
1568
1575
|
readonly root: Viewport;
|
|
1569
1576
|
readonly timeline: Timeline;
|
|
1577
|
+
nodes: Map<string, Node>;
|
|
1570
1578
|
protected _backgroundColor: Color;
|
|
1571
1579
|
protected _currentViewport?: Viewport;
|
|
1572
1580
|
getCurrentViewport(): Viewport | undefined;
|
|
1573
1581
|
setCurrentViewport(viewport: Viewport | undefined): void;
|
|
1574
1582
|
constructor(timeline?: Timeline);
|
|
1575
|
-
protected _updateProperty(key:
|
|
1583
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1576
1584
|
log(...args: any[]): void;
|
|
1577
1585
|
protected _process(delta?: number): void;
|
|
1578
1586
|
protected _render(renderer: WebGLRenderer): void;
|
|
@@ -1629,17 +1637,18 @@ interface Node {
|
|
|
1629
1637
|
emit: (<K extends keyof NodeEventMap>(type: K, ...args: Parameters<NodeEventMap[K]>) => boolean) & ((type: string, ...args: any[]) => boolean);
|
|
1630
1638
|
}
|
|
1631
1639
|
declare class Node extends CoreObject {
|
|
1632
|
-
readonly
|
|
1640
|
+
readonly is: string;
|
|
1641
|
+
id: string;
|
|
1633
1642
|
name: string;
|
|
1634
|
-
mask?: Maskable;
|
|
1635
1643
|
processMode: ProcessMode;
|
|
1636
1644
|
processSortMode: ProcessSortMode;
|
|
1637
1645
|
renderMode: RenderMode;
|
|
1638
1646
|
internalMode: InternalMode;
|
|
1639
1647
|
meta: Record<string, any>;
|
|
1648
|
+
mask?: Maskable;
|
|
1640
1649
|
protected _readyed: boolean;
|
|
1641
1650
|
constructor(properties?: Partial<NodeProperties>, nodes?: Node[]);
|
|
1642
|
-
setProperties(properties?: Record<
|
|
1651
|
+
setProperties(properties?: Record<string, any>): this;
|
|
1643
1652
|
/** Name */
|
|
1644
1653
|
getName(): string;
|
|
1645
1654
|
setName(value: string): this;
|
|
@@ -1672,8 +1681,8 @@ declare class Node extends CoreObject {
|
|
|
1672
1681
|
get lastSibling(): Node | undefined;
|
|
1673
1682
|
canProcess(): boolean;
|
|
1674
1683
|
canRender(): boolean;
|
|
1675
|
-
protected _update(changed: Map<
|
|
1676
|
-
protected _updateProperty(key:
|
|
1684
|
+
protected _update(changed: Map<string, any>): void;
|
|
1685
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1677
1686
|
protected _onTreeEnter(tree: SceneTree): void;
|
|
1678
1687
|
protected _onTreeExit(oldTree: SceneTree): void;
|
|
1679
1688
|
protected _onParented(parent: Node): void;
|
|
@@ -1714,8 +1723,8 @@ declare class Node extends CoreObject {
|
|
|
1714
1723
|
protected _render(renderer: WebGLRenderer): void;
|
|
1715
1724
|
clone(): this;
|
|
1716
1725
|
toJSON(): Record<string, any>;
|
|
1717
|
-
static parse(
|
|
1718
|
-
static parse(
|
|
1726
|
+
static parse(value: Record<string, any>[]): Node[];
|
|
1727
|
+
static parse(value: Record<string, any>): Node;
|
|
1719
1728
|
}
|
|
1720
1729
|
|
|
1721
1730
|
interface TimelineNodeProperties extends NodeProperties {
|
|
@@ -1769,8 +1778,8 @@ interface CanvasItem {
|
|
|
1769
1778
|
emit: (<K extends keyof CanvasItemEventMap>(type: K, ...args: Parameters<CanvasItemEventMap[K]>) => boolean) & ((type: string, ...args: any[]) => boolean);
|
|
1770
1779
|
}
|
|
1771
1780
|
declare class CanvasItem extends TimelineNode {
|
|
1772
|
-
modulate
|
|
1773
|
-
blendMode
|
|
1781
|
+
modulate: Color$1 | undefined;
|
|
1782
|
+
blendMode: WebGLBlendMode | undefined;
|
|
1774
1783
|
visible: boolean;
|
|
1775
1784
|
opacity: number;
|
|
1776
1785
|
protected _parentGlobalVisible?: boolean;
|
|
@@ -1789,7 +1798,7 @@ declare class CanvasItem extends TimelineNode {
|
|
|
1789
1798
|
protected _layoutedBatchables: CanvasBatchable[];
|
|
1790
1799
|
protected _batchables: CanvasBatchable[];
|
|
1791
1800
|
constructor(properties?: Partial<CanvasItemProperties>, nodes?: Node[]);
|
|
1792
|
-
protected _updateProperty(key:
|
|
1801
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1793
1802
|
show(): void;
|
|
1794
1803
|
hide(): void;
|
|
1795
1804
|
isVisibleInTree(): boolean;
|
|
@@ -1804,7 +1813,7 @@ declare class CanvasItem extends TimelineNode {
|
|
|
1804
1813
|
protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1805
1814
|
protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1806
1815
|
protected _process(delta: number): void;
|
|
1807
|
-
protected _update(changed: Map<
|
|
1816
|
+
protected _update(changed: Map<string, any>): void;
|
|
1808
1817
|
protected _render(renderer: WebGLRenderer): void;
|
|
1809
1818
|
}
|
|
1810
1819
|
|
|
@@ -1825,8 +1834,8 @@ interface EffectContext {
|
|
|
1825
1834
|
to?: Viewport;
|
|
1826
1835
|
}
|
|
1827
1836
|
declare class Effect extends TimelineNode {
|
|
1828
|
-
material
|
|
1829
|
-
effectMode
|
|
1837
|
+
material: Material | undefined;
|
|
1838
|
+
effectMode: EffectMode | undefined;
|
|
1830
1839
|
glsl: string;
|
|
1831
1840
|
glslSrc: string;
|
|
1832
1841
|
protected get _effectMode(): EffectMode;
|
|
@@ -1840,7 +1849,7 @@ declare class Effect extends TimelineNode {
|
|
|
1840
1849
|
protected _previousSibling?: Node;
|
|
1841
1850
|
protected _nextSibling?: Node;
|
|
1842
1851
|
constructor(properties?: Partial<EffectProperties>, children?: Node[]);
|
|
1843
|
-
protected _updateProperty(key:
|
|
1852
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1844
1853
|
protected _treeEnter(tree: SceneTree): void;
|
|
1845
1854
|
protected _treeExit(oldTree: SceneTree): void;
|
|
1846
1855
|
protected _onProcessing(): void;
|
|
@@ -1877,7 +1886,7 @@ declare class Node2D extends CanvasItem {
|
|
|
1877
1886
|
readonly globalTransform: Transform2D;
|
|
1878
1887
|
protected _parentTransformDirtyId?: number;
|
|
1879
1888
|
constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
|
|
1880
|
-
protected _updateProperty(key:
|
|
1889
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1881
1890
|
getTransformOrigin(): Vector2;
|
|
1882
1891
|
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
1883
1892
|
updateTransform(): void;
|
|
@@ -1892,21 +1901,21 @@ interface BaseElement2DFill extends NormalizedFill {
|
|
|
1892
1901
|
declare class BaseElement2DFill extends CoreObject {
|
|
1893
1902
|
parent: BaseElement2D;
|
|
1894
1903
|
enabled: boolean;
|
|
1895
|
-
color
|
|
1896
|
-
image
|
|
1897
|
-
linearGradient
|
|
1898
|
-
radialGradient
|
|
1899
|
-
cropRect
|
|
1900
|
-
stretchRect
|
|
1901
|
-
dpi
|
|
1902
|
-
rotateWithShape
|
|
1903
|
-
tile
|
|
1904
|
-
opacity
|
|
1904
|
+
color: NormalizedFill['color'];
|
|
1905
|
+
image: NormalizedFill['image'];
|
|
1906
|
+
linearGradient: NormalizedFill['linearGradient'];
|
|
1907
|
+
radialGradient: NormalizedFill['radialGradient'];
|
|
1908
|
+
cropRect: NormalizedFill['cropRect'];
|
|
1909
|
+
stretchRect: NormalizedFill['stretchRect'];
|
|
1910
|
+
dpi: NormalizedFill['dpi'];
|
|
1911
|
+
rotateWithShape: NormalizedFill['rotateWithShape'];
|
|
1912
|
+
tile: NormalizedFill['tile'];
|
|
1913
|
+
opacity: NormalizedFill['opacity'];
|
|
1905
1914
|
protected _texture?: Texture2D;
|
|
1906
1915
|
constructor(parent: BaseElement2D);
|
|
1907
1916
|
protected _setProperties(properties?: Fill): this;
|
|
1908
1917
|
setProperties(properties?: Fill): this;
|
|
1909
|
-
protected _updateProperty(key:
|
|
1918
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1910
1919
|
loadTexture(): Promise<Texture2D | undefined>;
|
|
1911
1920
|
protected _updateTexture(): Promise<void>;
|
|
1912
1921
|
canDraw(): boolean;
|
|
@@ -1917,27 +1926,22 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1917
1926
|
draw(): void;
|
|
1918
1927
|
}
|
|
1919
1928
|
|
|
1920
|
-
interface BaseElement2DBackground extends NormalizedBackground {
|
|
1921
|
-
}
|
|
1922
1929
|
declare class BaseElement2DBackground extends BaseElement2DFill {
|
|
1923
|
-
fillWithShape
|
|
1930
|
+
fillWithShape: NormalizedBackground['fillWithShape'];
|
|
1924
1931
|
setProperties(properties?: Background): this;
|
|
1925
1932
|
}
|
|
1926
1933
|
|
|
1927
|
-
interface BaseElement2DForeground extends NormalizedForeground {
|
|
1928
|
-
}
|
|
1929
1934
|
declare class BaseElement2DForeground extends BaseElement2DFill {
|
|
1930
|
-
fillWithShape
|
|
1935
|
+
fillWithShape: NormalizedForeground['fillWithShape'];
|
|
1931
1936
|
setProperties(properties?: Foreground): this;
|
|
1932
1937
|
}
|
|
1933
1938
|
|
|
1934
1939
|
declare class BaseElement2DOutline extends BaseElement2DFill {
|
|
1935
|
-
enabled: boolean;
|
|
1936
1940
|
color: NormalizedOutline['color'];
|
|
1937
1941
|
width: NormalizedOutline['width'];
|
|
1938
1942
|
style: NormalizedOutline['style'];
|
|
1939
1943
|
setProperties(properties?: Outline): this;
|
|
1940
|
-
protected _updateProperty(key:
|
|
1944
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1941
1945
|
canDraw(): boolean;
|
|
1942
1946
|
draw(): void;
|
|
1943
1947
|
}
|
|
@@ -1951,21 +1955,21 @@ declare class BaseElement2DShadow extends CoreObject {
|
|
|
1951
1955
|
offsetX: NormalizedShadow['offsetY'];
|
|
1952
1956
|
constructor(parent: BaseElement2D);
|
|
1953
1957
|
setProperties(properties?: Shadow): this;
|
|
1954
|
-
protected _updateProperty(key:
|
|
1958
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1955
1959
|
updateEffect(): void;
|
|
1956
1960
|
}
|
|
1957
1961
|
|
|
1958
1962
|
declare class BaseElement2DShape extends CoreObject {
|
|
1959
1963
|
parent: BaseElement2D;
|
|
1960
1964
|
enabled: boolean;
|
|
1961
|
-
preset
|
|
1962
|
-
svg
|
|
1963
|
-
viewBox
|
|
1965
|
+
preset: NormalizedShape['preset'];
|
|
1966
|
+
svg: NormalizedShape['svg'];
|
|
1967
|
+
viewBox: NormalizedShape['viewBox'];
|
|
1964
1968
|
paths: Required<NormalizedShape>['paths'];
|
|
1965
1969
|
protected _path2DSet: Path2DSet;
|
|
1966
1970
|
constructor(parent: BaseElement2D);
|
|
1967
1971
|
setProperties(properties?: Shape): this;
|
|
1968
|
-
protected _updateProperty(key:
|
|
1972
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1969
1973
|
protected _updatePath2DSet(): void;
|
|
1970
1974
|
draw(): void;
|
|
1971
1975
|
drawRect(): void;
|
|
@@ -1987,14 +1991,14 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
1987
1991
|
parent: BaseElement2D;
|
|
1988
1992
|
enabled: boolean;
|
|
1989
1993
|
content: Text['content'];
|
|
1990
|
-
effects
|
|
1991
|
-
measureDOM
|
|
1992
|
-
fonts
|
|
1994
|
+
effects: Text['effects'];
|
|
1995
|
+
measureDOM: Text['measureDOM'];
|
|
1996
|
+
fonts: Text['fonts'];
|
|
1993
1997
|
constructor(parent: BaseElement2D);
|
|
1994
1998
|
base: Text;
|
|
1995
1999
|
measureResult?: MeasureResult;
|
|
1996
2000
|
setProperties(properties?: Text$1): this;
|
|
1997
|
-
protected _updateProperty(key:
|
|
2001
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1998
2002
|
protected _updateText(): void;
|
|
1999
2003
|
measure(): MeasureResult;
|
|
2000
2004
|
updateMeasure(): this;
|
|
@@ -2003,7 +2007,7 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
2003
2007
|
}
|
|
2004
2008
|
|
|
2005
2009
|
interface BaseElement2DEventMap extends CanvasItemEventMap {
|
|
2006
|
-
updateStyleProperty: (key:
|
|
2010
|
+
updateStyleProperty: (key: string, value: any, oldValue: any, declaration?: PropertyDeclaration) => void;
|
|
2007
2011
|
}
|
|
2008
2012
|
interface BaseElement2DProperties extends Node2DProperties {
|
|
2009
2013
|
modulate: Color$1;
|
|
@@ -2050,8 +2054,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
|
|
|
2050
2054
|
get shadow(): BaseElement2DShadow;
|
|
2051
2055
|
set shadow(value: Shadow);
|
|
2052
2056
|
constructor(properties?: Partial<BaseElement2DProperties>, nodes?: Node[]);
|
|
2053
|
-
setProperties(properties?: Record<
|
|
2054
|
-
protected _updateStyleProperty(key:
|
|
2057
|
+
setProperties(properties?: Record<string, any>): this;
|
|
2058
|
+
protected _updateStyleProperty(key: string, value: any, _oldValue: any, _declaration?: PropertyDeclaration): void;
|
|
2055
2059
|
protected _updateMaskImage(): void;
|
|
2056
2060
|
getTransformOrigin(): Vector2;
|
|
2057
2061
|
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
@@ -2099,7 +2103,7 @@ declare class Element2D extends BaseElement2D {
|
|
|
2099
2103
|
get style(): Element2DStyle;
|
|
2100
2104
|
set style(style: Element2DStyle);
|
|
2101
2105
|
constructor(properties?: Partial<Element2DProperties>, nodes?: Node[]);
|
|
2102
|
-
protected _updateStyleProperty(key:
|
|
2106
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2103
2107
|
}
|
|
2104
2108
|
|
|
2105
2109
|
interface FlexElement2DStyleProperties extends BaseElement2DStyleProperties {
|
|
@@ -2131,11 +2135,11 @@ declare class FlexLayout {
|
|
|
2131
2135
|
constructor(_element: FlexElement2D);
|
|
2132
2136
|
calculateLayout(width?: number | 'auto', height?: number | 'auto', direction?: Direction): void;
|
|
2133
2137
|
getComputedLayout(): ComputedLayout;
|
|
2134
|
-
updateStyleProperty(key:
|
|
2138
|
+
updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2135
2139
|
}
|
|
2136
2140
|
|
|
2137
2141
|
interface FlexBaseElement2DEventMap extends BaseElement2DEventMap {
|
|
2138
|
-
updateStyleProperty: (key:
|
|
2142
|
+
updateStyleProperty: (key: string, value: any, oldValue: any, declaration?: PropertyDeclaration) => void;
|
|
2139
2143
|
}
|
|
2140
2144
|
interface FlexElement2DProperties extends BaseElement2DProperties {
|
|
2141
2145
|
style: Partial<FlexElement2DStyleProperties>;
|
|
@@ -2158,44 +2162,20 @@ declare class FlexElement2D extends BaseElement2D implements Rectangulable {
|
|
|
2158
2162
|
constructor(properties?: Partial<FlexElement2DProperties>, nodes?: Node[]);
|
|
2159
2163
|
protected _parented(parent: Node): void;
|
|
2160
2164
|
protected _unparented(oldParent: Node): void;
|
|
2161
|
-
protected _updateStyleProperty(key:
|
|
2165
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2162
2166
|
updateTransform(): void;
|
|
2163
2167
|
calculateLayout(width?: number | 'auto', height?: number | 'auto', direction?: Direction): void;
|
|
2164
2168
|
}
|
|
2165
2169
|
|
|
2166
|
-
declare class Graphics2D extends Node2D {
|
|
2167
|
-
protected _resetContext: boolean;
|
|
2168
|
-
lineCap?: LineCap;
|
|
2169
|
-
lineJoin?: LineJoin;
|
|
2170
|
-
fillStyle?: Color$1 | Texture2D;
|
|
2171
|
-
strokeStyle?: Color$1 | Texture2D;
|
|
2172
|
-
lineWidth?: number;
|
|
2173
|
-
miterLimit?: number;
|
|
2174
|
-
rect: (x: number, y: number, width: number, height: number) => this;
|
|
2175
|
-
fillRect: (x: number, y: number, width: number, height: number) => this;
|
|
2176
|
-
strokeRect: (x: number, y: number, width: number, height: number) => this;
|
|
2177
|
-
roundRect: (x: number, y: number, width: number, height: number, radii: number) => this;
|
|
2178
|
-
ellipse: (x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, counterclockwise?: boolean) => this;
|
|
2179
|
-
arc: (x: number, y: number, radius: number, startAngle: number, endAngle: number, counterclockwise?: boolean) => this;
|
|
2180
|
-
beginPath: () => this;
|
|
2181
|
-
moveTo: (x: number, y: number) => this;
|
|
2182
|
-
lineTo: (x: number, y: number) => this;
|
|
2183
|
-
closePath: () => this;
|
|
2184
|
-
fill: () => this;
|
|
2185
|
-
stroke: () => this;
|
|
2186
|
-
drawCircle(x: number, y: number, radius: number): this;
|
|
2187
|
-
drawEllipse(x: number, y: number, width: number, height: number): this;
|
|
2188
|
-
}
|
|
2189
|
-
|
|
2190
2170
|
interface Image2DProperties extends Element2DProperties {
|
|
2191
2171
|
src: string;
|
|
2192
2172
|
srcRect: ImageFillCropRect;
|
|
2193
2173
|
gif: boolean;
|
|
2194
2174
|
}
|
|
2195
2175
|
declare class Image2D extends Element2D {
|
|
2196
|
-
texture
|
|
2176
|
+
texture: AnimatedTexture | undefined;
|
|
2197
2177
|
src: string;
|
|
2198
|
-
srcRect: ImageFillCropRect;
|
|
2178
|
+
srcRect: ImageFillCropRect | undefined;
|
|
2199
2179
|
gif: boolean;
|
|
2200
2180
|
get currentFrameTexture(): Texture2D | undefined;
|
|
2201
2181
|
get textureDuration(): number;
|
|
@@ -2206,7 +2186,7 @@ declare class Image2D extends Element2D {
|
|
|
2206
2186
|
protected _complete: boolean;
|
|
2207
2187
|
protected _wait: Promise<void>;
|
|
2208
2188
|
constructor(properties?: Partial<Image2DProperties>, children?: Node[]);
|
|
2209
|
-
protected _updateProperty(key:
|
|
2189
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2210
2190
|
decode(): Promise<void>;
|
|
2211
2191
|
setResource(source: Texture2D | ImageFrame[] | AnimatedTexture): this;
|
|
2212
2192
|
protected _load(src: string): Promise<void>;
|
|
@@ -2233,8 +2213,8 @@ declare class Lottie2D extends TextureRect2D {
|
|
|
2233
2213
|
readonly texture: CanvasTexture;
|
|
2234
2214
|
animation?: AnimationItem;
|
|
2235
2215
|
constructor(properties?: Partial<Lottie2DProperties>, children?: Node[]);
|
|
2236
|
-
protected _updateProperty(key:
|
|
2237
|
-
protected _updateStyleProperty(key:
|
|
2216
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2217
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any): void;
|
|
2238
2218
|
protected _load(): Promise<void>;
|
|
2239
2219
|
protected _process(delta: number): void;
|
|
2240
2220
|
}
|
|
@@ -2264,17 +2244,17 @@ interface Text2D {
|
|
|
2264
2244
|
declare class Text2D extends TextureRect2D<CanvasTexture> {
|
|
2265
2245
|
split: boolean;
|
|
2266
2246
|
content: Text['content'];
|
|
2267
|
-
effects
|
|
2268
|
-
measureDOM
|
|
2269
|
-
fonts
|
|
2247
|
+
effects: Text['effects'];
|
|
2248
|
+
measureDOM: Text['measureDOM'];
|
|
2249
|
+
fonts: Text['fonts'];
|
|
2270
2250
|
texture: CanvasTexture;
|
|
2271
2251
|
base: Text;
|
|
2272
2252
|
measureResult?: MeasureResult;
|
|
2273
2253
|
protected _subTextsCount: number;
|
|
2274
2254
|
constructor(properties?: Partial<Text2DProperties>, children?: Node[]);
|
|
2275
|
-
protected _updateProperty(key:
|
|
2255
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2276
2256
|
protected _updateBase(): void;
|
|
2277
|
-
protected _updateStyleProperty(key:
|
|
2257
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any): void;
|
|
2278
2258
|
protected _getSubTexts(): Text2D[];
|
|
2279
2259
|
protected _updateSubTexts(): void;
|
|
2280
2260
|
measure(): MeasureResult;
|
|
@@ -2289,7 +2269,7 @@ interface TransformRect2DProperties extends BaseElement2DProperties {
|
|
|
2289
2269
|
declare class TransformRect2D extends Element2D {
|
|
2290
2270
|
handleSize: number;
|
|
2291
2271
|
constructor(properties?: Partial<TransformRect2DProperties>, nodes?: Node[]);
|
|
2292
|
-
protected _updateStyleProperty(key:
|
|
2272
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2293
2273
|
protected _drawCircle(x: number, y: number): void;
|
|
2294
2274
|
protected _drawEllipse(x: number, y: number): void;
|
|
2295
2275
|
protected _draw(): void;
|
|
@@ -2303,7 +2283,7 @@ declare class Video2D extends TextureRect2D<VideoTexture> {
|
|
|
2303
2283
|
get videoDuration(): number;
|
|
2304
2284
|
protected _wait: Promise<void>;
|
|
2305
2285
|
constructor(properties?: Partial<Video2DProperties>, children?: Node[]);
|
|
2306
|
-
protected _updateProperty(key:
|
|
2286
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2307
2287
|
waitLoad(): Promise<void>;
|
|
2308
2288
|
protected _load(src: string): Promise<void>;
|
|
2309
2289
|
protected _updateVideoCurrentTime(): void;
|
|
@@ -2345,7 +2325,7 @@ declare class Animation extends TimelineNode {
|
|
|
2345
2325
|
effectMode: AnimationEffectMode;
|
|
2346
2326
|
loop: boolean;
|
|
2347
2327
|
keyframes: Keyframe[];
|
|
2348
|
-
easing
|
|
2328
|
+
easing: Easing | undefined;
|
|
2349
2329
|
protected _keyframes: NormalizedKeyframe[];
|
|
2350
2330
|
protected _isFirstUpdatePosition: boolean;
|
|
2351
2331
|
protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
|
|
@@ -2354,7 +2334,7 @@ declare class Animation extends TimelineNode {
|
|
|
2354
2334
|
protected _parented(parent: Node): void;
|
|
2355
2335
|
protected _unparented(oldParent: Node): void;
|
|
2356
2336
|
protected _process(): void;
|
|
2357
|
-
protected _updateProperty(key:
|
|
2337
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2358
2338
|
protected _getTargets(): any[];
|
|
2359
2339
|
protected _updateKeyframes(): void;
|
|
2360
2340
|
commitStyles(): void;
|
|
@@ -2644,7 +2624,7 @@ declare class Audio extends TimelineNode {
|
|
|
2644
2624
|
start: number;
|
|
2645
2625
|
end: number;
|
|
2646
2626
|
constructor(src?: string);
|
|
2647
|
-
protected _updateProperty(key:
|
|
2627
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2648
2628
|
load(): Promise<this>;
|
|
2649
2629
|
pause(): this;
|
|
2650
2630
|
resume(): this;
|
|
@@ -2671,14 +2651,14 @@ interface AudioWaveformProperties extends Element2DProperties {
|
|
|
2671
2651
|
color: string;
|
|
2672
2652
|
}
|
|
2673
2653
|
declare class AudioWaveform extends Element2D {
|
|
2674
|
-
src
|
|
2654
|
+
src: string | undefined;
|
|
2675
2655
|
gap: number;
|
|
2676
2656
|
color: string;
|
|
2677
2657
|
protected _audioBuffer?: AudioBuffer;
|
|
2678
2658
|
protected _src: Texture2D<HTMLCanvasElement> | undefined;
|
|
2679
2659
|
protected _needsUpdateTexture: boolean;
|
|
2680
2660
|
constructor(options?: Partial<AudioWaveformProperties>);
|
|
2681
|
-
protected _updateProperty(key:
|
|
2661
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2682
2662
|
_loadSrc(src: string): Promise<void>;
|
|
2683
2663
|
syncTexture(force?: boolean): void;
|
|
2684
2664
|
protected _process(delta: number): void;
|
|
@@ -2714,7 +2694,7 @@ interface ColorFilterEffectProperties {
|
|
|
2714
2694
|
}
|
|
2715
2695
|
declare class ColorFilterEffect extends Effect {
|
|
2716
2696
|
static material: Material;
|
|
2717
|
-
filter
|
|
2697
|
+
filter: string | undefined;
|
|
2718
2698
|
protected _colorMatrix: ColorMatrix;
|
|
2719
2699
|
constructor(properties?: Partial<ColorFilterEffectProperties>, children?: Node[]);
|
|
2720
2700
|
apply(renderer: WebGLRenderer, source: Viewport): void;
|
|
@@ -2866,13 +2846,12 @@ interface KawaseBlurEffectProperties extends EffectProperties {
|
|
|
2866
2846
|
declare const frag = "varying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\n\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y + uOffset.y));\n color += texture2D(sampler, vec2(vUv.x + uOffset.x, vUv.y - uOffset.y));\n color += texture2D(sampler, vec2(vUv.x - uOffset.x, vUv.y - uOffset.y));\n color *= 0.25;\n gl_FragColor = color;\n}";
|
|
2867
2847
|
declare const clampFrag = "precision highp float;\nvarying vec2 vUv;\nuniform sampler2D sampler;\nuniform vec2 uOffset;\nuniform vec4 uInputClamp;\nvoid main(void) {\n vec4 color = vec4(0.0);\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y + uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x + uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color += texture2D(sampler, clamp(vec2(vUv.x - uOffset.x, vUv.y - uOffset.y), uInputClamp.xy, uInputClamp.zw));\n color *= 0.25;\n gl_FragColor = color;\n}";
|
|
2868
2848
|
declare class KawaseBlurEffect extends Effect {
|
|
2869
|
-
material: Material;
|
|
2870
2849
|
strength: number;
|
|
2871
2850
|
quality: number;
|
|
2872
2851
|
pixelSize: [number, number];
|
|
2873
2852
|
protected _kernels: number[];
|
|
2874
2853
|
constructor(properties?: Partial<KawaseBlurEffectProperties>, children?: Node[]);
|
|
2875
|
-
protected _updateProperty(key:
|
|
2854
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2876
2855
|
/** Auto generate kernels by blur & quality */
|
|
2877
2856
|
protected _generateKernels(): void;
|
|
2878
2857
|
apply(renderer: WebGLRenderer, source: Viewport): void;
|
|
@@ -2883,11 +2862,11 @@ interface MaskEffectProperties extends EffectProperties {
|
|
|
2883
2862
|
}
|
|
2884
2863
|
declare class MaskEffect extends Effect {
|
|
2885
2864
|
static material: Material;
|
|
2886
|
-
texture
|
|
2865
|
+
texture: Texture2D<ImageBitmap> | undefined;
|
|
2887
2866
|
src: string;
|
|
2888
2867
|
constructor(properties?: Partial<MaskEffectProperties>, children?: Node[]);
|
|
2889
2868
|
load(): Promise<void>;
|
|
2890
|
-
protected _updateProperty(key:
|
|
2869
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2891
2870
|
apply(renderer: WebGLRenderer, source: Viewport, context: EffectContext): void;
|
|
2892
2871
|
}
|
|
2893
2872
|
|
|
@@ -2901,14 +2880,13 @@ interface OutlineEffectProperties extends EffectProperties {
|
|
|
2901
2880
|
knockout: boolean;
|
|
2902
2881
|
}
|
|
2903
2882
|
declare class OutlineEffect extends Effect {
|
|
2904
|
-
material: Material;
|
|
2905
2883
|
static MIN_SAMPLES: number;
|
|
2906
2884
|
static MAX_SAMPLES: number;
|
|
2907
2885
|
static getAngleStep(quality: number): number;
|
|
2908
2886
|
color: Color$1;
|
|
2909
2887
|
width: number;
|
|
2910
2888
|
style: 'dashed' | 'solid' | string;
|
|
2911
|
-
image
|
|
2889
|
+
image: string | undefined;
|
|
2912
2890
|
opacity: number;
|
|
2913
2891
|
quality: number;
|
|
2914
2892
|
knockout: boolean;
|
|
@@ -2935,7 +2913,7 @@ interface ZoomBlurEffectProperties extends EffectProperties {
|
|
|
2935
2913
|
}
|
|
2936
2914
|
declare class ZoomBlurEffect extends Effect {
|
|
2937
2915
|
static material: Material;
|
|
2938
|
-
center
|
|
2916
|
+
center: number[] | undefined;
|
|
2939
2917
|
innerRadius: number;
|
|
2940
2918
|
radius: number;
|
|
2941
2919
|
strength: number;
|
|
@@ -2959,7 +2937,7 @@ declare class Control extends Element2D implements Rectangulable {
|
|
|
2959
2937
|
protected _unparented(oldParent: any): void;
|
|
2960
2938
|
protected _parentUpdateRect(): void;
|
|
2961
2939
|
protected _input(event: InputEvent, key: InputEventKey): void;
|
|
2962
|
-
protected _updateStyleProperty(key:
|
|
2940
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2963
2941
|
protected _guiInput(event: InputEvent, key: InputEventKey): void;
|
|
2964
2942
|
}
|
|
2965
2943
|
|
|
@@ -2981,7 +2959,7 @@ declare class Range extends Control {
|
|
|
2981
2959
|
step: number;
|
|
2982
2960
|
value: number;
|
|
2983
2961
|
constructor(properties?: Partial<RangeProperties>, children?: Node[]);
|
|
2984
|
-
protected _updateProperty(key:
|
|
2962
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2985
2963
|
}
|
|
2986
2964
|
|
|
2987
2965
|
interface RulerProperties extends ControlProperties {
|
|
@@ -3007,8 +2985,8 @@ declare class Ruler extends Control {
|
|
|
3007
2985
|
gapScale: number;
|
|
3008
2986
|
texture: CanvasTexture;
|
|
3009
2987
|
constructor(properties?: Partial<RulerProperties>, children?: Node[]);
|
|
3010
|
-
protected _updateProperty(key:
|
|
3011
|
-
protected _updateStyleProperty(key:
|
|
2988
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2989
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3012
2990
|
protected _drawTexture(): void;
|
|
3013
2991
|
protected _draw(): void;
|
|
3014
2992
|
}
|
|
@@ -3019,7 +2997,7 @@ interface ScrollBarProperties extends RangeProperties {
|
|
|
3019
2997
|
declare class ScrollBar extends Range {
|
|
3020
2998
|
direction: 'vertical' | 'horizontal';
|
|
3021
2999
|
constructor(properties?: Partial<ScrollBarProperties>, children?: Node[]);
|
|
3022
|
-
protected _updateStyleProperty(key:
|
|
3000
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3023
3001
|
protected _rect(): {
|
|
3024
3002
|
left: number;
|
|
3025
3003
|
top: number;
|
|
@@ -3066,7 +3044,7 @@ declare class Scaler extends Node {
|
|
|
3066
3044
|
maxValue: number;
|
|
3067
3045
|
get target(): Element2D | undefined;
|
|
3068
3046
|
constructor(properties?: Partial<ScalerProperties>, children?: Node[]);
|
|
3069
|
-
protected _updateProperty(key:
|
|
3047
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3070
3048
|
protected _updateScale(): void;
|
|
3071
3049
|
protected _onWheel(e: WheelInputEvent): void;
|
|
3072
3050
|
protected _input(event: InputEvent, key: InputEventKey): void;
|
|
@@ -3186,7 +3164,7 @@ declare class CanvasItemEditor extends Control {
|
|
|
3186
3164
|
drawboard: Element2D;
|
|
3187
3165
|
ruler: Ruler;
|
|
3188
3166
|
constructor();
|
|
3189
|
-
protected _updateStyleProperty(key:
|
|
3167
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3190
3168
|
protected _guiInput(event: InputEvent, key: InputEventKey): void;
|
|
3191
3169
|
protected _onPointerdown(e: PointerInputEvent): void;
|
|
3192
3170
|
protected _onPointermove(e: PointerInputEvent): void;
|
|
@@ -3269,5 +3247,5 @@ interface RenderOptions {
|
|
|
3269
3247
|
}
|
|
3270
3248
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3271
3249
|
|
|
3272
|
-
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture,
|
|
3273
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|
|
3250
|
+
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, CanvasContext, CanvasItem, CanvasItemEditor, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, Control, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, EventEmitter, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GIFLoader, GaussianBlurEffect, Geometry, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JSONLoader, KawaseBlurEffect, KawaseTransition, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, Range, RawWeakMap, Rect2, RefCounted, Renderer, Resource, Ruler, SUPPORTS_AUDIO_CONTEXT, SUPPORTS_CLICK_EVENTS, SUPPORTS_CREATE_IMAGE_BITMAP, SUPPORTS_IMAGE_BITMAP, SUPPORTS_MOUSE_EVENTS, SUPPORTS_OFFLINE_AUDIO_CONTEXT, SUPPORTS_POINTER_EVENTS, SUPPORTS_RESIZE_OBSERVER, SUPPORTS_TOUCH_EVENTS, SUPPORTS_WEBGL2, SUPPORTS_WEBKIT_AUDIO_CONTEXT, SUPPORTS_WEBKIT_OFFLINE_AUDIO_CONTEXT, SUPPORTS_WEB_AUDIO, SUPPORTS_WHEEL_EVENTS, Scaler, SceneTree, ScrollBar, Text2D, TextLoader, Texture2D, TextureLoader, TextureRect2D, Ticker, TiltShiftTransition, Timeline, TimelineNode, Transform2D, TransformRect2D, Transition, TwistTransition, UvGeometry, UvMaterial, Vector, Vector2, Vector3, Vector4, VertexAttribute, VertexBuffer, Video2D, VideoLoader, VideoTexture, Viewport, ViewportTexture, WebAudio, WebAudioContext, WebGLBatch2DModule, WebGLBlendMode, WebGLBufferModule, WebGLFramebufferModule, WebGLMaskModule, WebGLModule, WebGLProgramModule, WebGLRenderer, WebGLScissorModule, WebGLState, WebGLStateModule, WebGLStencilModule, WebGLTextureModule, WebGLVertexArrayModule, WebGLViewportModule, WebSound, WheelInputEvent, XScrollBar, YScrollBar, ZoomBlurEffect, assets, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, ease, easeIn, easeInOut, easeOut, frag, getDefaultCssPropertyValue, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, render, timingFunctions, uid };
|
|
3251
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEventMap, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, CanvasBatchable, CanvasItemEventMap, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, ControlEventMap, ControlProperties, CoreObjectEventMap, CssFunction, CssFunctionArg, Cursor, CustomPropertyAccessor, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEventMap, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineOptions, EventListener, EventListenerOptions, EventListenerValue, FillDraw, FlexBaseElement2DEventMap, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEventMap, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEventMap, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DProperties, NodeEventMap, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, RangeProperties, Rectangulable, RectangulableEventMap, RefCountedEventMap, RenderMode, RenderOptions, Renderable, ResourceEventMap, RulerProperties, ScalerEventMap, ScalerProperties, SceneTreeEventMap, ScrollBarProperties, StrokeDraw, Text2DEventMap, Text2DProperties, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEventMap, TimelineNodeEventMap, TimelineNodeProperties, TimelineProperties, TimingFunctions, Transform2DObject, TransformRect2DProperties, TransitionProperties, UVTransform, VectorLike, VectorOperateOutput, VertTransform, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEventMap, ViewportFramebuffer, WebGLBufferMeta, WebGLBufferOptions, WebGLBufferTarget, WebGLBufferUsage, WebGLDrawMode, WebGLDrawOptions, WebGLExtensions, WebGLFramebufferMeta, WebGLFramebufferOptions, WebGLProgramMeta, WebGLProgramOptions, WebGLTarget, WebGLTextureFilterMode, WebGLTextureLocation, WebGLTextureMeta, WebGLTextureOptions, WebGLTextureSource, WebGLTextureTarget, WebGLTextureWrapMode, WebGLVertexArrayObjectMeta, WebGLVertexArrayObjectOptions, WebGLVertexAttrib, WebGLVertexAttribType, WebGLViewport, XScrollBarProperties, YScrollBarProperties, ZoomBlurEffectProperties };
|