@predy-js/render-interface 0.1.65-beta.5 → 0.1.65-beta.6

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,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.1.65-beta.5
5
+ * Version: v0.1.65-beta.6
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -1,5 +1,6 @@
1
1
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
2
+ import type { TypedArray } from '../type';
2
3
  export declare abstract class PredyNativeInternal {
3
- abstract createImageBitmap(data: ArrayBuffer | string, //图片文件的数据
4
+ abstract createImageBitmap(data: TypedArray | string, //图片文件的数据
4
5
  options: ImageBitmapConstructor, callback: ImageBitmapCallback): void;
5
6
  }
@@ -11,6 +11,7 @@ import type { GPUCapability } from '../GPUCapability';
11
11
  import type { TextureInternal, TextureInternalConstructOptions } from './TextureInternal';
12
12
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
13
13
  import type { AndGLContext } from './AndGLContext';
14
+ import type { TypedArray } from '../type';
14
15
  /**
15
16
  * renderer 内部创建的对象,用来统计信息,排查资源泄漏的问题
16
17
  */
@@ -67,6 +68,6 @@ export declare abstract class RendererInternal implements ResourceInternal {
67
68
  */
68
69
  abstract getErrors(): string[];
69
70
  abstract resize(width: number, height: number): void;
70
- abstract createImageBitmap(data: ArrayBuffer | string, //图片文件的数据
71
+ abstract createImageBitmap(data: TypedArray | string, //图片文件的数据
71
72
  options: ImageBitmapConstructor, callback: ImageBitmapCallback): void;
72
73
  }
@@ -9,8 +9,6 @@ export interface TextureInternalOptions extends TextureFormatOptions, Omit<Textu
9
9
  export interface TextureInternalConstructOptions extends TextureInternalOptions {
10
10
  width: number;
11
11
  height: number;
12
- image?: ImageBitmapInternal;
13
- cubeImages?: Array<TextureInternalCubeImages>;
14
12
  }
15
13
  export type TextureInternalCubeImages<T extends ImageBitmapInternal | TypedArray = ImageBitmapInternal> = [
16
14
  positiveX: T,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.1.65-beta.5",
3
+ "version": "0.1.65-beta.6",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,7 @@
1
1
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
2
+ import type { TypedArray } from '../type';
2
3
 
3
4
  export declare abstract class PredyNativeInternal {
4
- abstract createImageBitmap (data: ArrayBuffer | string, //图片文件的数据
5
+ abstract createImageBitmap (data: TypedArray | string, //图片文件的数据
5
6
  options: ImageBitmapConstructor, callback: ImageBitmapCallback): void;
6
7
  }
@@ -11,6 +11,7 @@ import type { GPUCapability } from '../GPUCapability';
11
11
  import type { TextureInternal, TextureInternalConstructOptions } from './TextureInternal';
12
12
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
13
13
  import type { AndGLContext } from './AndGLContext';
14
+ import type { TypedArray } from '../type';
14
15
 
15
16
  /**
16
17
  * renderer 内部创建的对象,用来统计信息,排查资源泄漏的问题
@@ -91,7 +92,7 @@ export abstract class RendererInternal implements ResourceInternal {
91
92
  abstract resize (width: number, height: number): void;
92
93
 
93
94
  abstract createImageBitmap (
94
- data: ArrayBuffer | string, //图片文件的数据
95
+ data: TypedArray | string, //图片文件的数据
95
96
  options: ImageBitmapConstructor,
96
97
  callback: ImageBitmapCallback
97
98
  ): void;
@@ -11,9 +11,6 @@ export interface TextureInternalOptions extends TextureFormatOptions, Omit<Textu
11
11
  export interface TextureInternalConstructOptions extends TextureInternalOptions {
12
12
  width: number,
13
13
  height: number,
14
- image?: ImageBitmapInternal,
15
- //mipmap cube images
16
- cubeImages?: Array<TextureInternalCubeImages>,
17
14
  }
18
15
 
19
16
  export type TextureInternalCubeImages<T extends ImageBitmapInternal | TypedArray = ImageBitmapInternal> = [