@galacean/effects-core 2.1.0-alpha.2 → 2.1.0-alpha.3

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.
@@ -22,7 +22,6 @@ export declare class PlayableGraph {
22
22
  export declare class Playable implements Disposable {
23
23
  onPlayablePlayFlag: boolean;
24
24
  onPlayablePauseFlag: boolean;
25
- overrideTimeNextEvaluation: boolean;
26
25
  private destroyed;
27
26
  private inputs;
28
27
  private inputOuputPorts;
@@ -1,16 +1,13 @@
1
- import type { DataPath, EffectsObjectData } from '@galacean/effects-specification';
1
+ import type * as spec from '@galacean/effects-specification';
2
2
  import type { RuntimeClip, TrackAsset } from '../timeline/track';
3
3
  import type { FrameContext, PlayableGraph } from './playable-graph';
4
4
  import { Playable, PlayableAsset } from './playable-graph';
5
5
  import type { Constructor } from '../../utils';
6
- export interface TimelineAssetData extends EffectsObjectData {
7
- tracks: DataPath[];
8
- }
9
6
  export declare class TimelineAsset extends PlayableAsset {
10
7
  tracks: TrackAsset[];
11
8
  createPlayable(graph: PlayableGraph): Playable;
12
9
  createTrack<T extends TrackAsset>(classConstructor: Constructor<T>, parent: TrackAsset, name?: string): T;
13
- fromData(data: TimelineAssetData): void;
10
+ fromData(data: spec.TimelineAssetData): void;
14
11
  }
15
12
  export declare class TimelinePlayable extends Playable {
16
13
  clips: RuntimeClip[];
@@ -7,6 +7,8 @@ interface BurstOptions {
7
7
  probability: number;
8
8
  }
9
9
  export declare class Burst {
10
+ once: boolean;
11
+ disabled: boolean;
10
12
  private now;
11
13
  private index;
12
14
  private internalCycles;
@@ -2,7 +2,6 @@ import type * as spec from '@galacean/effects-specification';
2
2
  import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
3
3
  import { Vector2 } from '@galacean/effects-math/es/core/vector2';
4
4
  import { Vector3 } from '@galacean/effects-math/es/core/vector3';
5
- import { Matrix3 } from '@galacean/effects-math/es/core/matrix3';
6
5
  import type { Engine } from '../../engine';
7
6
  import { ValueGetter } from '../../math';
8
7
  import type { GPUCapability, SharedShaderWithSource } from '../../render';
@@ -139,12 +138,10 @@ export declare class ParticleMesh implements ParticleMeshData {
139
138
  readonly textureOffsets: number[];
140
139
  readonly maxCount: number;
141
140
  readonly anchor: Vector2;
142
- private cachedVelocity;
143
141
  private cachedRotationVector3;
144
142
  private cachedRotationMatrix;
145
143
  private cachedLinearMove;
146
144
  private tempMatrix3;
147
- private tempVector3;
148
145
  VERT_MAX_KEY_FRAME_COUNT: number;
149
146
  constructor(engine: Engine, props: ParticleMeshProps);
150
147
  getPointColor(index: number): number[];
@@ -152,12 +149,11 @@ export declare class ParticleMesh implements ParticleMeshData {
152
149
  resetGeometryData(geometry: Geometry): void;
153
150
  onUpdate(dt: number): void;
154
151
  minusTime(time: number): void;
155
- calculateTranslation(velocity: Vector3, t0: number, t1: number, duration: number): Vector3;
156
- transformFromRotation(rot: Vector3, life: number, dur: number, aSeed: number, result: Matrix3): Matrix3;
157
- mat3FromRotation(rotation: Vector3, result: Matrix3): Matrix3;
158
- calLinearMov(time: number, duration: number, aSeed: number, result: Vector3): Vector3;
159
152
  removePoint(index: number): void;
160
153
  setPoint(index: number, point: Point): void;
154
+ private applyTranslation;
155
+ private applyRotation;
156
+ private applyLinearMove;
161
157
  private expandArray;
162
158
  }
163
159
  export declare function getParticleMeshShader(item: spec.ParticleItem, gpuCapability: GPUCapability, env?: string): {
@@ -6,7 +6,7 @@ import { Component } from '../../components';
6
6
  import type { Engine } from '../../engine';
7
7
  import type { ValueGetter } from '../../math';
8
8
  import type { Mesh } from '../../render';
9
- import type { ShapeGenerator } from '../../shape';
9
+ import type { ShapeGenerator, ShapeParticle } from '../../shape';
10
10
  import { Texture } from '../../texture';
11
11
  import { Transform } from '../../transform';
12
12
  import { type color } from '../../utils';
@@ -188,7 +188,7 @@ export declare class ParticleSystem extends Component {
188
188
  * 通过粒子参数获取当前时刻粒子的位置
189
189
  */
190
190
  getPointPosition(point: Point): Vector3;
191
- initPoint(data: Record<string, any>): Point;
191
+ initPoint(data: ShapeParticle): Point;
192
192
  addBurst(burst: Burst, offsets: vec3[]): number;
193
193
  removeBurst(index: number): void;
194
194
  createPoint(lifetime: number): Point;
@@ -41,6 +41,10 @@ export declare class VFXItem extends EffectsObject implements Disposable {
41
41
  * 合成属性
42
42
  */
43
43
  composition: Composition | null;
44
+ /**
45
+ * 元素动画的当前时间
46
+ */
47
+ time: number;
44
48
  /**
45
49
  * 元素动画的持续时间
46
50
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@galacean/effects-core",
3
- "version": "2.1.0-alpha.2",
3
+ "version": "2.1.0-alpha.3",
4
4
  "description": "Galacean Effects runtime core for the web",
5
5
  "module": "./dist/index.mjs",
6
6
  "main": "./dist/index.js",