@predy-js/render-interface 0.1.52-beta.4 → 0.1.52-beta.6

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 CHANGED
@@ -2,7 +2,7 @@
2
2
  * Name: @predy-js/render-interface
3
3
  * Description: undefined
4
4
  * Author: undefined
5
- * Version: v0.1.52-beta.4
5
+ * Version: v0.1.52-beta.6
6
6
  */
7
7
 
8
8
  'use strict';
@@ -5730,7 +5730,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5730
5730
  return MarsSharedGeometry;
5731
5731
  }(MarsGeometry));
5732
5732
 
5733
- consoleLog('version: ' + "0.1.52-beta.4");
5733
+ consoleLog('version: ' + "0.1.52-beta.6");
5734
5734
  consoleLog('Update : xxx');
5735
5735
 
5736
5736
  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.52-beta.4
5
+ * Version: v0.1.52-beta.6
6
6
  */
7
7
 
8
8
  /******************************************************************************
@@ -5726,7 +5726,7 @@ var MarsSharedGeometry = /** @class */ (function (_super) {
5726
5726
  return MarsSharedGeometry;
5727
5727
  }(MarsGeometry));
5728
5728
 
5729
- consoleLog('version: ' + "0.1.52-beta.4");
5729
+ consoleLog('version: ' + "0.1.52-beta.6");
5730
5730
  consoleLog('Update : xxx');
5731
5731
 
5732
5732
  export { DestroyOptions, 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 };
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.1.52-beta.4
5
+ * Version: v0.1.52-beta.6
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -8,12 +8,11 @@ import type { GPURenderer } from './Renderer';
8
8
  * stride:used for interleaved attributes, 2 vec4 stride is 4 * 2 * Float32Array.BYTES_PER_ELEMENTS
9
9
  * offset: offset for interleaved attributes, 1 vec4 offset is 4 * Float32Array.BYTES_PER_ELEMENTS
10
10
  * normalize: attributed should be normalized
11
- * location: attribute location
12
11
  * Attribute的绑定信息
13
12
  * size:向量的大小,vec4|vec3|vec2的大小分别为 4|3|2
14
13
  * stride:如果使用交错存储顶点,2个vec4的stride为 2 * 4 * Float32Array.BYTES_PER_ELEMENTS
15
14
  * offset:交错顶点的数据偏移,1个vec4的偏移为 4*Float32Array.BYTES_PER_ELEMENTS
16
- * location: attribute location 可以通过GL反射获得,Metal必须填写
15
+ * bufferIndex: 用于metal提交bufferIndex
17
16
  */
18
17
  export interface AttributeBase {
19
18
  size: number;
@@ -21,7 +20,7 @@ export interface AttributeBase {
21
20
  offset?: number;
22
21
  instanceDivisor?: number;
23
22
  normalize?: boolean;
24
- location?: number;
23
+ bufferIndex?: number;
25
24
  }
26
25
  /**
27
26
  * if data provided, type can be inferred from its data
@@ -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 {};
@@ -5,7 +5,7 @@ import type { TextureInternal } from './TextureInternal';
5
5
  export interface MaterialInternalOptions {
6
6
  states: MaterialRenderStates;
7
7
  dataBlocks: DataBlockInternal[];
8
- shaderCacheId: string;
8
+ shaderCacheId?: string;
9
9
  _mtlFrag?: string;
10
10
  _mtlVert?: string;
11
11
  name: string;
@@ -13,7 +13,6 @@ export interface MaterialInternalOptions {
13
13
  export declare abstract class MaterialInternal implements ResourceInternal {
14
14
  readonly isDestroyed: boolean;
15
15
  readonly name: string;
16
- readonly shaderCacheId: string;
17
16
  dataBlocks: DataBlockInternal[];
18
17
  protected constructor(options: MaterialInternalOptions);
19
18
  abstract destroy(): void;
@@ -4,6 +4,7 @@ import type { RenderPassClearAction, RenderPassStoreAction } from '../RenderPass
4
4
  import type { TextureInternal } from './TextureInternal';
5
5
  import type { RenderPassStorageObject } from '../RenderPass';
6
6
  import type { RenderPassAttachmentStorageType } from '../RenderPass';
7
+ import type { Mesh } from '../Mesh';
7
8
  export interface RenderPassColorAttachmentInternal {
8
9
  readonly storageType: RenderPassAttachmentStorageType.color;
9
10
  readonly texture: TextureInternal;
@@ -28,12 +29,12 @@ export interface RenderPassDepthStencilAttachmentOptionsInternal {
28
29
  }
29
30
  export interface RenderPassOptionsInternal {
30
31
  clearAction: RenderPassClearAction;
32
+ storeAction: RenderPassStoreAction;
31
33
  attachments: RenderPassColorAttachmentInternal[];
34
+ depthStencilAttachment: RenderPassDepthStencilAttachmentOptionsInternal;
32
35
  name: string;
33
- meshes: MeshInternal[];
34
- multiSample?: number;
35
- storeAction?: RenderPassStoreAction;
36
- depthStencilAttachment?: RenderPassDepthStencilAttachmentOptionsInternal;
36
+ meshes: Mesh[];
37
+ multiSample: number;
37
38
  viewport?: [x: number, y: number, width: number, height: number];
38
39
  }
39
40
  export declare abstract class RenderPassInternal implements ResourceInternal {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.1.52-beta.4",
3
+ "version": "0.1.52-beta.6",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",