@predy-js/render-interface 0.1.61 → 0.1.62-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,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.1.61
5
+ * Version: v0.1.62-beta.2
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -0,0 +1,18 @@
1
+ export declare abstract class AndGLContext {
2
+ abstract isEnabled(param: GLenum): boolean;
3
+ /**
4
+ * 获取gl的参数, 返回值为4个int 数组
5
+ * @param param
6
+ */
7
+ abstract getParameter_i4(param: GLenum): [number, number, number, number];
8
+ /**
9
+ * 获取gl的参数, 返回值为4个bool 数组
10
+ * @param param
11
+ */
12
+ abstract getParameter_b4(param: GLenum): [boolean, boolean, boolean, boolean];
13
+ /**
14
+ * 获取gl的参数, 返回值为1个int
15
+ * @param param
16
+ */
17
+ abstract getParameter_i1(param: GLenum): number;
18
+ }
@@ -10,6 +10,7 @@ import type { RenderFrameInternal, RenderFrameInternalOptions } from './RenderFr
10
10
  import type { GPUCapability } from '../GPUCapability';
11
11
  import type { TextureInternal, TextureInternalConstructOptions } from './TextureInternal';
12
12
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
13
+ import type { AndGLContext } from './AndGLContext';
13
14
  /**
14
15
  * renderer 内部创建的对象,用来统计信息,排查资源泄漏的问题
15
16
  */
@@ -30,6 +31,7 @@ export declare abstract class RendererInternal implements ResourceInternal {
30
31
  readonly shaderLibrary: ShaderLibraryInternal;
31
32
  readonly width: number;
32
33
  readonly height: number;
34
+ readonly gl?: AndGLContext;
33
35
  abstract destroy(): void;
34
36
  /**
35
37
  * 需要进行重新渲染
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.1.61",
3
+ "version": "0.1.62-beta.2",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,22 @@
1
+
2
+ export abstract class AndGLContext {
3
+ abstract isEnabled (param: GLenum): boolean;
4
+
5
+ /**
6
+ * 获取gl的参数, 返回值为4个int 数组
7
+ * @param param
8
+ */
9
+ abstract getParameter_i4 (param: GLenum): [number, number, number, number];
10
+
11
+ /**
12
+ * 获取gl的参数, 返回值为4个bool 数组
13
+ * @param param
14
+ */
15
+ abstract getParameter_b4 (param: GLenum): [boolean, boolean, boolean, boolean];
16
+
17
+ /**
18
+ * 获取gl的参数, 返回值为1个int
19
+ * @param param
20
+ */
21
+ abstract getParameter_i1 (param: GLenum): number;
22
+ }
@@ -10,6 +10,7 @@ import type { RenderFrameInternal, RenderFrameInternalOptions } from './RenderFr
10
10
  import type { GPUCapability } from '../GPUCapability';
11
11
  import type { TextureInternal, TextureInternalConstructOptions } from './TextureInternal';
12
12
  import type { ImageBitmapCallback, ImageBitmapConstructor } from './ImageBitmapInternal';
13
+ import type { AndGLContext } from './AndGLContext';
13
14
 
14
15
  /**
15
16
  * renderer 内部创建的对象,用来统计信息,排查资源泄漏的问题
@@ -32,6 +33,7 @@ export abstract class RendererInternal implements ResourceInternal {
32
33
  readonly shaderLibrary: ShaderLibraryInternal;
33
34
  readonly width: number;
34
35
  readonly height: number;
36
+ readonly gl?: AndGLContext;
35
37
 
36
38
  abstract destroy (): void;
37
39