modern-canvas 0.12.7 → 0.12.9
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 +65 -28
- package/dist/index.d.cts +22 -12
- package/dist/index.d.mts +22 -12
- package/dist/index.d.ts +22 -12
- package/dist/index.js +22 -22
- package/dist/index.mjs +65 -28
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6383,38 +6383,38 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6383
6383
|
this.setProperties(properties).append(nodes);
|
|
6384
6384
|
}
|
|
6385
6385
|
/** Timeline */
|
|
6386
|
-
computedDuration = 0;
|
|
6387
6386
|
_currentTime = 0;
|
|
6388
|
-
|
|
6387
|
+
_duration = 0;
|
|
6388
|
+
_globalStartTime = 0;
|
|
6389
6389
|
get timeline() {
|
|
6390
6390
|
return this._tree?.timeline;
|
|
6391
6391
|
}
|
|
6392
|
-
get
|
|
6392
|
+
get globalCurrentTime() {
|
|
6393
6393
|
return this.timeline?.currentTime ?? 0;
|
|
6394
6394
|
}
|
|
6395
|
-
get
|
|
6396
|
-
return this._parent?.
|
|
6395
|
+
get parentGlobalStartTime() {
|
|
6396
|
+
return this._parent?.globalStartTime ?? 0;
|
|
6397
6397
|
}
|
|
6398
6398
|
get currentTime() {
|
|
6399
|
-
return clamp(this._currentTime, 0, this.
|
|
6399
|
+
return clamp(this._currentTime, 0, this._duration);
|
|
6400
6400
|
}
|
|
6401
|
-
get
|
|
6402
|
-
return this.
|
|
6401
|
+
get globalStartTime() {
|
|
6402
|
+
return this._globalStartTime;
|
|
6403
6403
|
}
|
|
6404
|
-
set
|
|
6405
|
-
this.delay = val - this.
|
|
6404
|
+
set globalStartTime(val) {
|
|
6405
|
+
this.delay = val - this.parentGlobalStartTime;
|
|
6406
6406
|
this._updateCurrentTime(true);
|
|
6407
6407
|
}
|
|
6408
|
-
get
|
|
6409
|
-
return this.
|
|
6408
|
+
get globalEndTime() {
|
|
6409
|
+
return this._globalStartTime + this._duration;
|
|
6410
6410
|
}
|
|
6411
6411
|
get currentTimeProgress() {
|
|
6412
|
-
return this.
|
|
6412
|
+
return this._duration ? clamp(this._currentTime / this._duration, 0, 1) : 0;
|
|
6413
6413
|
}
|
|
6414
6414
|
isInsideTimeRange() {
|
|
6415
6415
|
const current = this._currentTime;
|
|
6416
|
-
if (this.
|
|
6417
|
-
return current >= 0 && current <= this.
|
|
6416
|
+
if (this._duration) {
|
|
6417
|
+
return current >= 0 && current <= this._duration;
|
|
6418
6418
|
} else {
|
|
6419
6419
|
return current >= 0;
|
|
6420
6420
|
}
|
|
@@ -6422,15 +6422,15 @@ exports.TimelineNode = class TimelineNode extends exports.Node {
|
|
|
6422
6422
|
_updateCurrentTime(force = false) {
|
|
6423
6423
|
if (force || !this.paused) {
|
|
6424
6424
|
const parent = this._parent;
|
|
6425
|
-
const
|
|
6426
|
-
const
|
|
6427
|
-
let currentTime = this.
|
|
6425
|
+
const globalStartTime = this.parentGlobalStartTime + this.delay;
|
|
6426
|
+
const duration = parent?._duration ? Math.min(globalStartTime + this.duration, parent.globalEndTime) - globalStartTime : this.duration;
|
|
6427
|
+
let currentTime = this.globalCurrentTime - globalStartTime;
|
|
6428
6428
|
if (this.loop) {
|
|
6429
|
-
currentTime = currentTime %
|
|
6429
|
+
currentTime = currentTime % duration;
|
|
6430
6430
|
}
|
|
6431
|
-
this.
|
|
6431
|
+
this._globalStartTime = globalStartTime;
|
|
6432
6432
|
this._currentTime = currentTime;
|
|
6433
|
-
this.
|
|
6433
|
+
this._duration = duration;
|
|
6434
6434
|
this.emit("updateCurrentTime", this._currentTime);
|
|
6435
6435
|
this.insideTimeRange = this.isInsideTimeRange();
|
|
6436
6436
|
}
|
|
@@ -7152,7 +7152,9 @@ exports.Timeline = class Timeline extends exports.Node {
|
|
|
7152
7152
|
}
|
|
7153
7153
|
_process(delta) {
|
|
7154
7154
|
super._process(delta);
|
|
7155
|
-
this.
|
|
7155
|
+
if (!this.paused) {
|
|
7156
|
+
this.addTime(delta);
|
|
7157
|
+
}
|
|
7156
7158
|
}
|
|
7157
7159
|
};
|
|
7158
7160
|
__decorateClass$H([
|
|
@@ -7167,6 +7169,9 @@ __decorateClass$H([
|
|
|
7167
7169
|
__decorateClass$H([
|
|
7168
7170
|
modernIdoc.property({ fallback: false })
|
|
7169
7171
|
], exports.Timeline.prototype, "loop", 2);
|
|
7172
|
+
__decorateClass$H([
|
|
7173
|
+
modernIdoc.property({ fallback: false })
|
|
7174
|
+
], exports.Timeline.prototype, "paused", 2);
|
|
7170
7175
|
exports.Timeline = __decorateClass$H([
|
|
7171
7176
|
customNode("Timeline")
|
|
7172
7177
|
], exports.Timeline);
|
|
@@ -11894,9 +11899,9 @@ exports.Animation = class Animation extends exports.TimelineNode {
|
|
|
11894
11899
|
play() {
|
|
11895
11900
|
if (this._stoped) {
|
|
11896
11901
|
this._stoped = false;
|
|
11897
|
-
this.
|
|
11902
|
+
this.globalStartTime = this.globalCurrentTime;
|
|
11898
11903
|
} else {
|
|
11899
|
-
this.
|
|
11904
|
+
this.globalStartTime = this.globalCurrentTime - this.currentTime;
|
|
11900
11905
|
}
|
|
11901
11906
|
this.paused = false;
|
|
11902
11907
|
return true;
|
|
@@ -13718,7 +13723,7 @@ async function parseMimeType(url) {
|
|
|
13718
13723
|
}
|
|
13719
13724
|
|
|
13720
13725
|
const SUPPORTS_WEAK_REF = "WeakRef" in globalThis;
|
|
13721
|
-
class Assets {
|
|
13726
|
+
class Assets extends modernIdoc.Observable {
|
|
13722
13727
|
defaultHandler = (url) => this.fetch(url);
|
|
13723
13728
|
_handlers = /* @__PURE__ */ new Map();
|
|
13724
13729
|
_handleing = /* @__PURE__ */ new Map();
|
|
@@ -13731,6 +13736,7 @@ class Assets {
|
|
|
13731
13736
|
this._handled.delete(id);
|
|
13732
13737
|
}) : void 0;
|
|
13733
13738
|
constructor() {
|
|
13739
|
+
super();
|
|
13734
13740
|
if (!SUPPORTS_WEAK_REF) {
|
|
13735
13741
|
Ticker.on(this.gc.bind(this), { sort: 2 });
|
|
13736
13742
|
}
|
|
@@ -13820,6 +13826,7 @@ class Assets {
|
|
|
13820
13826
|
return result;
|
|
13821
13827
|
const promise = handler().then((result2) => {
|
|
13822
13828
|
this.set(id, result2);
|
|
13829
|
+
this.emit("loaded", id, result2);
|
|
13823
13830
|
return result2;
|
|
13824
13831
|
}).finally(() => {
|
|
13825
13832
|
this._handleing.delete(id);
|
|
@@ -14088,7 +14095,16 @@ async function start(sleep = 100) {
|
|
|
14088
14095
|
starting = false;
|
|
14089
14096
|
}
|
|
14090
14097
|
async function task(options) {
|
|
14091
|
-
const {
|
|
14098
|
+
const {
|
|
14099
|
+
debug = false,
|
|
14100
|
+
fonts,
|
|
14101
|
+
width,
|
|
14102
|
+
height,
|
|
14103
|
+
data,
|
|
14104
|
+
keyframes = [],
|
|
14105
|
+
onBefore,
|
|
14106
|
+
onFrame
|
|
14107
|
+
} = options;
|
|
14092
14108
|
engine ??= new Engine({
|
|
14093
14109
|
pixelRatio: 1,
|
|
14094
14110
|
width: 1,
|
|
@@ -14097,8 +14113,8 @@ async function task(options) {
|
|
|
14097
14113
|
});
|
|
14098
14114
|
engine.debug = debug;
|
|
14099
14115
|
engine.fonts = fonts;
|
|
14116
|
+
engine.timeline.currentTime = 0;
|
|
14100
14117
|
engine.root.removeChildren();
|
|
14101
|
-
engine.timeline.currentTime = time;
|
|
14102
14118
|
engine.resize(width, height, true);
|
|
14103
14119
|
(Array.isArray(data) ? data : [data]).forEach((v) => {
|
|
14104
14120
|
if (v instanceof exports.Node) {
|
|
@@ -14108,8 +14124,29 @@ async function task(options) {
|
|
|
14108
14124
|
engine.root.appendChild(exports.Node.parse(v));
|
|
14109
14125
|
}
|
|
14110
14126
|
});
|
|
14111
|
-
await
|
|
14127
|
+
await onBefore?.(engine);
|
|
14112
14128
|
await engine.waitAndRender();
|
|
14129
|
+
await new Promise((resolve) => {
|
|
14130
|
+
let i = 0;
|
|
14131
|
+
const len = keyframes.length;
|
|
14132
|
+
const last = keyframes[len - 1];
|
|
14133
|
+
async function handle() {
|
|
14134
|
+
if (i === len)
|
|
14135
|
+
return resolve();
|
|
14136
|
+
const currentTime = keyframes[i++];
|
|
14137
|
+
const next = keyframes[i] || currentTime;
|
|
14138
|
+
const duration = next - currentTime;
|
|
14139
|
+
engine.timeline.currentTime = currentTime;
|
|
14140
|
+
engine.render();
|
|
14141
|
+
await onFrame?.(engine.toPixels(), {
|
|
14142
|
+
currentTime,
|
|
14143
|
+
duration,
|
|
14144
|
+
progress: currentTime / last
|
|
14145
|
+
});
|
|
14146
|
+
requestAnimationFrame(handle);
|
|
14147
|
+
}
|
|
14148
|
+
handle();
|
|
14149
|
+
});
|
|
14113
14150
|
return engine.toCanvas2D();
|
|
14114
14151
|
}
|
|
14115
14152
|
async function render(options) {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Font, Fonts } from 'modern-font';
|
|
2
1
|
import { ObservableEvents, Observable, ReactivableEvents, Reactivable, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, Hex8Color, PropertyDeclaration, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, FullStyle, Text as Text$1, TextContent, Style, ImageFillCropRect } from 'modern-idoc';
|
|
3
2
|
export { Color as ColorValue } from 'modern-idoc';
|
|
3
|
+
import { Font, Fonts } from 'modern-font';
|
|
4
4
|
import { AnimationItem } from 'lottie-web';
|
|
5
5
|
import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
|
|
6
6
|
import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
|
|
@@ -1554,6 +1554,7 @@ interface TimelineProperties extends NodeProperties {
|
|
|
1554
1554
|
currentTime: number;
|
|
1555
1555
|
endTime: number;
|
|
1556
1556
|
loop: boolean;
|
|
1557
|
+
paused: boolean;
|
|
1557
1558
|
}
|
|
1558
1559
|
interface Timeline {
|
|
1559
1560
|
on: <K extends keyof TimelineEvents & string>(event: K, listener: (...args: TimelineEvents[K]) => void) => this;
|
|
@@ -1566,6 +1567,7 @@ declare class Timeline extends Node {
|
|
|
1566
1567
|
currentTime: number;
|
|
1567
1568
|
endTime: number;
|
|
1568
1569
|
loop: boolean;
|
|
1570
|
+
paused: boolean;
|
|
1569
1571
|
static from(range: number | number[], loop?: boolean): Timeline;
|
|
1570
1572
|
constructor(properties?: Partial<TimelineProperties>);
|
|
1571
1573
|
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
@@ -1796,16 +1798,16 @@ declare class TimelineNode extends Node {
|
|
|
1796
1798
|
insideTimeRange: boolean;
|
|
1797
1799
|
constructor(properties?: Partial<TimelineNodeProperties>, nodes?: Node[]);
|
|
1798
1800
|
/** Timeline */
|
|
1799
|
-
computedDuration: number;
|
|
1800
1801
|
_currentTime: number;
|
|
1801
|
-
|
|
1802
|
+
_duration: number;
|
|
1803
|
+
_globalStartTime: number;
|
|
1802
1804
|
get timeline(): Timeline | undefined;
|
|
1803
|
-
get
|
|
1804
|
-
get
|
|
1805
|
+
get globalCurrentTime(): number;
|
|
1806
|
+
get parentGlobalStartTime(): number;
|
|
1805
1807
|
get currentTime(): number;
|
|
1806
|
-
get
|
|
1807
|
-
set
|
|
1808
|
-
get
|
|
1808
|
+
get globalStartTime(): number;
|
|
1809
|
+
set globalStartTime(val: number);
|
|
1810
|
+
get globalEndTime(): number;
|
|
1809
1811
|
get currentTimeProgress(): number;
|
|
1810
1812
|
isInsideTimeRange(): boolean;
|
|
1811
1813
|
protected _updateCurrentTime(force?: boolean): void;
|
|
@@ -3150,6 +3152,9 @@ declare class VideoLoader extends Loader {
|
|
|
3150
3152
|
}
|
|
3151
3153
|
|
|
3152
3154
|
type AssetHandler = (url: string, options?: any) => any | Promise<any>;
|
|
3155
|
+
interface AssetsEvents extends ObservableEvents {
|
|
3156
|
+
loaded: [id: string, value: any];
|
|
3157
|
+
}
|
|
3153
3158
|
interface Assets {
|
|
3154
3159
|
font: FontLoader;
|
|
3155
3160
|
gif: GifLoader;
|
|
@@ -3159,7 +3164,7 @@ interface Assets {
|
|
|
3159
3164
|
texture: TextureLoader;
|
|
3160
3165
|
video: VideoLoader;
|
|
3161
3166
|
}
|
|
3162
|
-
declare class Assets {
|
|
3167
|
+
declare class Assets extends Observable<AssetsEvents> {
|
|
3163
3168
|
defaultHandler: AssetHandler;
|
|
3164
3169
|
protected _handlers: Map<string, AssetHandler>;
|
|
3165
3170
|
protected _handleing: Map<string, Promise<any>>;
|
|
@@ -3251,11 +3256,16 @@ interface RenderOptions {
|
|
|
3251
3256
|
width: number;
|
|
3252
3257
|
height: number;
|
|
3253
3258
|
debug?: boolean;
|
|
3254
|
-
time?: number;
|
|
3255
3259
|
fonts?: Fonts;
|
|
3256
|
-
|
|
3260
|
+
keyframes?: number[];
|
|
3261
|
+
onBefore?: (engine: Engine) => void | Promise<void>;
|
|
3262
|
+
onFrame?: (frame: Uint8ClampedArray, ctx: {
|
|
3263
|
+
currentTime: number;
|
|
3264
|
+
duration: number;
|
|
3265
|
+
progress: number;
|
|
3266
|
+
}) => Promise<void>;
|
|
3257
3267
|
}
|
|
3258
3268
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3259
3269
|
|
|
3260
3270
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, 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, SceneTree, 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, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3261
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|
|
3271
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AssetsEvents, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Font, Fonts } from 'modern-font';
|
|
2
1
|
import { ObservableEvents, Observable, ReactivableEvents, Reactivable, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, Hex8Color, PropertyDeclaration, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, FullStyle, Text as Text$1, TextContent, Style, ImageFillCropRect } from 'modern-idoc';
|
|
3
2
|
export { Color as ColorValue } from 'modern-idoc';
|
|
3
|
+
import { Font, Fonts } from 'modern-font';
|
|
4
4
|
import { AnimationItem } from 'lottie-web';
|
|
5
5
|
import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
|
|
6
6
|
import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
|
|
@@ -1554,6 +1554,7 @@ interface TimelineProperties extends NodeProperties {
|
|
|
1554
1554
|
currentTime: number;
|
|
1555
1555
|
endTime: number;
|
|
1556
1556
|
loop: boolean;
|
|
1557
|
+
paused: boolean;
|
|
1557
1558
|
}
|
|
1558
1559
|
interface Timeline {
|
|
1559
1560
|
on: <K extends keyof TimelineEvents & string>(event: K, listener: (...args: TimelineEvents[K]) => void) => this;
|
|
@@ -1566,6 +1567,7 @@ declare class Timeline extends Node {
|
|
|
1566
1567
|
currentTime: number;
|
|
1567
1568
|
endTime: number;
|
|
1568
1569
|
loop: boolean;
|
|
1570
|
+
paused: boolean;
|
|
1569
1571
|
static from(range: number | number[], loop?: boolean): Timeline;
|
|
1570
1572
|
constructor(properties?: Partial<TimelineProperties>);
|
|
1571
1573
|
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
@@ -1796,16 +1798,16 @@ declare class TimelineNode extends Node {
|
|
|
1796
1798
|
insideTimeRange: boolean;
|
|
1797
1799
|
constructor(properties?: Partial<TimelineNodeProperties>, nodes?: Node[]);
|
|
1798
1800
|
/** Timeline */
|
|
1799
|
-
computedDuration: number;
|
|
1800
1801
|
_currentTime: number;
|
|
1801
|
-
|
|
1802
|
+
_duration: number;
|
|
1803
|
+
_globalStartTime: number;
|
|
1802
1804
|
get timeline(): Timeline | undefined;
|
|
1803
|
-
get
|
|
1804
|
-
get
|
|
1805
|
+
get globalCurrentTime(): number;
|
|
1806
|
+
get parentGlobalStartTime(): number;
|
|
1805
1807
|
get currentTime(): number;
|
|
1806
|
-
get
|
|
1807
|
-
set
|
|
1808
|
-
get
|
|
1808
|
+
get globalStartTime(): number;
|
|
1809
|
+
set globalStartTime(val: number);
|
|
1810
|
+
get globalEndTime(): number;
|
|
1809
1811
|
get currentTimeProgress(): number;
|
|
1810
1812
|
isInsideTimeRange(): boolean;
|
|
1811
1813
|
protected _updateCurrentTime(force?: boolean): void;
|
|
@@ -3150,6 +3152,9 @@ declare class VideoLoader extends Loader {
|
|
|
3150
3152
|
}
|
|
3151
3153
|
|
|
3152
3154
|
type AssetHandler = (url: string, options?: any) => any | Promise<any>;
|
|
3155
|
+
interface AssetsEvents extends ObservableEvents {
|
|
3156
|
+
loaded: [id: string, value: any];
|
|
3157
|
+
}
|
|
3153
3158
|
interface Assets {
|
|
3154
3159
|
font: FontLoader;
|
|
3155
3160
|
gif: GifLoader;
|
|
@@ -3159,7 +3164,7 @@ interface Assets {
|
|
|
3159
3164
|
texture: TextureLoader;
|
|
3160
3165
|
video: VideoLoader;
|
|
3161
3166
|
}
|
|
3162
|
-
declare class Assets {
|
|
3167
|
+
declare class Assets extends Observable<AssetsEvents> {
|
|
3163
3168
|
defaultHandler: AssetHandler;
|
|
3164
3169
|
protected _handlers: Map<string, AssetHandler>;
|
|
3165
3170
|
protected _handleing: Map<string, Promise<any>>;
|
|
@@ -3251,11 +3256,16 @@ interface RenderOptions {
|
|
|
3251
3256
|
width: number;
|
|
3252
3257
|
height: number;
|
|
3253
3258
|
debug?: boolean;
|
|
3254
|
-
time?: number;
|
|
3255
3259
|
fonts?: Fonts;
|
|
3256
|
-
|
|
3260
|
+
keyframes?: number[];
|
|
3261
|
+
onBefore?: (engine: Engine) => void | Promise<void>;
|
|
3262
|
+
onFrame?: (frame: Uint8ClampedArray, ctx: {
|
|
3263
|
+
currentTime: number;
|
|
3264
|
+
duration: number;
|
|
3265
|
+
progress: number;
|
|
3266
|
+
}) => Promise<void>;
|
|
3257
3267
|
}
|
|
3258
3268
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3259
3269
|
|
|
3260
3270
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, 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, SceneTree, 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, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3261
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|
|
3271
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AssetsEvents, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Font, Fonts } from 'modern-font';
|
|
2
1
|
import { ObservableEvents, Observable, ReactivableEvents, Reactivable, Color as Color$1, RawWeakMap as RawWeakMap$1, LinearGradient, RadialGradient, Hex8Color, PropertyDeclaration, NormalizedFill, Fill, NormalizedBackground, Background, NormalizedForeground, Foreground, NormalizedOutline, Outline, NormalizedShadow, Shadow, NormalizedShape, Shape, FullStyle, Text as Text$1, TextContent, Style, ImageFillCropRect } from 'modern-idoc';
|
|
3
2
|
export { Color as ColorValue } from 'modern-idoc';
|
|
3
|
+
import { Font, Fonts } from 'modern-font';
|
|
4
4
|
import { AnimationItem } from 'lottie-web';
|
|
5
5
|
import { Colord, RgbaColor, HslaColor, HsvaColor } from 'colord';
|
|
6
6
|
import { Path2D, LineCap, LineJoin, LineStyle, Path2DSet } from 'modern-path2d';
|
|
@@ -1554,6 +1554,7 @@ interface TimelineProperties extends NodeProperties {
|
|
|
1554
1554
|
currentTime: number;
|
|
1555
1555
|
endTime: number;
|
|
1556
1556
|
loop: boolean;
|
|
1557
|
+
paused: boolean;
|
|
1557
1558
|
}
|
|
1558
1559
|
interface Timeline {
|
|
1559
1560
|
on: <K extends keyof TimelineEvents & string>(event: K, listener: (...args: TimelineEvents[K]) => void) => this;
|
|
@@ -1566,6 +1567,7 @@ declare class Timeline extends Node {
|
|
|
1566
1567
|
currentTime: number;
|
|
1567
1568
|
endTime: number;
|
|
1568
1569
|
loop: boolean;
|
|
1570
|
+
paused: boolean;
|
|
1569
1571
|
static from(range: number | number[], loop?: boolean): Timeline;
|
|
1570
1572
|
constructor(properties?: Partial<TimelineProperties>);
|
|
1571
1573
|
protected _updateProperty(key: string, value: any, oldValue: any): void;
|
|
@@ -1796,16 +1798,16 @@ declare class TimelineNode extends Node {
|
|
|
1796
1798
|
insideTimeRange: boolean;
|
|
1797
1799
|
constructor(properties?: Partial<TimelineNodeProperties>, nodes?: Node[]);
|
|
1798
1800
|
/** Timeline */
|
|
1799
|
-
computedDuration: number;
|
|
1800
1801
|
_currentTime: number;
|
|
1801
|
-
|
|
1802
|
+
_duration: number;
|
|
1803
|
+
_globalStartTime: number;
|
|
1802
1804
|
get timeline(): Timeline | undefined;
|
|
1803
|
-
get
|
|
1804
|
-
get
|
|
1805
|
+
get globalCurrentTime(): number;
|
|
1806
|
+
get parentGlobalStartTime(): number;
|
|
1805
1807
|
get currentTime(): number;
|
|
1806
|
-
get
|
|
1807
|
-
set
|
|
1808
|
-
get
|
|
1808
|
+
get globalStartTime(): number;
|
|
1809
|
+
set globalStartTime(val: number);
|
|
1810
|
+
get globalEndTime(): number;
|
|
1809
1811
|
get currentTimeProgress(): number;
|
|
1810
1812
|
isInsideTimeRange(): boolean;
|
|
1811
1813
|
protected _updateCurrentTime(force?: boolean): void;
|
|
@@ -3150,6 +3152,9 @@ declare class VideoLoader extends Loader {
|
|
|
3150
3152
|
}
|
|
3151
3153
|
|
|
3152
3154
|
type AssetHandler = (url: string, options?: any) => any | Promise<any>;
|
|
3155
|
+
interface AssetsEvents extends ObservableEvents {
|
|
3156
|
+
loaded: [id: string, value: any];
|
|
3157
|
+
}
|
|
3153
3158
|
interface Assets {
|
|
3154
3159
|
font: FontLoader;
|
|
3155
3160
|
gif: GifLoader;
|
|
@@ -3159,7 +3164,7 @@ interface Assets {
|
|
|
3159
3164
|
texture: TextureLoader;
|
|
3160
3165
|
video: VideoLoader;
|
|
3161
3166
|
}
|
|
3162
|
-
declare class Assets {
|
|
3167
|
+
declare class Assets extends Observable<AssetsEvents> {
|
|
3163
3168
|
defaultHandler: AssetHandler;
|
|
3164
3169
|
protected _handlers: Map<string, AssetHandler>;
|
|
3165
3170
|
protected _handleing: Map<string, Promise<any>>;
|
|
@@ -3251,11 +3256,16 @@ interface RenderOptions {
|
|
|
3251
3256
|
width: number;
|
|
3252
3257
|
height: number;
|
|
3253
3258
|
debug?: boolean;
|
|
3254
|
-
time?: number;
|
|
3255
3259
|
fonts?: Fonts;
|
|
3256
|
-
|
|
3260
|
+
keyframes?: number[];
|
|
3261
|
+
onBefore?: (engine: Engine) => void | Promise<void>;
|
|
3262
|
+
onFrame?: (frame: Uint8ClampedArray, ctx: {
|
|
3263
|
+
currentTime: number;
|
|
3264
|
+
duration: number;
|
|
3265
|
+
progress: number;
|
|
3266
|
+
}) => Promise<void>;
|
|
3257
3267
|
}
|
|
3258
3268
|
declare function render(options: RenderOptions): Promise<HTMLCanvasElement>;
|
|
3259
3269
|
|
|
3260
3270
|
export { AnimatedTexture, Animation, Assets, Audio, AudioPipeline, AudioProcessor, AudioSpectrum, AudioWaveform, BaseElement2D, BaseElement2DBackground, BaseElement2DFill, BaseElement2DForeground, BaseElement2DOutline, BaseElement2DShadow, BaseElement2DShape, BaseElement2DStyle, BaseElement2DText, Camera2D, CanvasContext, CanvasItem, CanvasTexture, Color, ColorAdjustEffect, ColorFilterEffect, ColorMatrix, ColorOverlayEffect, ColorRemoveEffect, ColorReplaceEffect, ColorTexture, CoreObject, DEG_TO_RAD, DEVICE_PIXEL_RATIO, DrawboardEffect, DropShadowEffect, Effect, EffectMaterial, Element2D, Element2DStyle, EmbossEffect, Engine, FlexElement2D, FlexElement2DStyle, FlexLayout, FontLoader, GaussianBlurEffect, Geometry, GifLoader, GlitchEffect, GodrayEffect, GradientTexture, HTMLAudio, HTMLAudioContext, HTMLSound, IN_BROWSER, Image2D, ImageTexture, IndexBuffer, Input, InputEvent, JsonLoader, KawaseBlurEffect, KawaseTransition, KeyboardInputEvent, LeftEraseTransition, Loader, Lottie2D, LottieLoader, MainLoop, MaskEffect, Material, Matrix, Matrix2, Matrix3, Matrix4, Meta, MouseInputEvent, Node, Node2D, OutlineEffect, PI, PI_2, PixelateEffect, PixelsTexture, PointerInputEvent, Projection2D, QuadGeometry, QuadUvGeometry, RAD_TO_DEG, RawWeakMap, Rect2, RefCounted, Renderer, Resource, 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, SceneTree, 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, Window, ZoomBlurEffect, alignMap, assets, boxSizingMap, clamp, clampFrag, createHTMLCanvas, createNode, crossOrigin, cubicBezier, curves, customNode, customNodes, defaultOptions, determineCrossOrigin, directionMap, displayMap, ease, easeIn, easeInOut, easeOut, edgeMap, flexDirectionMap, flexWrapMap, frag, getDefaultCssPropertyValue, gutterMap, isCanvasElement, isElementNode, isImageElement, isPow2, isVideoElement, isWebgl2, justifyMap, lerp, linear, log2, mapWebGLBlendModes, nextPow2, nextTick, overflowMap, parseCSSFilter, parseCSSTransform, parseCSSTransformOrigin, parseCssFunctions, parseCssProperty, positionTypeMap, render, timingFunctions, uid };
|
|
3261
|
-
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|
|
3271
|
+
export type { AnimationEffectMode, AnimationProperties, AssetHandler, AssetsEvents, AudioWaveformProperties, BaseElement2DEvents, BaseElement2DProperties, BaseElement2DStyleProperties, Batchable2D, CSSFilterKey, CSSFilters, Camera2DEvents, Camera2DProperties, CanvasBatchable, CanvasItemEvents, CanvasItemProperties, ColorAdjustEffectProperties, ColorFilterEffectProperties, ColorOverlayEffectProperties, ColorRemoveEffectProperties, ColorReplaceEffectProperties, ComputedLayout, CoreObjectEvents, CssFunction, CssFunctionArg, Cursor, DrawboardEffectProperties, DropShadowEffectProperties, Easing, EffectContext, EffectMode, EffectProperties, Element2DEvents, Element2DProperties, Element2DStyleProperties, EmbossEffectProperties, EngineProperties, FillDraw, FlexBaseElement2DEvents, FlexElement2DProperties, FlexElement2DStyleProperties, GaussianBlurEffectProperties, GeometryOptions, GlitchEffectProperties, GodrayEffectProperties, IAudioContext, IAudioNode, IPlayOptions, Image2DProperties, ImageFrame, ImageTextureOptions, IndexBufferOptions, InputEventKey, InputEvents, InputMode, InternalMode, KawaseBlurEffectProperties, Keyframe, Lottie2DProperties, MainLoopEvents, MainLoopProperties, MaskColor, MaskData, MaskEffectProperties, MaskObject, MaskRect, Maskable, MaterialOptions, MatrixLike, MatrixOperateOutput, Node2DEvents, Node2DProperties, NodeEvents, NodeProperties, NormalizedKeyframe, OutlineEffectProperties, PixelateEffectProperties, PlatformAudio, PlatformSound, ProcessMode, ProcessSortMode, Rectangulable, RectangulableEvents, RefCountedEvents, RenderMode, RenderOptions, Renderable, ResourceEvents, SceneTreeEvents, SceneTreeProperties, StrokeDraw, TextDrawMode, Texture2DFilterMode, Texture2DPixelsSource, Texture2DSource, Texture2DWrapMode, TextureRect2DProperties, TimelineEvents, TimelineNodeEvents, TimelineNodeProperties, TimelineProperties, TimingFunctions, TransformObject, TransformRect2DProperties, TransformableObject, TransitionProperties, Vector2Data, VectorLike, VectorOperateOutput, VertexAttributeOptions, VertexBufferOptions, Video2DProperties, VideoTextureOptions, VideoTextureSource, ViewportEvents, 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, ZoomBlurEffectProperties };
|