@predy-js/render-interface 0.3.0-beta.22 → 0.3.0-beta.221
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.js +68 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -35
- package/dist/index.mjs.map +1 -1
- package/dist/src/render/MarsMaterialDataBlock.d.ts +3 -3
- package/dist/src/render/MarsTextureFactory.d.ts +1 -1
- package/dist/src/webgl/GLProgram.d.ts +2 -3
- package/dist/src/webgl/KhronosTextureContainer.d.ts +3 -3
- package/dist/src/webgl/constants.d.ts +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/Material.d.ts +4 -3
- package/dist/types/Texture.d.ts +6 -5
- package/dist/types/native/DataBlockInternal.d.ts +15 -0
- package/dist/types/native/PredyNativeInternal.d.ts +47 -20
- package/dist/types/native/RendererInternal.d.ts +6 -1
- package/dist/types/native/TextureInternal.d.ts +6 -2
- package/package.json +1 -1
- package/types/Material.ts +4 -3
- package/types/Texture.ts +42 -41
- package/types/native/DataBlockInternal.ts +17 -0
- package/types/native/PredyNativeInternal.ts +62 -26
- package/types/native/RendererInternal.ts +6 -1
- package/types/native/TextureInternal.ts +6 -2
@@ -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
|
-
|
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
|
-
|
62
|
+
/**
|
63
|
+
* 上传Cube压缩纹理数据
|
64
|
+
*/
|
65
|
+
abstract update2DCompressedCubeData (data: Uint8Array[], mipmapLevel?: number): void;
|
62
66
|
|
63
67
|
/**
|
64
68
|
* imageBitmap的尺寸也必须和Texture相同
|