modern-canvas 0.5.2 → 0.6.2
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 +625 -716
- package/dist/index.d.cts +122 -145
- package/dist/index.d.mts +122 -145
- package/dist/index.d.ts +122 -145
- package/dist/index.js +48 -47
- package/dist/index.mjs +627 -717
- package/package.json +5 -5
package/dist/index.d.cts
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,32 @@ 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;
|
|
101
107
|
toJSON(): Record<string, any>;
|
|
102
108
|
clone(): this;
|
|
103
109
|
free(): void;
|
|
@@ -1161,7 +1167,7 @@ declare class IndexBuffer extends Resource {
|
|
|
1161
1167
|
_glBufferOptions(): WebGLBufferOptions;
|
|
1162
1168
|
/** @internal */
|
|
1163
1169
|
_glBuffer(renderer: WebGLRenderer): WebGLBuffer;
|
|
1164
|
-
protected _updateProperty(key:
|
|
1170
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1165
1171
|
upload(renderer: WebGLRenderer): boolean;
|
|
1166
1172
|
}
|
|
1167
1173
|
|
|
@@ -1178,7 +1184,7 @@ declare class VertexBuffer extends Resource {
|
|
|
1178
1184
|
_glBufferOptions(): WebGLBufferOptions;
|
|
1179
1185
|
/** @internal */
|
|
1180
1186
|
_glBuffer(renderer: WebGLRenderer): WebGLBuffer;
|
|
1181
|
-
protected _updateProperty(key:
|
|
1187
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1182
1188
|
upload(renderer: WebGLRenderer): boolean;
|
|
1183
1189
|
}
|
|
1184
1190
|
|
|
@@ -1196,12 +1202,12 @@ declare class VertexAttribute extends Resource {
|
|
|
1196
1202
|
size: number;
|
|
1197
1203
|
normalized: boolean;
|
|
1198
1204
|
type: 'float' | 'unsigned_byte' | 'unsigned_short';
|
|
1199
|
-
stride
|
|
1200
|
-
offset
|
|
1201
|
-
divisor
|
|
1205
|
+
stride: number | undefined;
|
|
1206
|
+
offset: number | undefined;
|
|
1207
|
+
divisor: number | undefined;
|
|
1202
1208
|
needsUpload: boolean;
|
|
1203
1209
|
constructor(options?: VertexAttributeOptions);
|
|
1204
|
-
protected _updateProperty(key:
|
|
1210
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1205
1211
|
upload(): boolean;
|
|
1206
1212
|
}
|
|
1207
1213
|
|
|
@@ -1299,7 +1305,7 @@ declare class Texture2D<T extends Texture2DSource = Texture2DSource> extends Res
|
|
|
1299
1305
|
_glTextureOptions(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): WebGLTextureOptions;
|
|
1300
1306
|
/** @internal */
|
|
1301
1307
|
_glTexture(renderer: WebGLRenderer, options?: Partial<WebGLTextureOptions>): WebGLTexture;
|
|
1302
|
-
protected _updateProperty(key:
|
|
1308
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1303
1309
|
protected _updatePOT(): void;
|
|
1304
1310
|
protected _updateSize(): void;
|
|
1305
1311
|
requestUpload(): void;
|
|
@@ -1324,7 +1330,7 @@ declare class AnimatedTexture extends Resource {
|
|
|
1324
1330
|
declare class CanvasTexture extends Texture2D<HTMLCanvasElement> {
|
|
1325
1331
|
pixelRatio: number;
|
|
1326
1332
|
constructor(source?: HTMLCanvasElement);
|
|
1327
|
-
protected _updateProperty(key:
|
|
1333
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1328
1334
|
}
|
|
1329
1335
|
|
|
1330
1336
|
declare class ColorTexture extends Texture2D {
|
|
@@ -1358,7 +1364,7 @@ declare class ImageTexture extends Texture2D<HTMLImageElement> {
|
|
|
1358
1364
|
|
|
1359
1365
|
declare class PixelsTexture extends Texture2D<Texture2DPixelsSource> {
|
|
1360
1366
|
constructor(pixels?: number[] | ArrayBufferLike | ArrayBufferView | null, width?: number, height?: number);
|
|
1361
|
-
protected _updateProperty(key:
|
|
1367
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1362
1368
|
}
|
|
1363
1369
|
|
|
1364
1370
|
interface VideoTextureOptions {
|
|
@@ -1393,7 +1399,7 @@ declare class VideoTexture extends Texture2D<HTMLVideoElement> {
|
|
|
1393
1399
|
protected _resolve?: (val: this) => void;
|
|
1394
1400
|
protected _reject?: (event: ErrorEvent) => void;
|
|
1395
1401
|
constructor(source: HTMLVideoElement | (string | VideoTextureSource)[] | string, options?: VideoTextureOptions);
|
|
1396
|
-
protected _updateProperty(key:
|
|
1402
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1397
1403
|
protected _onPlayStart: () => void;
|
|
1398
1404
|
protected _onPlayStop: () => void;
|
|
1399
1405
|
protected _onCanPlay: () => void;
|
|
@@ -1486,7 +1492,7 @@ declare class Timeline extends Node {
|
|
|
1486
1492
|
loop: boolean;
|
|
1487
1493
|
static from(range: number | number[], loop?: boolean): Timeline;
|
|
1488
1494
|
constructor(properties?: Partial<TimelineProperties>);
|
|
1489
|
-
protected _updateProperty(key:
|
|
1495
|
+
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
1490
1496
|
addTime(delta: number): this;
|
|
1491
1497
|
protected _process(delta: number): void;
|
|
1492
1498
|
}
|
|
@@ -1518,14 +1524,14 @@ interface Viewport {
|
|
|
1518
1524
|
}
|
|
1519
1525
|
declare class Viewport extends Node implements Rectangulable {
|
|
1520
1526
|
flipY: boolean;
|
|
1527
|
+
protected _projection: Projection2D;
|
|
1528
|
+
protected _framebufferIndex: number;
|
|
1529
|
+
protected _framebuffers: ViewportFramebuffer[];
|
|
1521
1530
|
x: number;
|
|
1522
1531
|
y: number;
|
|
1523
1532
|
width: number;
|
|
1524
1533
|
height: number;
|
|
1525
1534
|
get valid(): boolean;
|
|
1526
|
-
protected _projection: Projection2D;
|
|
1527
|
-
protected _framebufferIndex: number;
|
|
1528
|
-
protected _framebuffers: ViewportFramebuffer[];
|
|
1529
1535
|
get framebuffer(): ViewportFramebuffer;
|
|
1530
1536
|
get texture(): ViewportTexture;
|
|
1531
1537
|
constructor(flipY?: boolean);
|
|
@@ -1533,7 +1539,7 @@ declare class Viewport extends Node implements Rectangulable {
|
|
|
1533
1539
|
_glFramebufferOptions(renderer: WebGLRenderer): WebGLFramebufferOptions;
|
|
1534
1540
|
/** @internal */
|
|
1535
1541
|
_glFramebuffer(renderer: WebGLRenderer): WebGLFramebuffer;
|
|
1536
|
-
protected _updateProperty(key:
|
|
1542
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1537
1543
|
requestUpload(): void;
|
|
1538
1544
|
resize(width: number, height: number): void;
|
|
1539
1545
|
upload(renderer: WebGLRenderer): boolean;
|
|
@@ -1561,18 +1567,19 @@ interface SceneTree {
|
|
|
1561
1567
|
}
|
|
1562
1568
|
declare class SceneTree extends MainLoop {
|
|
1563
1569
|
processPaused: boolean;
|
|
1564
|
-
backgroundColor
|
|
1570
|
+
backgroundColor: Color$1 | undefined;
|
|
1565
1571
|
debug: boolean;
|
|
1566
1572
|
readonly input: Input;
|
|
1567
1573
|
readonly renderStack: RenderStack;
|
|
1568
1574
|
readonly root: Viewport;
|
|
1569
1575
|
readonly timeline: Timeline;
|
|
1576
|
+
nodes: Map<string, Node>;
|
|
1570
1577
|
protected _backgroundColor: Color;
|
|
1571
1578
|
protected _currentViewport?: Viewport;
|
|
1572
1579
|
getCurrentViewport(): Viewport | undefined;
|
|
1573
1580
|
setCurrentViewport(viewport: Viewport | undefined): void;
|
|
1574
1581
|
constructor(timeline?: Timeline);
|
|
1575
|
-
protected _updateProperty(key:
|
|
1582
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1576
1583
|
log(...args: any[]): void;
|
|
1577
1584
|
protected _process(delta?: number): void;
|
|
1578
1585
|
protected _render(renderer: WebGLRenderer): void;
|
|
@@ -1629,17 +1636,18 @@ interface Node {
|
|
|
1629
1636
|
emit: (<K extends keyof NodeEventMap>(type: K, ...args: Parameters<NodeEventMap[K]>) => boolean) & ((type: string, ...args: any[]) => boolean);
|
|
1630
1637
|
}
|
|
1631
1638
|
declare class Node extends CoreObject {
|
|
1632
|
-
readonly
|
|
1639
|
+
readonly is: string;
|
|
1640
|
+
id: string;
|
|
1633
1641
|
name: string;
|
|
1634
|
-
mask?: Maskable;
|
|
1635
1642
|
processMode: ProcessMode;
|
|
1636
1643
|
processSortMode: ProcessSortMode;
|
|
1637
1644
|
renderMode: RenderMode;
|
|
1638
1645
|
internalMode: InternalMode;
|
|
1639
1646
|
meta: Record<string, any>;
|
|
1647
|
+
mask?: Maskable;
|
|
1640
1648
|
protected _readyed: boolean;
|
|
1641
1649
|
constructor(properties?: Partial<NodeProperties>, nodes?: Node[]);
|
|
1642
|
-
setProperties(properties?: Record<
|
|
1650
|
+
setProperties(properties?: Record<string, any>): this;
|
|
1643
1651
|
/** Name */
|
|
1644
1652
|
getName(): string;
|
|
1645
1653
|
setName(value: string): this;
|
|
@@ -1672,8 +1680,8 @@ declare class Node extends CoreObject {
|
|
|
1672
1680
|
get lastSibling(): Node | undefined;
|
|
1673
1681
|
canProcess(): boolean;
|
|
1674
1682
|
canRender(): boolean;
|
|
1675
|
-
protected _update(changed: Map<
|
|
1676
|
-
protected _updateProperty(key:
|
|
1683
|
+
protected _update(changed: Map<string, any>): void;
|
|
1684
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1677
1685
|
protected _onTreeEnter(tree: SceneTree): void;
|
|
1678
1686
|
protected _onTreeExit(oldTree: SceneTree): void;
|
|
1679
1687
|
protected _onParented(parent: Node): void;
|
|
@@ -1714,8 +1722,8 @@ declare class Node extends CoreObject {
|
|
|
1714
1722
|
protected _render(renderer: WebGLRenderer): void;
|
|
1715
1723
|
clone(): this;
|
|
1716
1724
|
toJSON(): Record<string, any>;
|
|
1717
|
-
static parse(
|
|
1718
|
-
static parse(
|
|
1725
|
+
static parse(value: Record<string, any>[]): Node[];
|
|
1726
|
+
static parse(value: Record<string, any>): Node;
|
|
1719
1727
|
}
|
|
1720
1728
|
|
|
1721
1729
|
interface TimelineNodeProperties extends NodeProperties {
|
|
@@ -1769,8 +1777,8 @@ interface CanvasItem {
|
|
|
1769
1777
|
emit: (<K extends keyof CanvasItemEventMap>(type: K, ...args: Parameters<CanvasItemEventMap[K]>) => boolean) & ((type: string, ...args: any[]) => boolean);
|
|
1770
1778
|
}
|
|
1771
1779
|
declare class CanvasItem extends TimelineNode {
|
|
1772
|
-
modulate
|
|
1773
|
-
blendMode
|
|
1780
|
+
modulate: Color$1 | undefined;
|
|
1781
|
+
blendMode: WebGLBlendMode | undefined;
|
|
1774
1782
|
visible: boolean;
|
|
1775
1783
|
opacity: number;
|
|
1776
1784
|
protected _parentGlobalVisible?: boolean;
|
|
@@ -1789,7 +1797,7 @@ declare class CanvasItem extends TimelineNode {
|
|
|
1789
1797
|
protected _layoutedBatchables: CanvasBatchable[];
|
|
1790
1798
|
protected _batchables: CanvasBatchable[];
|
|
1791
1799
|
constructor(properties?: Partial<CanvasItemProperties>, nodes?: Node[]);
|
|
1792
|
-
protected _updateProperty(key:
|
|
1800
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1793
1801
|
show(): void;
|
|
1794
1802
|
hide(): void;
|
|
1795
1803
|
isVisibleInTree(): boolean;
|
|
@@ -1804,7 +1812,7 @@ declare class CanvasItem extends TimelineNode {
|
|
|
1804
1812
|
protected _relayout(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1805
1813
|
protected _repaint(batchables: CanvasBatchable[]): CanvasBatchable[];
|
|
1806
1814
|
protected _process(delta: number): void;
|
|
1807
|
-
protected _update(changed: Map<
|
|
1815
|
+
protected _update(changed: Map<string, any>): void;
|
|
1808
1816
|
protected _render(renderer: WebGLRenderer): void;
|
|
1809
1817
|
}
|
|
1810
1818
|
|
|
@@ -1825,8 +1833,8 @@ interface EffectContext {
|
|
|
1825
1833
|
to?: Viewport;
|
|
1826
1834
|
}
|
|
1827
1835
|
declare class Effect extends TimelineNode {
|
|
1828
|
-
material
|
|
1829
|
-
effectMode
|
|
1836
|
+
material: Material | undefined;
|
|
1837
|
+
effectMode: EffectMode | undefined;
|
|
1830
1838
|
glsl: string;
|
|
1831
1839
|
glslSrc: string;
|
|
1832
1840
|
protected get _effectMode(): EffectMode;
|
|
@@ -1840,7 +1848,7 @@ declare class Effect extends TimelineNode {
|
|
|
1840
1848
|
protected _previousSibling?: Node;
|
|
1841
1849
|
protected _nextSibling?: Node;
|
|
1842
1850
|
constructor(properties?: Partial<EffectProperties>, children?: Node[]);
|
|
1843
|
-
protected _updateProperty(key:
|
|
1851
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1844
1852
|
protected _treeEnter(tree: SceneTree): void;
|
|
1845
1853
|
protected _treeExit(oldTree: SceneTree): void;
|
|
1846
1854
|
protected _onProcessing(): void;
|
|
@@ -1877,7 +1885,7 @@ declare class Node2D extends CanvasItem {
|
|
|
1877
1885
|
readonly globalTransform: Transform2D;
|
|
1878
1886
|
protected _parentTransformDirtyId?: number;
|
|
1879
1887
|
constructor(properties?: Partial<Node2DProperties>, nodes?: Node[]);
|
|
1880
|
-
protected _updateProperty(key:
|
|
1888
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1881
1889
|
getTransformOrigin(): Vector2;
|
|
1882
1890
|
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
1883
1891
|
updateTransform(): void;
|
|
@@ -1892,21 +1900,21 @@ interface BaseElement2DFill extends NormalizedFill {
|
|
|
1892
1900
|
declare class BaseElement2DFill extends CoreObject {
|
|
1893
1901
|
parent: BaseElement2D;
|
|
1894
1902
|
enabled: boolean;
|
|
1895
|
-
color
|
|
1896
|
-
image
|
|
1897
|
-
linearGradient
|
|
1898
|
-
radialGradient
|
|
1899
|
-
cropRect
|
|
1900
|
-
stretchRect
|
|
1901
|
-
dpi
|
|
1902
|
-
rotateWithShape
|
|
1903
|
-
tile
|
|
1904
|
-
opacity
|
|
1903
|
+
color: NormalizedFill['color'];
|
|
1904
|
+
image: NormalizedFill['image'];
|
|
1905
|
+
linearGradient: NormalizedFill['linearGradient'];
|
|
1906
|
+
radialGradient: NormalizedFill['radialGradient'];
|
|
1907
|
+
cropRect: NormalizedFill['cropRect'];
|
|
1908
|
+
stretchRect: NormalizedFill['stretchRect'];
|
|
1909
|
+
dpi: NormalizedFill['dpi'];
|
|
1910
|
+
rotateWithShape: NormalizedFill['rotateWithShape'];
|
|
1911
|
+
tile: NormalizedFill['tile'];
|
|
1912
|
+
opacity: NormalizedFill['opacity'];
|
|
1905
1913
|
protected _texture?: Texture2D;
|
|
1906
1914
|
constructor(parent: BaseElement2D);
|
|
1907
1915
|
protected _setProperties(properties?: Fill): this;
|
|
1908
1916
|
setProperties(properties?: Fill): this;
|
|
1909
|
-
protected _updateProperty(key:
|
|
1917
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1910
1918
|
loadTexture(): Promise<Texture2D | undefined>;
|
|
1911
1919
|
protected _updateTexture(): Promise<void>;
|
|
1912
1920
|
canDraw(): boolean;
|
|
@@ -1917,27 +1925,22 @@ declare class BaseElement2DFill extends CoreObject {
|
|
|
1917
1925
|
draw(): void;
|
|
1918
1926
|
}
|
|
1919
1927
|
|
|
1920
|
-
interface BaseElement2DBackground extends NormalizedBackground {
|
|
1921
|
-
}
|
|
1922
1928
|
declare class BaseElement2DBackground extends BaseElement2DFill {
|
|
1923
|
-
fillWithShape
|
|
1929
|
+
fillWithShape: NormalizedBackground['fillWithShape'];
|
|
1924
1930
|
setProperties(properties?: Background): this;
|
|
1925
1931
|
}
|
|
1926
1932
|
|
|
1927
|
-
interface BaseElement2DForeground extends NormalizedForeground {
|
|
1928
|
-
}
|
|
1929
1933
|
declare class BaseElement2DForeground extends BaseElement2DFill {
|
|
1930
|
-
fillWithShape
|
|
1934
|
+
fillWithShape: NormalizedForeground['fillWithShape'];
|
|
1931
1935
|
setProperties(properties?: Foreground): this;
|
|
1932
1936
|
}
|
|
1933
1937
|
|
|
1934
1938
|
declare class BaseElement2DOutline extends BaseElement2DFill {
|
|
1935
|
-
enabled: boolean;
|
|
1936
1939
|
color: NormalizedOutline['color'];
|
|
1937
1940
|
width: NormalizedOutline['width'];
|
|
1938
1941
|
style: NormalizedOutline['style'];
|
|
1939
1942
|
setProperties(properties?: Outline): this;
|
|
1940
|
-
protected _updateProperty(key:
|
|
1943
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1941
1944
|
canDraw(): boolean;
|
|
1942
1945
|
draw(): void;
|
|
1943
1946
|
}
|
|
@@ -1951,21 +1954,21 @@ declare class BaseElement2DShadow extends CoreObject {
|
|
|
1951
1954
|
offsetX: NormalizedShadow['offsetY'];
|
|
1952
1955
|
constructor(parent: BaseElement2D);
|
|
1953
1956
|
setProperties(properties?: Shadow): this;
|
|
1954
|
-
protected _updateProperty(key:
|
|
1957
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1955
1958
|
updateEffect(): void;
|
|
1956
1959
|
}
|
|
1957
1960
|
|
|
1958
1961
|
declare class BaseElement2DShape extends CoreObject {
|
|
1959
1962
|
parent: BaseElement2D;
|
|
1960
1963
|
enabled: boolean;
|
|
1961
|
-
preset
|
|
1962
|
-
svg
|
|
1963
|
-
viewBox
|
|
1964
|
-
paths:
|
|
1964
|
+
preset: NormalizedShape['preset'];
|
|
1965
|
+
svg: NormalizedShape['svg'];
|
|
1966
|
+
viewBox: NormalizedShape['viewBox'];
|
|
1967
|
+
paths: NormalizedShape['paths'];
|
|
1965
1968
|
protected _path2DSet: Path2DSet;
|
|
1966
1969
|
constructor(parent: BaseElement2D);
|
|
1967
1970
|
setProperties(properties?: Shape): this;
|
|
1968
|
-
protected _updateProperty(key:
|
|
1971
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1969
1972
|
protected _updatePath2DSet(): void;
|
|
1970
1973
|
draw(): void;
|
|
1971
1974
|
drawRect(): void;
|
|
@@ -1987,14 +1990,14 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
1987
1990
|
parent: BaseElement2D;
|
|
1988
1991
|
enabled: boolean;
|
|
1989
1992
|
content: Text['content'];
|
|
1990
|
-
effects
|
|
1991
|
-
measureDOM
|
|
1992
|
-
fonts
|
|
1993
|
+
effects: Text['effects'];
|
|
1994
|
+
measureDOM: Text['measureDOM'];
|
|
1995
|
+
fonts: Text['fonts'];
|
|
1993
1996
|
constructor(parent: BaseElement2D);
|
|
1994
1997
|
base: Text;
|
|
1995
1998
|
measureResult?: MeasureResult;
|
|
1996
1999
|
setProperties(properties?: Text$1): this;
|
|
1997
|
-
protected _updateProperty(key:
|
|
2000
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
1998
2001
|
protected _updateText(): void;
|
|
1999
2002
|
measure(): MeasureResult;
|
|
2000
2003
|
updateMeasure(): this;
|
|
@@ -2003,7 +2006,7 @@ declare class BaseElement2DText extends CoreObject {
|
|
|
2003
2006
|
}
|
|
2004
2007
|
|
|
2005
2008
|
interface BaseElement2DEventMap extends CanvasItemEventMap {
|
|
2006
|
-
updateStyleProperty: (key:
|
|
2009
|
+
updateStyleProperty: (key: string, value: any, oldValue: any, declaration?: PropertyDeclaration) => void;
|
|
2007
2010
|
}
|
|
2008
2011
|
interface BaseElement2DProperties extends Node2DProperties {
|
|
2009
2012
|
modulate: Color$1;
|
|
@@ -2050,8 +2053,8 @@ declare class BaseElement2D extends Node2D implements Rectangulable {
|
|
|
2050
2053
|
get shadow(): BaseElement2DShadow;
|
|
2051
2054
|
set shadow(value: Shadow);
|
|
2052
2055
|
constructor(properties?: Partial<BaseElement2DProperties>, nodes?: Node[]);
|
|
2053
|
-
setProperties(properties?: Record<
|
|
2054
|
-
protected _updateStyleProperty(key:
|
|
2056
|
+
setProperties(properties?: Record<string, any>): this;
|
|
2057
|
+
protected _updateStyleProperty(key: string, value: any, _oldValue: any, _declaration?: PropertyDeclaration): void;
|
|
2055
2058
|
protected _updateMaskImage(): void;
|
|
2056
2059
|
getTransformOrigin(): Vector2;
|
|
2057
2060
|
getTransform(cb?: (transform: Transform2D) => void): Transform2D;
|
|
@@ -2099,7 +2102,7 @@ declare class Element2D extends BaseElement2D {
|
|
|
2099
2102
|
get style(): Element2DStyle;
|
|
2100
2103
|
set style(style: Element2DStyle);
|
|
2101
2104
|
constructor(properties?: Partial<Element2DProperties>, nodes?: Node[]);
|
|
2102
|
-
protected _updateStyleProperty(key:
|
|
2105
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2103
2106
|
}
|
|
2104
2107
|
|
|
2105
2108
|
interface FlexElement2DStyleProperties extends BaseElement2DStyleProperties {
|
|
@@ -2131,11 +2134,11 @@ declare class FlexLayout {
|
|
|
2131
2134
|
constructor(_element: FlexElement2D);
|
|
2132
2135
|
calculateLayout(width?: number | 'auto', height?: number | 'auto', direction?: Direction): void;
|
|
2133
2136
|
getComputedLayout(): ComputedLayout;
|
|
2134
|
-
updateStyleProperty(key:
|
|
2137
|
+
updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2135
2138
|
}
|
|
2136
2139
|
|
|
2137
2140
|
interface FlexBaseElement2DEventMap extends BaseElement2DEventMap {
|
|
2138
|
-
updateStyleProperty: (key:
|
|
2141
|
+
updateStyleProperty: (key: string, value: any, oldValue: any, declaration?: PropertyDeclaration) => void;
|
|
2139
2142
|
}
|
|
2140
2143
|
interface FlexElement2DProperties extends BaseElement2DProperties {
|
|
2141
2144
|
style: Partial<FlexElement2DStyleProperties>;
|
|
@@ -2158,44 +2161,20 @@ declare class FlexElement2D extends BaseElement2D implements Rectangulable {
|
|
|
2158
2161
|
constructor(properties?: Partial<FlexElement2DProperties>, nodes?: Node[]);
|
|
2159
2162
|
protected _parented(parent: Node): void;
|
|
2160
2163
|
protected _unparented(oldParent: Node): void;
|
|
2161
|
-
protected _updateStyleProperty(key:
|
|
2164
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2162
2165
|
updateTransform(): void;
|
|
2163
2166
|
calculateLayout(width?: number | 'auto', height?: number | 'auto', direction?: Direction): void;
|
|
2164
2167
|
}
|
|
2165
2168
|
|
|
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
2169
|
interface Image2DProperties extends Element2DProperties {
|
|
2191
2170
|
src: string;
|
|
2192
2171
|
srcRect: ImageFillCropRect;
|
|
2193
2172
|
gif: boolean;
|
|
2194
2173
|
}
|
|
2195
2174
|
declare class Image2D extends Element2D {
|
|
2196
|
-
texture
|
|
2175
|
+
texture: AnimatedTexture | undefined;
|
|
2197
2176
|
src: string;
|
|
2198
|
-
srcRect: ImageFillCropRect;
|
|
2177
|
+
srcRect: ImageFillCropRect | undefined;
|
|
2199
2178
|
gif: boolean;
|
|
2200
2179
|
get currentFrameTexture(): Texture2D | undefined;
|
|
2201
2180
|
get textureDuration(): number;
|
|
@@ -2206,7 +2185,7 @@ declare class Image2D extends Element2D {
|
|
|
2206
2185
|
protected _complete: boolean;
|
|
2207
2186
|
protected _wait: Promise<void>;
|
|
2208
2187
|
constructor(properties?: Partial<Image2DProperties>, children?: Node[]);
|
|
2209
|
-
protected _updateProperty(key:
|
|
2188
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2210
2189
|
decode(): Promise<void>;
|
|
2211
2190
|
setResource(source: Texture2D | ImageFrame[] | AnimatedTexture): this;
|
|
2212
2191
|
protected _load(src: string): Promise<void>;
|
|
@@ -2233,8 +2212,8 @@ declare class Lottie2D extends TextureRect2D {
|
|
|
2233
2212
|
readonly texture: CanvasTexture;
|
|
2234
2213
|
animation?: AnimationItem;
|
|
2235
2214
|
constructor(properties?: Partial<Lottie2DProperties>, children?: Node[]);
|
|
2236
|
-
protected _updateProperty(key:
|
|
2237
|
-
protected _updateStyleProperty(key:
|
|
2215
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2216
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any): void;
|
|
2238
2217
|
protected _load(): Promise<void>;
|
|
2239
2218
|
protected _process(delta: number): void;
|
|
2240
2219
|
}
|
|
@@ -2264,17 +2243,17 @@ interface Text2D {
|
|
|
2264
2243
|
declare class Text2D extends TextureRect2D<CanvasTexture> {
|
|
2265
2244
|
split: boolean;
|
|
2266
2245
|
content: Text['content'];
|
|
2267
|
-
effects
|
|
2268
|
-
measureDOM
|
|
2269
|
-
fonts
|
|
2246
|
+
effects: Text['effects'];
|
|
2247
|
+
measureDOM: Text['measureDOM'];
|
|
2248
|
+
fonts: Text['fonts'];
|
|
2270
2249
|
texture: CanvasTexture;
|
|
2271
2250
|
base: Text;
|
|
2272
2251
|
measureResult?: MeasureResult;
|
|
2273
2252
|
protected _subTextsCount: number;
|
|
2274
2253
|
constructor(properties?: Partial<Text2DProperties>, children?: Node[]);
|
|
2275
|
-
protected _updateProperty(key:
|
|
2254
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2276
2255
|
protected _updateBase(): void;
|
|
2277
|
-
protected _updateStyleProperty(key:
|
|
2256
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any): void;
|
|
2278
2257
|
protected _getSubTexts(): Text2D[];
|
|
2279
2258
|
protected _updateSubTexts(): void;
|
|
2280
2259
|
measure(): MeasureResult;
|
|
@@ -2289,7 +2268,7 @@ interface TransformRect2DProperties extends BaseElement2DProperties {
|
|
|
2289
2268
|
declare class TransformRect2D extends Element2D {
|
|
2290
2269
|
handleSize: number;
|
|
2291
2270
|
constructor(properties?: Partial<TransformRect2DProperties>, nodes?: Node[]);
|
|
2292
|
-
protected _updateStyleProperty(key:
|
|
2271
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2293
2272
|
protected _drawCircle(x: number, y: number): void;
|
|
2294
2273
|
protected _drawEllipse(x: number, y: number): void;
|
|
2295
2274
|
protected _draw(): void;
|
|
@@ -2303,7 +2282,7 @@ declare class Video2D extends TextureRect2D<VideoTexture> {
|
|
|
2303
2282
|
get videoDuration(): number;
|
|
2304
2283
|
protected _wait: Promise<void>;
|
|
2305
2284
|
constructor(properties?: Partial<Video2DProperties>, children?: Node[]);
|
|
2306
|
-
protected _updateProperty(key:
|
|
2285
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2307
2286
|
waitLoad(): Promise<void>;
|
|
2308
2287
|
protected _load(src: string): Promise<void>;
|
|
2309
2288
|
protected _updateVideoCurrentTime(): void;
|
|
@@ -2345,7 +2324,7 @@ declare class Animation extends TimelineNode {
|
|
|
2345
2324
|
effectMode: AnimationEffectMode;
|
|
2346
2325
|
loop: boolean;
|
|
2347
2326
|
keyframes: Keyframe[];
|
|
2348
|
-
easing
|
|
2327
|
+
easing: Easing | undefined;
|
|
2349
2328
|
protected _keyframes: NormalizedKeyframe[];
|
|
2350
2329
|
protected _isFirstUpdatePosition: boolean;
|
|
2351
2330
|
protected _cachedProps: RawWeakMap$1<any, Map<string, any>>;
|
|
@@ -2354,7 +2333,7 @@ declare class Animation extends TimelineNode {
|
|
|
2354
2333
|
protected _parented(parent: Node): void;
|
|
2355
2334
|
protected _unparented(oldParent: Node): void;
|
|
2356
2335
|
protected _process(): void;
|
|
2357
|
-
protected _updateProperty(key:
|
|
2336
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2358
2337
|
protected _getTargets(): any[];
|
|
2359
2338
|
protected _updateKeyframes(): void;
|
|
2360
2339
|
commitStyles(): void;
|
|
@@ -2644,7 +2623,7 @@ declare class Audio extends TimelineNode {
|
|
|
2644
2623
|
start: number;
|
|
2645
2624
|
end: number;
|
|
2646
2625
|
constructor(src?: string);
|
|
2647
|
-
protected _updateProperty(key:
|
|
2626
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2648
2627
|
load(): Promise<this>;
|
|
2649
2628
|
pause(): this;
|
|
2650
2629
|
resume(): this;
|
|
@@ -2671,14 +2650,14 @@ interface AudioWaveformProperties extends Element2DProperties {
|
|
|
2671
2650
|
color: string;
|
|
2672
2651
|
}
|
|
2673
2652
|
declare class AudioWaveform extends Element2D {
|
|
2674
|
-
src
|
|
2653
|
+
src: string | undefined;
|
|
2675
2654
|
gap: number;
|
|
2676
2655
|
color: string;
|
|
2677
2656
|
protected _audioBuffer?: AudioBuffer;
|
|
2678
2657
|
protected _src: Texture2D<HTMLCanvasElement> | undefined;
|
|
2679
2658
|
protected _needsUpdateTexture: boolean;
|
|
2680
2659
|
constructor(options?: Partial<AudioWaveformProperties>);
|
|
2681
|
-
protected _updateProperty(key:
|
|
2660
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2682
2661
|
_loadSrc(src: string): Promise<void>;
|
|
2683
2662
|
syncTexture(force?: boolean): void;
|
|
2684
2663
|
protected _process(delta: number): void;
|
|
@@ -2714,7 +2693,7 @@ interface ColorFilterEffectProperties {
|
|
|
2714
2693
|
}
|
|
2715
2694
|
declare class ColorFilterEffect extends Effect {
|
|
2716
2695
|
static material: Material;
|
|
2717
|
-
filter
|
|
2696
|
+
filter: string | undefined;
|
|
2718
2697
|
protected _colorMatrix: ColorMatrix;
|
|
2719
2698
|
constructor(properties?: Partial<ColorFilterEffectProperties>, children?: Node[]);
|
|
2720
2699
|
apply(renderer: WebGLRenderer, source: Viewport): void;
|
|
@@ -2866,13 +2845,12 @@ interface KawaseBlurEffectProperties extends EffectProperties {
|
|
|
2866
2845
|
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
2846
|
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
2847
|
declare class KawaseBlurEffect extends Effect {
|
|
2869
|
-
material: Material;
|
|
2870
2848
|
strength: number;
|
|
2871
2849
|
quality: number;
|
|
2872
2850
|
pixelSize: [number, number];
|
|
2873
2851
|
protected _kernels: number[];
|
|
2874
2852
|
constructor(properties?: Partial<KawaseBlurEffectProperties>, children?: Node[]);
|
|
2875
|
-
protected _updateProperty(key:
|
|
2853
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2876
2854
|
/** Auto generate kernels by blur & quality */
|
|
2877
2855
|
protected _generateKernels(): void;
|
|
2878
2856
|
apply(renderer: WebGLRenderer, source: Viewport): void;
|
|
@@ -2883,11 +2861,11 @@ interface MaskEffectProperties extends EffectProperties {
|
|
|
2883
2861
|
}
|
|
2884
2862
|
declare class MaskEffect extends Effect {
|
|
2885
2863
|
static material: Material;
|
|
2886
|
-
texture
|
|
2864
|
+
texture: Texture2D<ImageBitmap> | undefined;
|
|
2887
2865
|
src: string;
|
|
2888
2866
|
constructor(properties?: Partial<MaskEffectProperties>, children?: Node[]);
|
|
2889
2867
|
load(): Promise<void>;
|
|
2890
|
-
protected _updateProperty(key:
|
|
2868
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2891
2869
|
apply(renderer: WebGLRenderer, source: Viewport, context: EffectContext): void;
|
|
2892
2870
|
}
|
|
2893
2871
|
|
|
@@ -2901,14 +2879,13 @@ interface OutlineEffectProperties extends EffectProperties {
|
|
|
2901
2879
|
knockout: boolean;
|
|
2902
2880
|
}
|
|
2903
2881
|
declare class OutlineEffect extends Effect {
|
|
2904
|
-
material: Material;
|
|
2905
2882
|
static MIN_SAMPLES: number;
|
|
2906
2883
|
static MAX_SAMPLES: number;
|
|
2907
2884
|
static getAngleStep(quality: number): number;
|
|
2908
2885
|
color: Color$1;
|
|
2909
2886
|
width: number;
|
|
2910
2887
|
style: 'dashed' | 'solid' | string;
|
|
2911
|
-
image
|
|
2888
|
+
image: string | undefined;
|
|
2912
2889
|
opacity: number;
|
|
2913
2890
|
quality: number;
|
|
2914
2891
|
knockout: boolean;
|
|
@@ -2935,7 +2912,7 @@ interface ZoomBlurEffectProperties extends EffectProperties {
|
|
|
2935
2912
|
}
|
|
2936
2913
|
declare class ZoomBlurEffect extends Effect {
|
|
2937
2914
|
static material: Material;
|
|
2938
|
-
center
|
|
2915
|
+
center: number[] | undefined;
|
|
2939
2916
|
innerRadius: number;
|
|
2940
2917
|
radius: number;
|
|
2941
2918
|
strength: number;
|
|
@@ -2959,7 +2936,7 @@ declare class Control extends Element2D implements Rectangulable {
|
|
|
2959
2936
|
protected _unparented(oldParent: any): void;
|
|
2960
2937
|
protected _parentUpdateRect(): void;
|
|
2961
2938
|
protected _input(event: InputEvent, key: InputEventKey): void;
|
|
2962
|
-
protected _updateStyleProperty(key:
|
|
2939
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2963
2940
|
protected _guiInput(event: InputEvent, key: InputEventKey): void;
|
|
2964
2941
|
}
|
|
2965
2942
|
|
|
@@ -2981,7 +2958,7 @@ declare class Range extends Control {
|
|
|
2981
2958
|
step: number;
|
|
2982
2959
|
value: number;
|
|
2983
2960
|
constructor(properties?: Partial<RangeProperties>, children?: Node[]);
|
|
2984
|
-
protected _updateProperty(key:
|
|
2961
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2985
2962
|
}
|
|
2986
2963
|
|
|
2987
2964
|
interface RulerProperties extends ControlProperties {
|
|
@@ -3007,8 +2984,8 @@ declare class Ruler extends Control {
|
|
|
3007
2984
|
gapScale: number;
|
|
3008
2985
|
texture: CanvasTexture;
|
|
3009
2986
|
constructor(properties?: Partial<RulerProperties>, children?: Node[]);
|
|
3010
|
-
protected _updateProperty(key:
|
|
3011
|
-
protected _updateStyleProperty(key:
|
|
2987
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
2988
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3012
2989
|
protected _drawTexture(): void;
|
|
3013
2990
|
protected _draw(): void;
|
|
3014
2991
|
}
|
|
@@ -3019,7 +2996,7 @@ interface ScrollBarProperties extends RangeProperties {
|
|
|
3019
2996
|
declare class ScrollBar extends Range {
|
|
3020
2997
|
direction: 'vertical' | 'horizontal';
|
|
3021
2998
|
constructor(properties?: Partial<ScrollBarProperties>, children?: Node[]);
|
|
3022
|
-
protected _updateStyleProperty(key:
|
|
2999
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3023
3000
|
protected _rect(): {
|
|
3024
3001
|
left: number;
|
|
3025
3002
|
top: number;
|
|
@@ -3066,7 +3043,7 @@ declare class Scaler extends Node {
|
|
|
3066
3043
|
maxValue: number;
|
|
3067
3044
|
get target(): Element2D | undefined;
|
|
3068
3045
|
constructor(properties?: Partial<ScalerProperties>, children?: Node[]);
|
|
3069
|
-
protected _updateProperty(key:
|
|
3046
|
+
protected _updateProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3070
3047
|
protected _updateScale(): void;
|
|
3071
3048
|
protected _onWheel(e: WheelInputEvent): void;
|
|
3072
3049
|
protected _input(event: InputEvent, key: InputEventKey): void;
|
|
@@ -3186,7 +3163,7 @@ declare class CanvasItemEditor extends Control {
|
|
|
3186
3163
|
drawboard: Element2D;
|
|
3187
3164
|
ruler: Ruler;
|
|
3188
3165
|
constructor();
|
|
3189
|
-
protected _updateStyleProperty(key:
|
|
3166
|
+
protected _updateStyleProperty(key: string, value: any, oldValue: any, declaration?: PropertyDeclaration): void;
|
|
3190
3167
|
protected _guiInput(event: InputEvent, key: InputEventKey): void;
|
|
3191
3168
|
protected _onPointerdown(e: PointerInputEvent): void;
|
|
3192
3169
|
protected _onPointermove(e: PointerInputEvent): void;
|
|
@@ -3269,5 +3246,5 @@ interface RenderOptions {
|
|
|
3269
3246
|
}
|
|
3270
3247
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3271
3248
|
|
|
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 };
|
|
3249
|
+
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 };
|
|
3250
|
+
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 };
|