@galacean/effects-core 2.0.0-alpha.31 → 2.0.0-alpha.33

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,5 +1,5 @@
1
1
  import type { Matrix3, Matrix4, Quaternion, Vector2, Vector3, Vector4, Color } from '@galacean/effects-math/es/core/index';
2
- import type { GlobalUniforms, Renderer, Shader, ShaderWithSource } from '../render';
2
+ import type { GlobalUniforms, Renderer, Shader, ShaderVariant, ShaderWithSource } from '../render';
3
3
  import type { Texture } from '../texture';
4
4
  import type { DestroyOptions, Disposable } from '../utils';
5
5
  import type { UniformSemantic, UniformValue } from './types';
@@ -56,6 +56,7 @@ export interface MaterialProps {
56
56
  */
57
57
  export declare abstract class Material extends EffectsObject implements Disposable {
58
58
  shader: Shader;
59
+ shaderVariant: ShaderVariant;
59
60
  shaderSource: ShaderWithSource;
60
61
  stringTags: Record<string, string>;
61
62
  readonly uniformSemantics: Record<string, UniformSemantic>;
@@ -358,5 +359,6 @@ export declare abstract class Material extends EffectsObject implements Disposab
358
359
  * @override
359
360
  */
360
361
  initialize(): void;
362
+ createShaderVariant(): void;
361
363
  use(render: Renderer, globalUniforms: GlobalUniforms): void;
362
364
  }
@@ -17,5 +17,6 @@ export declare class Link<T> {
17
17
  removeNode(node: LinkNode<T>): void;
18
18
  forEach(func: (content: T, index: number) => void, thisObj?: any): void;
19
19
  forEachReverse(func: (content: T, index: number) => void, thisObj?: any): void;
20
+ getNodeByIndex(index: number): LinkNode<T> | null;
20
21
  }
21
22
  export {};
@@ -140,11 +140,6 @@ export declare class ParticleMesh implements ParticleMeshData {
140
140
  readonly anchor: Vector2;
141
141
  constructor(engine: Engine, props: ParticleMeshProps);
142
142
  getPointColor(index: number): number[];
143
- /**
144
- * 待废弃
145
- * @deprecated - 使用 `particle-system.getPointPosition` 替代
146
- */
147
- getPointPosition(index: number): Vector3;
148
143
  clearPoints(): void;
149
144
  resetGeometryData(geometry: Geometry): void;
150
145
  minusTime(time: number): void;
@@ -182,9 +182,15 @@ export declare class ParticleSystem extends Component {
182
182
  raycast(options: ParticleSystemRayCastOptions): Vector3[] | undefined;
183
183
  clearPointTrail(pointIndex: number): void;
184
184
  updatePointTrail(pointIndex: number, emitterLifetime: number, point: Point, startTime: number): void;
185
+ /**
186
+ * 通过索引获取指定index粒子当前时刻的位置
187
+ * @params index - 粒子索引
188
+ */
189
+ getPointPositionByIndex(index: number): Vector3 | null;
190
+ /**
191
+ * 通过粒子参数获取当前时刻粒子的位置
192
+ */
185
193
  getPointPosition(point: Point): Vector3;
186
- onEnd(particle: ParticleSystem): void;
187
- onIterate(particle: ParticleSystem): void;
188
194
  initPoint(data: Record<string, any>): Point;
189
195
  addBurst(burst: Burst, offsets: vec3[]): number;
190
196
  removeBurst(index: number): void;
@@ -258,6 +258,7 @@ export declare function findPreviousRenderPass(renderPasses: RenderPass[], rende
258
258
  export declare class GlobalUniforms {
259
259
  floats: Record<string, number>;
260
260
  ints: Record<string, number>;
261
+ vector4s: Record<string, Vector4>;
261
262
  matrices: Record<string, Matrix4>;
262
263
  samplers: string[];
263
264
  uniforms: string[];
@@ -1,4 +1,4 @@
1
- import type { Matrix4 } from '@galacean/effects-math/es/core/index';
1
+ import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
2
2
  import type { RendererComponent } from '../components/renderer-component';
3
3
  import type { Engine } from '../engine';
4
4
  import type { Material } from '../material';
@@ -20,6 +20,7 @@ export declare class Renderer implements LostHandler, RestoreHandler {
20
20
  constructor();
21
21
  setGlobalFloat(name: string, value: number): void;
22
22
  setGlobalInt(name: string, value: number): void;
23
+ setGlobalVector4(name: string, value: Vector4): void;
23
24
  setGlobalMatrix(name: string, value: Matrix4): void;
24
25
  getFramebuffer(): Framebuffer | null;
25
26
  setFramebuffer(framebuffer: Framebuffer | null): void;
@@ -66,7 +66,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
66
66
  * 元素 id 唯一
67
67
  */
68
68
  id: string;
69
- oldId: string;
70
69
  /**
71
70
  * 元素创建的数据图层/粒子/模型等
72
71
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.0.0-alpha.31",
3
+ "version": "2.0.0-alpha.33",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",