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

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.30
5
+ * Version: v0.3.0-beta.31
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.30");
5863
+ consoleLog('version: ' + "0.3.0-beta.31");
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.30
5
+ * Version: v0.3.0-beta.31
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.30");
5859
+ consoleLog('version: ' + "0.3.0-beta.31");
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.30
5
+ * Version: v0.3.0-beta.31
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
+ /**
8
+ * struct uniform的数据结构
9
+ */
7
10
  export interface NativeUniformStruct {
8
11
  [key: string]: TypedArray;
9
12
  }
@@ -31,13 +34,14 @@ export declare abstract class DataBlockInternal implements ResourceInternal {
31
34
  */
32
35
  abstract getUniformValue(name: string, value: TypedArray): boolean;
33
36
  /**
34
- * 设置uniform的结构体数据
37
+ * 设置uniform的结构体数据,对于数据进行深拷贝,修改原始数据,不会影响已经传入的数据,
38
+ * 如果要修改数据,必须重新调用setUniformStructValues
35
39
  */
36
- abstract setUniformStructValue(name: string, value: NativeUniformStruct[]): boolean;
40
+ abstract setUniformStructValues(name: string, values: NativeUniformStruct[]): boolean;
37
41
  /**
38
- * 获取uniform的结构体数据
42
+ * 获取uniform的结构体数据,获取的数据进行深拷贝,传入的数据将
39
43
  */
40
- abstract getUniformStructValue(name: string, idx: number, value: NativeUniformStruct): boolean;
44
+ abstract getUniformStructValue(name: string, idx: number): Record<string, ArrayBuffer> | undefined;
41
45
  abstract setUniformTextures(uniformName: string, texture: TextureInternal[] | undefined): void;
42
46
  abstract getUniformTextures(uniformName: string): TextureInternal[] | undefined;
43
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.3.0-beta.30",
3
+ "version": "0.3.0-beta.31",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",
@@ -5,6 +5,10 @@ import type { TextureInternal } from './TextureInternal';
5
5
  export interface DataBlockInternalOptions {
6
6
  name: string,
7
7
  }
8
+
9
+ /**
10
+ * struct uniform的数据结构
11
+ */
8
12
  export interface NativeUniformStruct { [key: string]: TypedArray }
9
13
 
10
14
  export abstract class DataBlockInternal implements ResourceInternal {
@@ -36,14 +40,15 @@ export abstract class DataBlockInternal implements ResourceInternal {
36
40
  abstract getUniformValue (name: string, value: TypedArray): boolean;
37
41
 
38
42
  /**
39
- * 设置uniform的结构体数据
43
+ * 设置uniform的结构体数据,对于数据进行深拷贝,修改原始数据,不会影响已经传入的数据,
44
+ * 如果要修改数据,必须重新调用setUniformStructValues
40
45
  */
41
- abstract setUniformStructValue (name: string, value: NativeUniformStruct[]): boolean;
46
+ abstract setUniformStructValues (name: string, values: NativeUniformStruct[]): boolean;
42
47
 
43
48
  /**
44
- * 获取uniform的结构体数据
49
+ * 获取uniform的结构体数据,获取的数据进行深拷贝,传入的数据将
45
50
  */
46
- abstract getUniformStructValue (name: string, idx: number, value: NativeUniformStruct): boolean;
51
+ abstract getUniformStructValue (name: string, idx: number): Record<string, ArrayBuffer> | undefined;
47
52
 
48
53
  abstract setUniformTextures (uniformName: string, texture: TextureInternal[] | undefined): void;
49
54