@predy-js/render-interface 0.3.0-beta.5 → 0.3.0-beta.50
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/native/DataBlockInternal.d.ts +15 -0
- package/package.json +1 -1
- package/types/native/DataBlockInternal.ts +17 -0
package/dist/statistic.js
CHANGED
@@ -4,6 +4,12 @@ import type { TextureInternal } from './TextureInternal';
|
|
4
4
|
export interface DataBlockInternalOptions {
|
5
5
|
name: string;
|
6
6
|
}
|
7
|
+
/**
|
8
|
+
* struct uniform的数据结构
|
9
|
+
*/
|
10
|
+
export interface NativeUniformStruct {
|
11
|
+
[key: string]: TypedArray;
|
12
|
+
}
|
7
13
|
export declare abstract class DataBlockInternal implements ResourceInternal {
|
8
14
|
readonly isDestroyed: boolean;
|
9
15
|
/**
|
@@ -27,6 +33,15 @@ export declare abstract class DataBlockInternal implements ResourceInternal {
|
|
27
33
|
* @param value
|
28
34
|
*/
|
29
35
|
abstract getUniformValue(name: string, value: TypedArray): boolean;
|
36
|
+
/**
|
37
|
+
* 设置uniform的结构体数据,对于数据进行深拷贝,修改原始数据,不会影响已经传入的数据,
|
38
|
+
* 如果要修改数据,必须重新调用setUniformStructValues
|
39
|
+
*/
|
40
|
+
abstract setUniformStructValues(name: string, values: NativeUniformStruct[]): boolean;
|
41
|
+
/**
|
42
|
+
* 获取uniform的结构体数据,获取的数据进行深拷贝,传入的数据将
|
43
|
+
*/
|
44
|
+
abstract getUniformStructValue(name: string, idx: number): Record<string, ArrayBuffer> | undefined;
|
30
45
|
abstract setUniformTextures(uniformName: string, texture: TextureInternal[] | undefined): void;
|
31
46
|
abstract getUniformTextures(uniformName: string): TextureInternal[] | undefined;
|
32
47
|
}
|
package/package.json
CHANGED
@@ -5,6 +5,12 @@ import type { TextureInternal } from './TextureInternal';
|
|
5
5
|
export interface DataBlockInternalOptions {
|
6
6
|
name: string,
|
7
7
|
}
|
8
|
+
|
9
|
+
/**
|
10
|
+
* struct uniform的数据结构
|
11
|
+
*/
|
12
|
+
export interface NativeUniformStruct { [key: string]: TypedArray }
|
13
|
+
|
8
14
|
export abstract class DataBlockInternal implements ResourceInternal {
|
9
15
|
readonly isDestroyed: boolean;
|
10
16
|
/**
|
@@ -33,6 +39,17 @@ export abstract class DataBlockInternal implements ResourceInternal {
|
|
33
39
|
*/
|
34
40
|
abstract getUniformValue (name: string, value: TypedArray): boolean;
|
35
41
|
|
42
|
+
/**
|
43
|
+
* 设置uniform的结构体数据,对于数据进行深拷贝,修改原始数据,不会影响已经传入的数据,
|
44
|
+
* 如果要修改数据,必须重新调用setUniformStructValues
|
45
|
+
*/
|
46
|
+
abstract setUniformStructValues (name: string, values: NativeUniformStruct[]): boolean;
|
47
|
+
|
48
|
+
/**
|
49
|
+
* 获取uniform的结构体数据,获取的数据进行深拷贝,传入的数据将
|
50
|
+
*/
|
51
|
+
abstract getUniformStructValue (name: string, idx: number): Record<string, ArrayBuffer> | undefined;
|
52
|
+
|
36
53
|
abstract setUniformTextures (uniformName: string, texture: TextureInternal[] | undefined): void;
|
37
54
|
|
38
55
|
abstract getUniformTextures (uniformName: string): TextureInternal[] | undefined;
|