@predy-js/render-interface 0.1.61-beta.16 → 0.1.61-beta.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/src/render/MarsSemanticMap.d.ts +2 -2
- package/dist/src/webgl/GLProgram.d.ts +1 -1
- package/dist/statistic.js +1 -1
- package/dist/types/RenderPass.d.ts +1 -1
- package/dist/types/native/DataBlockInternal.d.ts +3 -0
- package/dist/types/native/MaterialInternal.d.ts +0 -9
- package/package.json +1 -1
- package/types/RenderPass.ts +1 -1
- package/types/native/DataBlockInternal.ts +5 -0
- package/types/native/MaterialInternal.ts +0 -11
@@ -1,10 +1,10 @@
|
|
1
|
-
import type { GPUBuffer, RenderState, UniformValue, SemanticMap, SemanticGetter
|
1
|
+
import type { GPUBuffer, RenderState, UniformValue, SemanticMap, SemanticGetter } from '../../types';
|
2
2
|
export declare class MarsSemanticMap implements SemanticMap {
|
3
3
|
readonly semantics: Record<string, SemanticGetter>;
|
4
4
|
constructor(semantics?: Record<string, SemanticGetter>);
|
5
5
|
toObject(): Record<string, SemanticGetter>;
|
6
6
|
setSemantic(name: string, value: SemanticGetter | undefined): void;
|
7
|
-
getSemanticValue(name: string, state: RenderState): UniformValue | GPUBuffer |
|
7
|
+
getSemanticValue(name: string, state: RenderState): UniformValue | GPUBuffer | null | undefined;
|
8
8
|
hasSemanticValue(name: string): boolean;
|
9
9
|
destroy(): void;
|
10
10
|
}
|
@@ -36,7 +36,7 @@ export declare class GLProgram {
|
|
36
36
|
constructor(renderer: GLGPURenderer, program: WebGLProgram, shared: boolean, id: string);
|
37
37
|
init(renderer: GLGPURenderer, program: WebGLProgram): void;
|
38
38
|
bind(): void;
|
39
|
-
getSemanticValue(state: RenderState, semanticName: string): UniformValue | import("../../types").
|
39
|
+
getSemanticValue(state: RenderState, semanticName: string): UniformValue | import("../../types").GPUBuffer | null | undefined;
|
40
40
|
setupUniforms(state: RenderState): void;
|
41
41
|
setGLUniformValue(name: string, value: any, info: ProgramUniformInfo, gl: WebGL2RenderingContext | WebGLRenderingContext): void;
|
42
42
|
setupAttributes(geometry: GLGeometry): GLVertexArrayObject;
|
package/dist/statistic.js
CHANGED
@@ -110,7 +110,7 @@ export declare class SemanticMap {
|
|
110
110
|
[key: string]: SemanticGetter;
|
111
111
|
});
|
112
112
|
setSemantic(name: string, value: SemanticGetter | undefined): void;
|
113
|
-
getSemanticValue(name: string, state: RenderState): UniformValue | GPUBuffer |
|
113
|
+
getSemanticValue(name: string, state: RenderState): UniformValue | GPUBuffer | null | undefined;
|
114
114
|
hasSemanticValue(name: string): boolean;
|
115
115
|
toObject(): Record<string, SemanticGetter>;
|
116
116
|
destroy(): void;
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { TypedArray } from '../type';
|
3
|
+
import type { TextureInternal } from './TextureInternal';
|
3
4
|
export interface DataBlockInternalOptions {
|
4
5
|
name: string;
|
5
6
|
}
|
@@ -26,4 +27,6 @@ export declare abstract class DataBlockInternal implements ResourceInternal {
|
|
26
27
|
* @param value
|
27
28
|
*/
|
28
29
|
abstract getUniformValue(name: string, value: TypedArray): boolean;
|
30
|
+
abstract setUniformTexture(uniformName: string, texture: TextureInternal[] | undefined): void;
|
31
|
+
abstract getUniformTexture(uniformName: string): TextureInternal[] | undefined;
|
29
32
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { MaterialRenderStates } from '../Material';
|
3
3
|
import type { DataBlockInternal } from './DataBlockInternal';
|
4
|
-
import type { TextureInternal } from './TextureInternal';
|
5
4
|
export interface MaterialInternalOptions {
|
6
5
|
states: MaterialRenderStates;
|
7
6
|
dataBlocks: DataBlockInternal[];
|
@@ -15,12 +14,4 @@ export declare abstract class MaterialInternal implements ResourceInternal {
|
|
15
14
|
dataBlocks: DataBlockInternal[];
|
16
15
|
protected constructor(options: MaterialInternalOptions);
|
17
16
|
abstract destroy(): void;
|
18
|
-
/**
|
19
|
-
* 对于 uniform sampler2D uTex
|
20
|
-
* 和 uniform sampler2D uTextures[4] 都使用此函数
|
21
|
-
* @param name
|
22
|
-
* @param value
|
23
|
-
*/
|
24
|
-
abstract setUniformTextures(name: string, value: TextureInternal[]): void;
|
25
|
-
abstract getUniformTextures(name: string): TextureInternal[];
|
26
17
|
}
|
package/package.json
CHANGED
package/types/RenderPass.ts
CHANGED
@@ -149,7 +149,7 @@ export declare class SemanticMap {
|
|
149
149
|
|
150
150
|
setSemantic (name: string, value: SemanticGetter | undefined): void;
|
151
151
|
|
152
|
-
getSemanticValue (name: string, state: RenderState): UniformValue | GPUBuffer |
|
152
|
+
getSemanticValue (name: string, state: RenderState): UniformValue | GPUBuffer | null | undefined;
|
153
153
|
|
154
154
|
hasSemanticValue (name: string): boolean;
|
155
155
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { TypedArray } from '../type';
|
3
|
+
import type { TextureInternal } from './TextureInternal';
|
3
4
|
|
4
5
|
export interface DataBlockInternalOptions {
|
5
6
|
name: string,
|
@@ -32,4 +33,8 @@ export abstract class DataBlockInternal implements ResourceInternal {
|
|
32
33
|
*/
|
33
34
|
abstract getUniformValue (name: string, value: TypedArray): boolean;
|
34
35
|
|
36
|
+
abstract setUniformTexture (uniformName: string, texture: TextureInternal[] | undefined): void;
|
37
|
+
|
38
|
+
abstract getUniformTexture (uniformName: string): TextureInternal[] | undefined;
|
39
|
+
|
35
40
|
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { MaterialRenderStates } from '../Material';
|
3
3
|
import type { DataBlockInternal } from './DataBlockInternal';
|
4
|
-
import type { TextureInternal } from './TextureInternal';
|
5
4
|
export interface MaterialInternalOptions {
|
6
5
|
states: MaterialRenderStates,
|
7
6
|
dataBlocks: DataBlockInternal[],
|
@@ -18,14 +17,4 @@ export abstract class MaterialInternal implements ResourceInternal {
|
|
18
17
|
protected constructor (options: MaterialInternalOptions) {
|
19
18
|
}
|
20
19
|
abstract destroy (): void;
|
21
|
-
|
22
|
-
/**
|
23
|
-
* 对于 uniform sampler2D uTex
|
24
|
-
* 和 uniform sampler2D uTextures[4] 都使用此函数
|
25
|
-
* @param name
|
26
|
-
* @param value
|
27
|
-
*/
|
28
|
-
abstract setUniformTextures (name: string, value: TextureInternal[]): void;
|
29
|
-
|
30
|
-
abstract getUniformTextures (name: string): TextureInternal[];
|
31
20
|
}
|