@predy-js/render-interface 0.1.58 → 0.1.60-beta.1
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 +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/src/render/MarsRenderFrame.d.ts +2 -2
- package/dist/src/render/MarsRenderPass.d.ts +2 -2
- package/dist/statistic.js +1 -1
- package/dist/types/RenderFrame.d.ts +3 -3
- package/dist/types/RenderPass.d.ts +5 -5
- package/dist/types/native/RenderFrameInternal.d.ts +4 -4
- package/dist/types/native/RenderPassInternal.d.ts +8 -4
- package/dist/types/native/TextureInternal.d.ts +1 -1
- package/package.json +1 -1
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { RenderFrame, RenderFrameDestroyOptions, RenderFrameOptions, RenderPass,
|
1
|
+
import type { RenderFrame, RenderFrameDestroyOptions, RenderFrameOptions, RenderPass, RenderPassLoadAction } from '../../types';
|
2
2
|
import type { MarsRenderer } from './MarsRenderer';
|
3
3
|
import { MarsSemanticMap } from './MarsSemanticMap';
|
4
4
|
export declare class MarsRenderFrame implements RenderFrame {
|
5
|
-
clearAction:
|
5
|
+
clearAction: RenderPassLoadAction;
|
6
6
|
readonly name: string;
|
7
7
|
readonly semantics: MarsSemanticMap;
|
8
8
|
_renderPasses: RenderPass[];
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { RenderPass, RenderPassAttachmentOptions,
|
1
|
+
import type { RenderPass, RenderPassAttachmentOptions, RenderPassLoadAction, RenderPassDelegate, RenderPassDepthStencilAttachment, RenderPassDestroyOptions, RenderPassOptions, RenderPassStoreAction } from '../../types/RenderPass';
|
2
2
|
import { RenderPassAttachmentStorageType, RenderPassMeshOrder } from '../../types/RenderPass';
|
3
3
|
import type { MarsMesh } from './MarsMesh';
|
4
4
|
import type { MarsRenderer } from './MarsRenderer';
|
@@ -16,7 +16,7 @@ export declare class MarsRenderPass implements RenderPass {
|
|
16
16
|
readonly renderer: MarsRenderer;
|
17
17
|
readonly frameBuffer?: GLFrameBuffer;
|
18
18
|
readonly depthStencilType: RenderPassAttachmentStorageType;
|
19
|
-
readonly clearAction:
|
19
|
+
readonly clearAction: RenderPassLoadAction;
|
20
20
|
readonly storeAction: RenderPassStoreAction;
|
21
21
|
readonly semantics: MarsSemanticMap;
|
22
22
|
private _isDestroyed;
|
package/dist/statistic.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { UniformValue } from './Material';
|
2
|
-
import type { RenderPass,
|
2
|
+
import type { RenderPass, RenderPassLoadAction, RenderPassDestroyOptions, SemanticMap } from './RenderPass';
|
3
3
|
import type { Mesh } from './Mesh';
|
4
4
|
import type { GPUBuffer } from './GPUBuffer';
|
5
5
|
import type { vec4 } from './type';
|
@@ -18,7 +18,7 @@ export interface RenderFrameOptions {
|
|
18
18
|
semantics?: {
|
19
19
|
[key: string]: UniformValue | SemanticFunc | GPUBuffer;
|
20
20
|
};
|
21
|
-
clearAction?:
|
21
|
+
clearAction?: RenderPassLoadAction;
|
22
22
|
name?: string;
|
23
23
|
}
|
24
24
|
export type SemanticFunc = (state: RenderState) => UniformValue | GPUBuffer | null | undefined;
|
@@ -27,7 +27,7 @@ export type RenderFrameDestroyOptions = {
|
|
27
27
|
semantics?: DestroyOptions;
|
28
28
|
};
|
29
29
|
export declare class RenderFrame implements IGPUResource {
|
30
|
-
clearAction:
|
30
|
+
clearAction: RenderPassLoadAction;
|
31
31
|
constructor(options: RenderFrameOptions, renderer?: GPURenderer);
|
32
32
|
readonly renderPasses: RenderPass[];
|
33
33
|
readonly viewport?: vec4;
|
@@ -21,8 +21,8 @@ export declare enum TextureLoadAction {
|
|
21
21
|
clear = 2
|
22
22
|
}
|
23
23
|
export declare enum TextureStoreAction {
|
24
|
-
store =
|
25
|
-
clear =
|
24
|
+
store = 1,
|
25
|
+
clear = 0
|
26
26
|
}
|
27
27
|
export declare enum RenderPassAttachmentStorageType {
|
28
28
|
none = 0,
|
@@ -66,7 +66,7 @@ export interface RenderPassStoreAction {
|
|
66
66
|
stencilAction?: TextureStoreAction;
|
67
67
|
colorAction?: TextureStoreAction;
|
68
68
|
}
|
69
|
-
export interface
|
69
|
+
export interface RenderPassLoadAction {
|
70
70
|
clearColor?: vec4;
|
71
71
|
colorAction?: TextureLoadAction;
|
72
72
|
clearDepth?: number;
|
@@ -87,7 +87,7 @@ export interface RenderPassOptions extends RenderPassAttachmentOptions {
|
|
87
87
|
meshes?: Mesh[];
|
88
88
|
priority?: number;
|
89
89
|
meshOrder?: RenderPassMeshOrder;
|
90
|
-
clearAction?:
|
90
|
+
clearAction?: RenderPassLoadAction;
|
91
91
|
storeAction?: RenderPassStoreAction;
|
92
92
|
semantics?: {
|
93
93
|
[key: string]: SemanticGetter;
|
@@ -133,7 +133,7 @@ export declare class RenderPass implements IGPUResource {
|
|
133
133
|
readonly renderer?: IGPURenderer;
|
134
134
|
readonly semantics: SemanticMap;
|
135
135
|
readonly storeAction: RenderPassStoreAction;
|
136
|
-
readonly clearAction:
|
136
|
+
readonly clearAction: RenderPassLoadAction;
|
137
137
|
readonly multisample: number;
|
138
138
|
delegate: RenderPassDelegate;
|
139
139
|
meshOrder: RenderPassMeshOrder;
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { RenderPassInternal } from './RenderPassInternal';
|
3
|
-
import type {
|
3
|
+
import type { RenderPassLoadAction } from '../RenderPass';
|
4
4
|
export interface RenderFrameInternalOptions {
|
5
5
|
renderPasses: RenderPassInternal[];
|
6
|
-
clearAction:
|
6
|
+
clearAction: RenderPassLoadAction;
|
7
7
|
name: string;
|
8
8
|
}
|
9
9
|
export declare abstract class RenderFrameInternal implements ResourceInternal {
|
10
10
|
readonly isDestroyed: boolean;
|
11
|
-
readonly clearAction:
|
11
|
+
readonly clearAction: RenderPassLoadAction;
|
12
12
|
readonly name: string;
|
13
13
|
/**
|
14
14
|
* 增删改查的操作,在warp层对renderPassInternals进行后,得到的数据全部覆盖当前数据
|
@@ -21,5 +21,5 @@ export declare abstract class RenderFrameInternal implements ResourceInternal {
|
|
21
21
|
* 实际渲染根据客户端时机进行
|
22
22
|
*/
|
23
23
|
abstract flush(): void;
|
24
|
-
abstract updateClearAction(action:
|
24
|
+
abstract updateClearAction(action: RenderPassLoadAction): void;
|
25
25
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { ResourceInternal } from './ResourceInternal';
|
2
2
|
import type { MeshInternal } from './MeshInternal';
|
3
|
-
import type {
|
3
|
+
import type { RenderPassLoadAction, RenderPassStoreAction } from '../RenderPass';
|
4
4
|
import type { TextureInternal } from './TextureInternal';
|
5
5
|
import type { RenderPassStorageObject } from '../RenderPass';
|
6
6
|
import type { RenderPassAttachmentStorageType } from '../RenderPass';
|
@@ -27,23 +27,26 @@ export interface RenderPassDepthStencilAttachmentOptionsInternal {
|
|
27
27
|
storage?: RenderPassStorageObjectInternal;
|
28
28
|
}
|
29
29
|
export interface RenderPassOptionsInternal {
|
30
|
-
|
30
|
+
loadAction: RenderPassLoadAction;
|
31
31
|
attachments: RenderPassColorAttachmentInternal[];
|
32
32
|
name: string;
|
33
33
|
meshes: MeshInternal[];
|
34
|
+
width: number;
|
35
|
+
height: number;
|
34
36
|
multiSample?: number;
|
35
37
|
storeAction?: RenderPassStoreAction;
|
36
38
|
depthStencilAttachment?: RenderPassDepthStencilAttachmentOptionsInternal;
|
37
|
-
viewport?: [x: number, y: number, width: number, height: number];
|
38
39
|
}
|
39
40
|
export declare abstract class RenderPassInternal implements ResourceInternal {
|
40
41
|
readonly isDestroyed: boolean;
|
41
42
|
readonly name: string;
|
42
43
|
readonly storeAction: RenderPassStoreAction;
|
43
|
-
readonly
|
44
|
+
readonly loadAction: RenderPassLoadAction;
|
44
45
|
readonly multisample: number;
|
45
46
|
readonly depthStencilAttachment: RenderPassDepthStencilAttachmentInternal;
|
46
47
|
readonly attachments: RenderPassColorAttachmentInternal[];
|
48
|
+
readonly width: number;
|
49
|
+
readonly height: number;
|
47
50
|
/**
|
48
51
|
* 增删改查的操作,在warp层对Mesh进行后,得到的数据全部覆盖当前数据
|
49
52
|
*/
|
@@ -51,4 +54,5 @@ export declare abstract class RenderPassInternal implements ResourceInternal {
|
|
51
54
|
priority: number;
|
52
55
|
protected constructor(options: RenderPassOptionsInternal);
|
53
56
|
abstract destroy(): void;
|
57
|
+
abstract resize(width: number, height: number): void;
|
54
58
|
}
|
@@ -16,7 +16,7 @@ export declare abstract class TextureInternal implements ResourceInternal {
|
|
16
16
|
readonly height: number;
|
17
17
|
readonly name: string;
|
18
18
|
readonly options: TextureInternalOptions;
|
19
|
-
protected constructor(options:
|
19
|
+
protected constructor(options: TextureInternalConstructOptions);
|
20
20
|
abstract resize(width: number, height: number): boolean;
|
21
21
|
abstract destroy(): void;
|
22
22
|
/**
|