@predy-js/render-interface 0.1.76-beta.1 → 0.1.76-beta.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/statistic.js
CHANGED
@@ -2,6 +2,7 @@ import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapI
|
|
2
2
|
import type { TypedArray, vec2, vec4 } from '../type';
|
3
3
|
import type { GPUCapability } from '../GPUCapability';
|
4
4
|
import type { StringTemplate } from '@predy-js/specification';
|
5
|
+
import type { ImageBitmapInternal } from './ImageBitmapInternal';
|
5
6
|
export interface PredyRequestOptions {
|
6
7
|
url: string;
|
7
8
|
disableCache?: boolean;
|
@@ -19,20 +20,20 @@ export interface PredyRequestResponse {
|
|
19
20
|
time: number;
|
20
21
|
}
|
21
22
|
export type PredyRequestCallback = (err: string | undefined, res: PredyRequestResponse) => void;
|
22
|
-
export
|
23
|
-
|
23
|
+
export interface PredyNativeInternal {
|
24
|
+
webpDisabled?: boolean;
|
25
|
+
createImageBitmap(data: TypedArray | string, //图片文件的数据
|
24
26
|
options: ImageBitmapConstructor, callback: ImageBitmapCallback): void;
|
25
|
-
|
26
|
-
|
27
|
+
getDefaultGPUCapability(): GPUCapability;
|
28
|
+
requestWithCache(options: PredyRequestOptions, callback: PredyRequestCallback): void;
|
27
29
|
/**
|
28
30
|
* 将图片绘制到画布上,同时替换文案,绘制的顺序如下
|
29
31
|
* 创建template.size尺寸的画布, 接下来的绘制均应用 template.offset
|
30
32
|
* 将images绘制到画布上,images的尺寸由image.frame决定
|
31
33
|
* 将数据模板content绘制到画布上,使用variables替换文案
|
32
34
|
* @param template
|
33
|
-
* @param variables
|
34
35
|
*/
|
35
|
-
|
36
|
+
renderImageTemplate(template: PredyResizeTemplate): ImageBitmapInternal;
|
36
37
|
}
|
37
38
|
export interface PredyResizeTemplate {
|
38
39
|
/**
|
package/package.json
CHANGED
@@ -2,6 +2,7 @@ import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapI
|
|
2
2
|
import type { TypedArray, vec2, vec4 } from '../type';
|
3
3
|
import type { GPUCapability } from '../GPUCapability';
|
4
4
|
import type { StringTemplate } from '@predy-js/specification';
|
5
|
+
import type { ImageBitmapInternal } from './ImageBitmapInternal';
|
5
6
|
export interface PredyRequestOptions {
|
6
7
|
url: string,
|
7
8
|
//用于测试缓存,生产中不要使用
|
@@ -25,13 +26,14 @@ export interface PredyRequestResponse {
|
|
25
26
|
|
26
27
|
export type PredyRequestCallback = (err: string | undefined, res: PredyRequestResponse) => void;
|
27
28
|
|
28
|
-
export
|
29
|
-
|
30
|
-
|
29
|
+
export interface PredyNativeInternal {
|
30
|
+
webpDisabled?: boolean,
|
31
|
+
createImageBitmap (data: TypedArray | string, //图片文件的数据
|
32
|
+
options: ImageBitmapConstructor, callback: ImageBitmapCallback): void,
|
31
33
|
|
32
|
-
|
34
|
+
getDefaultGPUCapability (): GPUCapability,
|
33
35
|
|
34
|
-
|
36
|
+
requestWithCache (options: PredyRequestOptions, callback: PredyRequestCallback): void,
|
35
37
|
|
36
38
|
/**
|
37
39
|
* 将图片绘制到画布上,同时替换文案,绘制的顺序如下
|
@@ -39,9 +41,8 @@ export declare abstract class PredyNativeInternal {
|
|
39
41
|
* 将images绘制到画布上,images的尺寸由image.frame决定
|
40
42
|
* 将数据模板content绘制到画布上,使用variables替换文案
|
41
43
|
* @param template
|
42
|
-
* @param variables
|
43
44
|
*/
|
44
|
-
|
45
|
+
renderImageTemplate (template: PredyResizeTemplate): ImageBitmapInternal,
|
45
46
|
}
|
46
47
|
export interface PredyResizeTemplate {
|
47
48
|
/**
|