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

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.26
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.26");
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.26
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.26");
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.26
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -4,6 +4,7 @@ import type { TextureInternal } from './TextureInternal';
4
4
  export interface DataBlockInternalOptions {
5
5
  name: string;
6
6
  }
7
+ export type NativeUniformStruct = [key: string, value: TypedArray][];
7
8
  export declare abstract class DataBlockInternal implements ResourceInternal {
8
9
  readonly isDestroyed: boolean;
9
10
  /**
@@ -27,6 +28,14 @@ export declare abstract class DataBlockInternal implements ResourceInternal {
27
28
  * @param value
28
29
  */
29
30
  abstract getUniformValue(name: string, value: TypedArray): boolean;
31
+ /**
32
+ * 设置uniform的结构体数据
33
+ */
34
+ abstract setUniformStructValue(name: string, value: NativeUniformStruct): void;
35
+ /**
36
+ * 设置uniform的结构体Array数据
37
+ */
38
+ abstract setUniformStructArrayValue(name: string, value: NativeUniformStruct[]): void;
30
39
  abstract setUniformTextures(uniformName: string, texture: TextureInternal[] | undefined): void;
31
40
  abstract getUniformTextures(uniformName: string): TextureInternal[] | undefined;
32
41
  }
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.26",
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 type NativeUniformStruct = [key: string, value: 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): void;
42
+
43
+ /**
44
+ * 设置uniform的结构体Array数据
45
+ */
46
+ abstract setUniformStructArrayValue (name: string, value: NativeUniformStruct[]): void;
47
+
36
48
  abstract setUniformTextures (uniformName: string, texture: TextureInternal[] | undefined): void;
37
49
 
38
50
  abstract getUniformTextures (uniformName: string): TextureInternal[] | undefined;