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

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.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.23
5
+ * Version: v0.3.0-beta.24
6
6
  */
7
7
 
8
8
  'use strict';
@@ -5860,7 +5860,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5860
5860
  return MarsSharedGeometry;
5861
5861
  }(MarsGeometry));
5862
5862
 
5863
- consoleLog('version: ' + "0.3.0-beta.23");
5863
+ consoleLog('version: ' + "0.3.0-beta.24");
5864
5864
  var ModuleMsg = 'RI Package: @predy-js/render-interface';
5865
5865
 
5866
5866
  var RI = /*#__PURE__*/Object.freeze({
package/dist/index.mjs 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.23
5
+ * Version: v0.3.0-beta.24
6
6
  */
7
7
 
8
8
  /******************************************************************************
@@ -5856,7 +5856,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5856
5856
  return MarsSharedGeometry;
5857
5857
  }(MarsGeometry));
5858
5858
 
5859
- consoleLog('version: ' + "0.3.0-beta.23");
5859
+ consoleLog('version: ' + "0.3.0-beta.24");
5860
5860
  var ModuleMsg = 'RI Package: @predy-js/render-interface';
5861
5861
 
5862
5862
  var RI = /*#__PURE__*/Object.freeze({
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.23
5
+ * Version: v0.3.0-beta.24
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.23",
3
+ "version": "0.3.0-beta.24",
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;