@predy-js/render-interface 0.3.0-beta.3 → 0.3.0-beta.30

Sign up to get free protection for your applications and to get access to all the features.
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.3.0-beta.3
5
+ * Version: v0.3.0-beta.30
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -4,6 +4,9 @@ import type { TextureInternal } from './TextureInternal';
4
4
  export interface DataBlockInternalOptions {
5
5
  name: string;
6
6
  }
7
+ export interface NativeUniformStruct {
8
+ [key: string]: TypedArray;
9
+ }
7
10
  export declare abstract class DataBlockInternal implements ResourceInternal {
8
11
  readonly isDestroyed: boolean;
9
12
  /**
@@ -27,6 +30,14 @@ export declare abstract class DataBlockInternal implements ResourceInternal {
27
30
  * @param value
28
31
  */
29
32
  abstract getUniformValue(name: string, value: TypedArray): boolean;
33
+ /**
34
+ * 设置uniform的结构体数据
35
+ */
36
+ abstract setUniformStructValue(name: string, value: NativeUniformStruct[]): boolean;
37
+ /**
38
+ * 获取uniform的结构体数据
39
+ */
40
+ abstract getUniformStructValue(name: string, idx: number, value: NativeUniformStruct): boolean;
30
41
  abstract setUniformTextures(uniformName: string, texture: TextureInternal[] | undefined): void;
31
42
  abstract getUniformTextures(uniformName: string): TextureInternal[] | undefined;
32
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.3.0-beta.3",
3
+ "version": "0.3.0-beta.30",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -5,6 +5,8 @@ import type { TextureInternal } from './TextureInternal';
5
5
  export interface DataBlockInternalOptions {
6
6
  name: string,
7
7
  }
8
+ export interface NativeUniformStruct { [key: string]: TypedArray }
9
+
8
10
  export abstract class DataBlockInternal implements ResourceInternal {
9
11
  readonly isDestroyed: boolean;
10
12
  /**
@@ -33,6 +35,16 @@ export abstract class DataBlockInternal implements ResourceInternal {
33
35
  */
34
36
  abstract getUniformValue (name: string, value: TypedArray): boolean;
35
37
 
38
+ /**
39
+ * 设置uniform的结构体数据
40
+ */
41
+ abstract setUniformStructValue (name: string, value: NativeUniformStruct[]): boolean;
42
+
43
+ /**
44
+ * 获取uniform的结构体数据
45
+ */
46
+ abstract getUniformStructValue (name: string, idx: number, value: NativeUniformStruct): boolean;
47
+
36
48
  abstract setUniformTextures (uniformName: string, texture: TextureInternal[] | undefined): void;
37
49
 
38
50
  abstract getUniformTextures (uniformName: string): TextureInternal[] | undefined;