@predy-js/render-interface 0.3.0-beta.23 → 0.3.0-beta.230

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.
@@ -11,6 +11,7 @@ import type { GPUCapability } from '../GPUCapability';
11
11
  import type { TextureInternal, TextureInternalConstructOptions } from './TextureInternal';
12
12
  import type { AndGLContext } from './AndGLContext';
13
13
  import type { MetalInternal } from './MetalInternal';
14
+ import type { vec2 } from '../type';
14
15
 
15
16
  /**
16
17
  * renderer 内部创建的对象,用来统计信息,排查资源泄漏的问题
@@ -109,6 +110,10 @@ export abstract class RendererInternal implements ResourceInternal {
109
110
  */
110
111
  abstract getErrors (): string[];
111
112
 
112
- abstract resize (width: number, height: number): void;
113
+ /**
114
+ * resize predy view,并且相关的fbo和render pass都需要设为相应的尺寸
115
+ * @param size 如果不提供size,则使用当前predy view parent的尺寸
116
+ */
117
+ abstract resize (size?: vec2): void;
113
118
  }
114
119
 
@@ -55,10 +55,14 @@ export abstract class TextureInternal implements ResourceInternal {
55
55
  abstract update2DImageData (data: ImageData, mipmapLevel?: number): void;
56
56
 
57
57
  /**
58
- * 上传压缩纹理数据
58
+ * 上传2D压缩纹理数据
59
59
  */
60
+ abstract update2DCompressedData (data: Uint8Array, mipmapLevel?: number): void;
60
61
 
61
- abstract update2DCompressedImage (data: ImageData, mipmapLevel?: number): void;
62
+ /**
63
+ * 上传Cube压缩纹理数据
64
+ */
65
+ abstract update2DCompressedCubeData (data: Uint8Array[], mipmapLevel?: number): void;
62
66
 
63
67
  /**
64
68
  * imageBitmap的尺寸也必须和Texture相同