@predy-js/render-interface 0.1.64-beta.7 → 0.1.64-beta.9
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.mjs +2 -2
- package/dist/statistic.js +1 -1
- package/dist/types/Geometry.d.ts +5 -0
- package/dist/types/native/AndGLContext.d.ts +7 -0
- package/dist/types/native/GeometryInternal.d.ts +0 -6
- package/dist/types/native/MaterialInternal.d.ts +0 -6
- package/dist/types/native/PredyNativeModule.d.ts +1 -1
- package/package.json +1 -1
- package/types/Geometry.ts +8 -0
- package/types/native/AndGLContext.ts +7 -0
- package/types/native/GeometryInternal.ts +0 -5
- package/types/native/MaterialInternal.ts +0 -6
- package/types/native/PredyNativeModule.ts +1 -1
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.1.64-beta.
|
5
|
+
* Version: v0.1.64-beta.9
|
6
6
|
*/
|
7
7
|
|
8
8
|
'use strict';
|
@@ -5827,7 +5827,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5827
5827
|
return MarsSharedGeometry;
|
5828
5828
|
}(MarsGeometry));
|
5829
5829
|
|
5830
|
-
consoleLog('version: ' + "0.1.64-beta.
|
5830
|
+
consoleLog('version: ' + "0.1.64-beta.9");
|
5831
5831
|
|
5832
5832
|
exports.GPUBufferOptionsMemoryShared = GPUBufferOptionsMemoryShared;
|
5833
5833
|
exports.Geometry = MarsGeometry;
|
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.1.64-beta.
|
5
|
+
* Version: v0.1.64-beta.9
|
6
6
|
*/
|
7
7
|
|
8
8
|
/******************************************************************************
|
@@ -5823,7 +5823,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
|
|
5823
5823
|
return MarsSharedGeometry;
|
5824
5824
|
}(MarsGeometry));
|
5825
5825
|
|
5826
|
-
consoleLog('version: ' + "0.1.64-beta.
|
5826
|
+
consoleLog('version: ' + "0.1.64-beta.9");
|
5827
5827
|
|
5828
5828
|
export { DestroyOptions, GPUBufferOptionsMemoryShared, MarsGeometry as Geometry, MarsInstancedMesh as InstancedMesh, MarsTextureFactory, MarsMaterial as Material, MarsMaterialDataBlock as MaterialDataBlock, MarsMesh as Mesh, MarsRenderFrame as RenderFrame, MarsRenderPass as RenderPass, RenderPassAttachmentStorageType, RenderPassDestroyAttachmentType, RenderPassMeshOrder, RenderPassPriorityNormal, RenderPassPriorityPostprocess, RenderPassPriorityPrepare, MarsRenderer as Renderer, ShaderCompileResultStatus, ShaderLibraryEmpty, MarsSharedGeometry as SharedGeometry, MarsTexture as Texture, TextureLoadAction, TextureSourceType, TextureStoreAction, constants, getDefaultGPUCapability, getDefaultTextureFactory, setDefaultTextureFactory };
|
5829
5829
|
//# sourceMappingURL=index.mjs.map
|
package/dist/statistic.js
CHANGED
package/dist/types/Geometry.d.ts
CHANGED
@@ -2,6 +2,10 @@ import type { GPUBuffer } from './GPUBuffer';
|
|
2
2
|
import type { IGPUResource, IGPURenderer } from './IGPURenderer';
|
3
3
|
import type { Immutable, TypedArray } from './type';
|
4
4
|
import type { GPURenderer } from './Renderer';
|
5
|
+
export interface GeometryBufferLayout {
|
6
|
+
index: number;
|
7
|
+
name: string;
|
8
|
+
}
|
5
9
|
/**
|
6
10
|
* Attribute binding information,
|
7
11
|
* size:attribute size. the size attribute of vec4|vec3|vec2 is 4|3|2
|
@@ -61,6 +65,7 @@ export interface GeometryOptions {
|
|
61
65
|
attributes: {
|
62
66
|
[key: string]: Attribute;
|
63
67
|
};
|
68
|
+
bufferLayouts?: GeometryBufferLayout[];
|
64
69
|
index?: {
|
65
70
|
data: GeometryIndexData;
|
66
71
|
releasable?: boolean;
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { MaterialInternal } from './MaterialInternal';
|
1
2
|
export declare abstract class AndGLContext {
|
2
3
|
abstract isEnabled(param: GLenum): boolean;
|
3
4
|
/**
|
@@ -17,4 +18,10 @@ export declare abstract class AndGLContext {
|
|
17
18
|
abstract getParameter_i1(param: GLenum): number;
|
18
19
|
abstract getParameter_f4(param: GLenum): [number, number, number, number];
|
19
20
|
abstract getParameter_f2(param: GLenum): [number, number];
|
21
|
+
/**
|
22
|
+
* 将Material的状态设置到GPU
|
23
|
+
* 这个方法会在Native端调用, 在RI中不会调用
|
24
|
+
* 为了Android 测试,会主动调用设置状态到GPU, IOS 暂不调用
|
25
|
+
*/
|
26
|
+
abstract setupStates(mtl: MaterialInternal): void;
|
20
27
|
}
|
@@ -1,14 +1,9 @@
|
|
1
1
|
import type { AttributeWithType, GeometryOptions } from '../Geometry';
|
2
2
|
import type { ResourceInternal } from './ResourceInternal';
|
3
3
|
import type { GPUBufferInternal } from './GPUBufferInternal';
|
4
|
-
interface GeometryBufferLayout {
|
5
|
-
index: number;
|
6
|
-
name: string;
|
7
|
-
}
|
8
4
|
export interface GeometryInternalOptions extends Omit<GeometryOptions, 'attributes' | 'index'> {
|
9
5
|
attributes: Record<string, AttributeWithType>;
|
10
6
|
buffers: Record<string, GPUBufferInternal>;
|
11
|
-
bufferLayouts: GeometryBufferLayout[];
|
12
7
|
indexBuffer?: GPUBufferInternal;
|
13
8
|
indexBufferType?: IndexBufferType;
|
14
9
|
}
|
@@ -38,4 +33,3 @@ export declare abstract class GeometryInternal implements ResourceInternal {
|
|
38
33
|
*/
|
39
34
|
abstract destroy(): void;
|
40
35
|
}
|
41
|
-
export {};
|
@@ -13,11 +13,5 @@ export declare abstract class MaterialInternal implements ResourceInternal {
|
|
13
13
|
readonly shaderCacheId: string;
|
14
14
|
dataBlocks: DataBlockInternal[];
|
15
15
|
protected constructor(options: MaterialInternalOptions);
|
16
|
-
/**
|
17
|
-
* 将Material的状态设置到GPU
|
18
|
-
* 这个方法会在Native端调用, 在RI中不会调用
|
19
|
-
* 为了Android 测试,会主动调用设置状态到GPU, IOS 暂不调用
|
20
|
-
*/
|
21
|
-
abstract setupStates(): void;
|
22
16
|
abstract destroy(): void;
|
23
17
|
}
|
package/package.json
CHANGED
package/types/Geometry.ts
CHANGED
@@ -3,6 +3,11 @@ import type { IGPUResource, IGPURenderer } from './IGPURenderer';
|
|
3
3
|
import type { Immutable, TypedArray } from './type';
|
4
4
|
import type { GPURenderer } from './Renderer';
|
5
5
|
|
6
|
+
export interface GeometryBufferLayout {
|
7
|
+
index: number,
|
8
|
+
name: string,
|
9
|
+
}
|
10
|
+
|
6
11
|
/**
|
7
12
|
* Attribute binding information,
|
8
13
|
* size:attribute size. the size attribute of vec4|vec3|vec2 is 4|3|2
|
@@ -81,6 +86,8 @@ export interface GeometryOptions {
|
|
81
86
|
|
82
87
|
attributes: { [key: string]: Attribute },
|
83
88
|
|
89
|
+
bufferLayouts?: GeometryBufferLayout[],
|
90
|
+
|
84
91
|
index?: { data: GeometryIndexData, releasable?: boolean },
|
85
92
|
|
86
93
|
mode?: GeometryDrawMode,
|
@@ -90,6 +97,7 @@ export interface GeometryOptions {
|
|
90
97
|
drawStart?: number,
|
91
98
|
|
92
99
|
bufferUsage?: GLenum,
|
100
|
+
|
93
101
|
}
|
94
102
|
|
95
103
|
/**
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import type { MaterialInternal } from './MaterialInternal';
|
1
2
|
|
2
3
|
export abstract class AndGLContext {
|
3
4
|
abstract isEnabled (param: GLenum): boolean;
|
@@ -24,4 +25,10 @@ export abstract class AndGLContext {
|
|
24
25
|
|
25
26
|
abstract getParameter_f2 (param: GLenum): [number, number];
|
26
27
|
|
28
|
+
/**
|
29
|
+
* 将Material的状态设置到GPU
|
30
|
+
* 这个方法会在Native端调用, 在RI中不会调用
|
31
|
+
* 为了Android 测试,会主动调用设置状态到GPU, IOS 暂不调用
|
32
|
+
*/
|
33
|
+
abstract setupStates (mtl: MaterialInternal): void;
|
27
34
|
}
|
@@ -2,14 +2,9 @@ import type { AttributeWithType, GeometryOptions } from '../Geometry';
|
|
2
2
|
import type { ResourceInternal } from './ResourceInternal';
|
3
3
|
import type { GPUBufferInternal } from './GPUBufferInternal';
|
4
4
|
|
5
|
-
interface GeometryBufferLayout {
|
6
|
-
index: number,
|
7
|
-
name: string,
|
8
|
-
}
|
9
5
|
export interface GeometryInternalOptions extends Omit<GeometryOptions, 'attributes' | 'index'> {
|
10
6
|
attributes: Record<string, AttributeWithType>,
|
11
7
|
buffers: Record<string, GPUBufferInternal>,
|
12
|
-
bufferLayouts: GeometryBufferLayout[],
|
13
8
|
indexBuffer?: GPUBufferInternal,
|
14
9
|
indexBufferType?: IndexBufferType,
|
15
10
|
}
|
@@ -17,11 +17,5 @@ export abstract class MaterialInternal implements ResourceInternal {
|
|
17
17
|
protected constructor (options: MaterialInternalOptions) {
|
18
18
|
}
|
19
19
|
|
20
|
-
/**
|
21
|
-
* 将Material的状态设置到GPU
|
22
|
-
* 这个方法会在Native端调用, 在RI中不会调用
|
23
|
-
* 为了Android 测试,会主动调用设置状态到GPU, IOS 暂不调用
|
24
|
-
*/
|
25
|
-
abstract setupStates (): void;
|
26
20
|
abstract destroy (): void;
|
27
21
|
}
|