@leafer/interface
Advanced tools
| import { ILeaferImage, ILeaferImageConfig } from './ILeaferImage' | ||
| import { ILeaf } from '../display/ILeaf' | ||
| import { IPointData, IOptionPointData } from '../math/IMath' | ||
| import { ICanvasContext2D } from '../canvas/ICanvas' | ||
| export interface ILeaferFilmConfig extends ILeaferImageConfig { | ||
| } | ||
| export interface ILeaferFilm extends ILeaferImage { | ||
| } | ||
| export interface IFilmDecoder { | ||
| width: number | ||
| height: number | ||
| total: number | ||
| loop: number | ||
| frames: IFilmFrame[] | ||
| atlas?: any // 合并图 | ||
| atlasContext?: any // 合并图的上下文手柄 | ||
| atlasGrid?: IPointData | ||
| decoder: any | ||
| bufferCanvas?: any // 缓冲图 | ||
| bufferContext?: ICanvasContext2D | ||
| createAtlas(): void | ||
| decodeHeader(data: ArrayBuffer, type: string): Promise<void> | ||
| decodeFrame(frameIndex: number): Promise<IFilmFrame> | ||
| decodeOneFrame(frameIndex: number): Promise<IFilmFrame> | ||
| mergeFrame(frameIndex: number, destoryFrameImage: boolean): void | ||
| render(canvas: any, x: number, y: number, width: number, height: number, leaf: ILeaf, paint: any, imageScaleX: number, imageScaleY: number): void | ||
| destoryFrame(frameIndex: number, deleteIndex: boolean): void | ||
| destoryFrameImage(frame: IFilmFrame): void | ||
| destroyDecoder(): void | ||
| close(): void | ||
| } | ||
| export interface IFilmFrame extends IOptionPointData { | ||
| image?: any // 不存在时使用合并图 | ||
| duration: number // 毫秒 | ||
| decoding?: boolean // 正在解码中 | ||
| } | ||
| export interface IFilmOptions { | ||
| nowIndex?: number | ||
| pauseIndex?: number // 播放到这一帧暂停 | ||
| loop?: number | ||
| speed?: number | ||
| autoplay?: boolean | ||
| } | ||
| export interface IFilmPlayOptions extends IFilmOptions { | ||
| frameTime?: number | ||
| frameTimer?: any // 下一帧的timer | ||
| paused?: boolean | ||
| } |
| import { ILeaferImage, ILeaferImageConfig } from './ILeaferImage' | ||
| export interface ILeaferVideoConfig extends ILeaferImageConfig { | ||
| } | ||
| export interface ILeaferVideo extends ILeaferImage { | ||
| } |
+1
-1
| { | ||
| "name": "@leafer/interface", | ||
| "version": "2.0.1", | ||
| "version": "2.0.2", | ||
| "description": "@leafer/interface", | ||
@@ -5,0 +5,0 @@ "author": "Chao (Leafer) Wan", |
@@ -16,2 +16,4 @@ import { ILeaf, ICursorType, IAlign } from '../display/ILeaf' | ||
| import { ILeaferImage, ILeaferImageConfig } from '../image/ILeaferImage' | ||
| import { ILeaferFilm, ILeaferFilmConfig } from '../image/ILeaferFilm' | ||
| import { ILeaferVideo, ILeaferVideoConfig } from '../image/ILeaferVideo' | ||
| import { IControl } from '../control/IControl' | ||
@@ -83,4 +85,4 @@ import { IFunction } from '../function/IFunction' | ||
| unlockLayout(): void | ||
| lockLayout(): void | ||
| unlockLayout(updateLayout?: boolean): void | ||
| lockLayout(updateLayout?: boolean): void | ||
@@ -140,2 +142,4 @@ requestRender(change: boolean): void | ||
| image?(options?: ILeaferImageConfig): ILeaferImage | ||
| film?(options?: ILeaferFilmConfig): ILeaferFilm | ||
| video?(options?: ILeaferVideoConfig): ILeaferVideo | ||
| canvas?(options?: ILeaferCanvasConfig, manager?: ICanvasManager): ILeaferCanvas | ||
@@ -142,0 +146,0 @@ hitCanvas?(options?: IHitCanvasConfig, manager?: ICanvasManager): IHitCanvas |
@@ -18,2 +18,5 @@ import { ILeaf } from '../display/ILeaf' | ||
| readonly length: number | ||
| needUpdate?: boolean // 一般用于event更新path | ||
| has(leaf: ILeaf): boolean | ||
@@ -20,0 +23,0 @@ indexAt(index: number): ILeaf |
@@ -248,2 +248,3 @@ import { ILeaferBase } from '../app/ILeafer' | ||
| filter?: IFilter | IFilter[] | ||
| complex?: boolean | ||
@@ -357,2 +358,3 @@ // layout data | ||
| filter?: IFilter[] | ||
| complex?: boolean | ||
@@ -492,2 +494,3 @@ // layout data | ||
| skipJSON?: boolean // 跳过 JSON 导出 | ||
| syncEventer?: ILeaf // 同步触发一样事件的元素 | ||
@@ -702,2 +705,3 @@ lockNormalStyle?: boolean | ||
| __render(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
| __renderComplex(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
| __drawFast(canvas: ILeaferCanvas, options: IRenderOptions): void | ||
@@ -704,0 +708,0 @@ __draw(canvas: ILeaferCanvas, options: IRenderOptions, originCanvas?: ILeaferCanvas): void |
@@ -1,2 +0,32 @@ | ||
| export type IExportImageType = 'jpg' | 'png' | 'webp' | 'bmp' | ||
| export type IExportFileType = IExportImageType | 'svg' | 'pdf' | 'json' | ||
| export type IExportImageType = | ||
| | 'jpg' | ||
| | 'png' | ||
| | 'webp' | ||
| | 'bmp' | ||
| export type IExportFileType = | ||
| | 'svg' | ||
| | 'pdf' | ||
| | 'json' | ||
| | IExportImageType | ||
| export type IFilmFileType = | ||
| | 'gif' | ||
| | 'webp' | ||
| | 'png' // apng | ||
| | 'avif' | ||
| export type IVideoFileType = | ||
| | 'mp4' | ||
| | 'webm' | ||
| | 'ogv' // ogg | ||
| export type IMultimediaType = | ||
| | 'image' | ||
| | 'film' | ||
| | 'video' | ||
| export type IResponseType = | ||
| | 'text' | ||
| | 'json' | ||
| | 'arrayBuffer' |
| import { ITaskProcessor } from '../task/ITaskProcessor' | ||
| import { ILeaferImage } from '../image/ILeaferImage' | ||
| import { IExportFileType } from './IFileType' | ||
| import { IExportFileType, IFilmFileType, IVideoFileType } from './IFileType' | ||
| import { IObject } from '../data/IData' | ||
| import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| import { ILeaferFilm } from '../image/ILeaferFilm' | ||
| import { ILeaferVideo } from '../image/ILeaferVideo' | ||
@@ -10,3 +12,6 @@ | ||
| map: any, | ||
| tasker: ITaskProcessor | ||
| queue: ITaskProcessor | ||
| readonly isComplete: boolean | ||
@@ -21,3 +26,6 @@ | ||
| loadFilm(key: string, format?: IFilmFileType): Promise<ILeaferFilm> | ||
| loadVideo(key: string, format?: IVideoFileType): Promise<ILeaferVideo> | ||
| destroy(): void | ||
| } |
| import { ILeaferImage, ILeaferImageConfig } from './ILeaferImage' | ||
| import { ITaskProcessor } from '../task/ITaskProcessor' | ||
| import { IExportFileType } from '../file/IFileType' | ||
| import { IExportFileType, IMultimediaType } from '../file/IFileType' | ||
@@ -13,3 +13,3 @@ | ||
| get(config: ILeaferImageConfig): ILeaferImage | ||
| get(config: ILeaferImageConfig, type?: IMultimediaType): ILeaferImage | ||
| recycle(image: ILeaferImage): void | ||
@@ -16,0 +16,0 @@ |
@@ -10,3 +10,3 @@ import { ICanvasPattern } from '../canvas/ICanvas' | ||
| import { ITaskItem } from '../task/ITaskProcessor' | ||
| import { IRangeSize, IInterlace } from '../display/ILeaf' | ||
| import { IRangeSize, IInterlace, ILeaf } from '../display/ILeaf' | ||
| import { IFunction } from '../function/IFunction' | ||
@@ -124,2 +124,4 @@ | ||
| render(canvas: any, x: number, y: number, width: number, height: number, leaf: ILeaf, paint: any, imageScaleX: number, imageScaleY: number): void | ||
| getLoadUrl(thumbSize?: ISizeData): string | ||
@@ -126,0 +128,0 @@ setThumbView(view: number): void |
+4
-2
@@ -44,4 +44,6 @@ export { IAppBase } from './app/IApp' | ||
| export { ILeaferImage, ILeaferImageConfig, IImageLOD, IImageTileLOD, ILeaferImageSliceData, ILeaferImageSlice, ILeaferImageLevel, ILeaferImageOnLoaded, ILeaferImageOnError, ILeaferImageCacheCanvas, ILeaferImagePatternPaint } from './image/ILeaferImage' | ||
| export { ILeaferFilm, ILeaferFilmConfig, IFilmDecoder, IFilmFrame, IFilmOptions, IFilmPlayOptions } from './image/ILeaferFilm' | ||
| export { ILeaferVideo, ILeaferVideoConfig } from './image/ILeaferVideo' | ||
| export { IResource } from './file/IResource' | ||
| export { IExportFileType, IExportImageType } from './file/IFileType' | ||
| export { IExportFileType, IExportImageType, IFilmFileType, IVideoFileType, IMultimediaType, IResponseType } from './file/IFileType' | ||
| export { IExportOptions, IJSONOptions, IExportResult, IExportResultFunction, IExportOnCanvasFunction } from './file/IExport' | ||
@@ -60,5 +62,5 @@ | ||
| export { ILeafList, ILeafArrayMap, ILeafMap, ILeafLevelList, ILeafListItemCallback } from './data/IList' | ||
| export { IPoint, IPointData, IFromToData, IUnitPointData, IRotationPointData, IScrollPointData, IClientPointData, IRadiusPointData, ISize, ISizeData, IOptionSizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, IBoundsDataWithOptionRotation, ITwoPointBoundsData, IAutoBounds, IAutoBoxData, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithOptionScaleData, IMatrixWithOptionHalfData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath' | ||
| export { IPoint, IPointData, IOptionPointData, IFromToData, IUnitPointData, IRotationPointData, IScrollPointData, IClientPointData, IRadiusPointData, ISize, ISizeData, IOptionSizeData, IScreenSizeData, IBounds, IBoundsData, IBoundsDataFn, IOffsetBoundsData, IBoundsDataWithOptionRotation, ITwoPointBoundsData, IAutoBounds, IAutoBoxData, IAutoBoundsData, IMatrix, IMatrixData, IMatrixWithBoundsData, IMatrixWithScaleData, IMatrixWithOptionScaleData, IMatrixWithOptionHalfData, IMatrixWithBoundsScaleData, IMatrixWithLayoutData, IScaleRotationData, IScaleData, ISkewData, ILayoutBoundsData, ILayoutData, ILayoutAttr } from './math/IMath' | ||
| export { IFunction, IStringFunction, INumberFunction, IObjectFunction, IValueFunction, IPointDataFunction, IAttrDecorator } from './function/IFunction' | ||
| export { ITransition, IAnimateEasing, ICubicBezierEasing, IStepsEasing, IAnimateEasingFunction, IAnimateEasingName, IAnimateEnding, IAnimateEvents, IAnimateEventFunction, ICustomEasingFunction, IAnimateOptions } from './animate/ITransition' |
@@ -9,2 +9,7 @@ import { IFourNumber, IObject } from '../data/IData' | ||
| export interface IOptionPointData { | ||
| x?: number | ||
| y?: number | ||
| } | ||
| export interface IUnitPointData extends IPointData { | ||
@@ -11,0 +16,0 @@ type?: 'percent' | 'px' |
| import { IFunction, IStringFunction } from '../function/IFunction' | ||
| import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| import { IInterlace, ILeaf } from '../display/ILeaf' | ||
| import { IExportFileType, IExportImageType } from '../file/IFileType' | ||
| import { IExportFileType, IExportImageType, IResponseType } from '../file/IFileType' | ||
| import { IBoundsData, ISizeData, IMatrixData } from '../math/IMath' | ||
@@ -11,2 +11,4 @@ import { IObject } from '../data/IData' | ||
| import { ILeaferImage } from '../image/ILeaferImage' | ||
| import { ILeaferFilm } from '../image/ILeaferFilm' | ||
| import { ILeaferVideo } from '../image/ILeaferVideo' | ||
| import { ICanvasPattern } from '../canvas/ICanvas' | ||
@@ -49,2 +51,5 @@ | ||
| loadImage(url: string, crossOrigin?: IImageCrossOrigin, leaferImage?: ILeaferImage): Promise<any> | ||
| loadFilm?(url: string, crossOrigin?: IImageCrossOrigin, leaferFilm?: ILeaferFilm): Promise<any> | ||
| loadVideo?(url: string, crossOrigin?: IImageCrossOrigin, leaferVideo?: ILeaferVideo): Promise<any> | ||
| loadContent(url: string, responseType: IResponseType): Promise<any> | ||
| noRepeat?: string // fix: 微信小程序 createPattern 直接使用 no-repeat 有bug,导致无法显示 | ||
@@ -51,0 +56,0 @@ Image?: any |
@@ -69,4 +69,4 @@ import { ILeaferCanvas } from '../canvas/ILeaferCanvas' | ||
| addBlock(block: IBounds): void | ||
| addBlock(block: IBounds, leafList?: ILeafList): void | ||
| mergeBlocks(): void | ||
| } |
Sorry, the diff of this file is too big to display
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
226686
3.19%54
3.85%5807
3.05%