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

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.2
5
+ * Version: v0.1.52-beta.4
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.2");
5733
+ consoleLog('version: ' + "0.1.52-beta.4");
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.2
5
+ * Version: v0.1.52-beta.4
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.2");
5729
+ consoleLog('version: ' + "0.1.52-beta.4");
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.2
5
+ * Version: v0.1.52-beta.4
6
6
  */
7
7
 
8
8
  // https://github.com/greggman/webgl-memory/blob/main/src/texture-utils.js
@@ -8,11 +8,12 @@ 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
11
12
  * Attribute的绑定信息
12
13
  * size:向量的大小,vec4|vec3|vec2的大小分别为 4|3|2
13
14
  * stride:如果使用交错存储顶点,2个vec4的stride为 2 * 4 * Float32Array.BYTES_PER_ELEMENTS
14
15
  * offset:交错顶点的数据偏移,1个vec4的偏移为 4*Float32Array.BYTES_PER_ELEMENTS
15
- * bufferIndex: 用于metal提交bufferIndex
16
+ * location: attribute location 可以通过GL反射获得,Metal必须填写
16
17
  */
17
18
  export interface AttributeBase {
18
19
  size: number;
@@ -20,7 +21,7 @@ export interface AttributeBase {
20
21
  offset?: number;
21
22
  instanceDivisor?: number;
22
23
  normalize?: boolean;
23
- bufferIndex?: number;
24
+ location?: number;
24
25
  }
25
26
  /**
26
27
  * if data provided, type can be inferred from its data
@@ -1,9 +1,14 @@
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
+ }
4
8
  export interface GeometryInternalOptions extends Omit<GeometryOptions, 'attributes' | 'index'> {
5
9
  attributes: Record<string, AttributeWithType>;
6
10
  buffers: Record<string, GPUBufferInternal>;
11
+ bufferLayouts: GeometryBufferLayout[];
7
12
  indexBuffer?: GPUBufferInternal;
8
13
  indexBufferType?: IndexBufferType;
9
14
  }
@@ -33,3 +38,4 @@ export declare abstract class GeometryInternal implements ResourceInternal {
33
38
  */
34
39
  abstract destroy(): void;
35
40
  }
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,6 +13,7 @@ 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;
16
17
  dataBlocks: DataBlockInternal[];
17
18
  protected constructor(options: MaterialInternalOptions);
18
19
  abstract destroy(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@predy-js/render-interface",
3
- "version": "0.1.52-beta.2",
3
+ "version": "0.1.52-beta.4",
4
4
  "license": "MIT",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",