@galacean/effects-core 2.0.0-alpha.17 → 2.0.0-alpha.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.
@@ -1,17 +1,17 @@
1
1
  import * as spec from '@galacean/effects-specification';
2
- import type { ShaderMarcos } from '../render';
2
+ import type { ShaderMacros } from '../render';
3
3
  import type { Material } from './material';
4
4
  import { ShaderType } from './types';
5
5
  export declare function valIfUndefined<T>(val: any, def: T): T;
6
6
  export declare function getPreMultiAlpha(blending?: number): number;
7
7
  /**
8
8
  * 生成 shader,检测到 WebGL1 上下文会降级
9
- * @param marcos - 宏定义数组
9
+ * @param macros - 宏定义数组
10
10
  * @param shader - 原始 shader 文本
11
11
  * @param shaderType - shader 类型
12
12
  * @return 去除版本号的 shader 文本
13
13
  */
14
- export declare function createShaderWithMarcos(marcos: ShaderMarcos, shader: string, shaderType: ShaderType, level: number): string;
14
+ export declare function createShaderWithMacros(macros: ShaderMacros, shader: string, shaderType: ShaderType, level: number): string;
15
15
  export declare function setBlendMode(material: Material, blendMode?: number): void;
16
16
  export declare function setSideMode(material: Material, side: spec.SideMode): void;
17
17
  export declare function setMaskMode(material: Material, maskMode: spec.MaskMode): void;
@@ -151,7 +151,7 @@ export declare class ParticleMesh implements ParticleMeshData {
151
151
  removePoint(index: number): void;
152
152
  setPoint(index: number, point: Point): void;
153
153
  }
154
- export declare function getParticleMeshShader(item: spec.ParticleItem, env: string | undefined, gpuCapability: GPUCapability): {
154
+ export declare function getParticleMeshShader(item: spec.ParticleItem, gpuCapability: GPUCapability, env?: string): {
155
155
  shader: SharedShaderWithSource;
156
156
  vertex: number;
157
157
  fragment: number;
@@ -56,4 +56,4 @@ export declare class TrailMesh {
56
56
  setPointStartPos(index: number, pos: Vector3): void;
57
57
  onUpdate(escapeTime: number): any;
58
58
  }
59
- export declare function getTrailMeshShader(trails: spec.ParticleTrail, particleMaxCount: number, name: string, env: string | undefined, gpuCapability: GPUCapability): ShaderWithSource;
59
+ export declare function getTrailMeshShader(trails: spec.ParticleTrail, particleMaxCount: number, name: string, gpuCapability: GPUCapability, env?: string): ShaderWithSource;
@@ -20,16 +20,12 @@ export type SpriteRegionData = {
20
20
  size: spec.vec2;
21
21
  };
22
22
  export declare let maxSpriteMeshItemCount: number;
23
- export declare let maxSpriteTextureCount: number;
24
23
  export declare function setSpriteMeshMaxItemCountByGPU(gpuCapability: GPUCapabilityDetail): 16 | 32 | undefined;
25
24
  export declare function getImageItemRenderInfo(item: SpriteComponent): SpriteItemRenderInfo;
26
25
  export declare function spriteMeshShaderFromFilter(level: number, options?: {
27
- count?: number;
28
- ignoreBlend?: boolean;
29
26
  wireframe?: boolean;
30
27
  env?: string;
31
28
  }): SharedShaderWithSource;
32
29
  export declare function spriteMeshShaderIdFromRenderInfo(renderInfo: SpriteItemRenderInfo, count: number): string;
33
30
  export declare function spriteMeshShaderFromRenderInfo(renderInfo: SpriteItemRenderInfo, count: number, level: number, env?: string): SharedShaderWithSource;
34
31
  export declare function setMaxSpriteMeshItemCount(count: number): void;
35
- export declare function setSpriteMeshMaxFragmentTextures(count: number): void;
@@ -1,7 +1,7 @@
1
1
  import type * as spec from '@galacean/effects-specification';
2
2
  import { EffectsObject } from '../effects-object';
3
3
  import type { Engine } from '../engine';
4
- export type ShaderMarcos = [key: string, value: string | number | boolean][];
4
+ export type ShaderMacros = [key: string, value: string | number | boolean][];
5
5
  export declare enum ShaderCompileResultStatus {
6
6
  noShader = 0,
7
7
  success = 1,
@@ -39,7 +39,7 @@ export interface InstancedShaderWithSource {
39
39
  /**
40
40
  * shader的宏定义
41
41
  */
42
- marcos?: ShaderMarcos;
42
+ macros?: ShaderMacros;
43
43
  /**
44
44
  * shader是否共享
45
45
  */
@@ -65,7 +65,7 @@ export interface SharedShaderWithSource {
65
65
  /**
66
66
  * shader的宏定义
67
67
  */
68
- marcos?: ShaderMarcos;
68
+ macros?: ShaderMacros;
69
69
  /**
70
70
  * 是否共用GLProgram
71
71
  * shared为true时,
@@ -94,7 +94,7 @@ export interface ShaderLibrary {
94
94
  [cacheId: string]: ShaderCompileResult;
95
95
  };
96
96
  addShader(shader: ShaderWithSource): void;
97
- createShader(shaderSource: ShaderWithSource, macros?: ShaderMarcos): ShaderVariant;
97
+ createShader(shaderSource: ShaderWithSource, macros?: ShaderMacros): ShaderVariant;
98
98
  /**
99
99
  * @param cacheId
100
100
  */
@@ -2,5 +2,5 @@ import type * as spec from '@galacean/effects-specification';
2
2
  import type { Texture2DSourceOptions, TextureCubeSourceOptions } from './types';
3
3
  import type { Engine } from '../engine';
4
4
  type TextureJSONOptions = spec.SerializedTextureSource & spec.TextureConfigOptionsBase & spec.TextureFormatOptions;
5
- export declare function deserializeMipmapTexture(texOpts: TextureJSONOptions, bins: ArrayBuffer[], files: spec.BinaryFile[] | undefined, engine: Engine): Promise<Texture2DSourceOptions | TextureCubeSourceOptions>;
5
+ export declare function deserializeMipmapTexture(textureOptions: TextureJSONOptions, bins: ArrayBuffer[], engine: Engine, files?: spec.BinaryFile[]): Promise<Texture2DSourceOptions | TextureCubeSourceOptions>;
6
6
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.0.0-alpha.17",
3
+ "version": "2.0.0-alpha.18",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",