@galacean/effects-core 2.1.0-alpha.1 → 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.
@@ -97,6 +97,8 @@ export declare class BezierCurve extends ValueGetter<number> {
97
97
  timeInterval: number;
98
98
  valueInterval: number;
99
99
  curve: BezierEasing;
100
+ timeStart: number;
101
+ timeEnd: number;
100
102
  }>;
101
103
  keys: number[][];
102
104
  onCreate(props: spec.BezierKeyframeValue[]): void;
@@ -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,6 +138,10 @@ export declare class ParticleMesh implements ParticleMeshData {
139
138
  readonly textureOffsets: number[];
140
139
  readonly maxCount: number;
141
140
  readonly anchor: Vector2;
141
+ private cachedRotationVector3;
142
+ private cachedRotationMatrix;
143
+ private cachedLinearMove;
144
+ private tempMatrix3;
142
145
  VERT_MAX_KEY_FRAME_COUNT: number;
143
146
  constructor(engine: Engine, props: ParticleMeshProps);
144
147
  getPointColor(index: number): number[];
@@ -146,12 +149,12 @@ export declare class ParticleMesh implements ParticleMeshData {
146
149
  resetGeometryData(geometry: Geometry): void;
147
150
  onUpdate(dt: number): void;
148
151
  minusTime(time: number): void;
149
- calculateTranslation(velocity: Vector3, t0: number, t1: number, duration: number): Vector3;
150
- transformFromRotation(rot: Vector3, life: number, dur: number, aSeed: number): Matrix3;
151
- mat3FromRotation(rotation: Vector3): Matrix3;
152
- calLinearMov(time: number, duration: number, aSeed: number): Vector3;
153
152
  removePoint(index: number): void;
154
153
  setPoint(index: number, point: Point): void;
154
+ private applyTranslation;
155
+ private applyRotation;
156
+ private applyLinearMove;
157
+ private expandArray;
155
158
  }
156
159
  export declare function getParticleMeshShader(item: spec.ParticleItem, gpuCapability: GPUCapability, env?: string): {
157
160
  shader: SharedShaderWithSource;
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import { TextureSourceType } from './types';
2
- import type { TextureFactorySourceFrom, TextureSourceOptions, TextureDataType } from './types';
2
+ import type { TextureFactorySourceFrom, TextureSourceOptions, TextureDataType, TextureOptionsBase } from './types';
3
3
  import type { Engine } from '../engine';
4
4
  import { EffectsObject } from '../effects-object';
5
5
  /**
@@ -36,7 +36,7 @@ export declare abstract class Texture extends EffectsObject {
36
36
  * @param url - 要创建的 Texture URL
37
37
  * @since 2.0.0
38
38
  */
39
- static fromImage(url: string, engine: Engine): Promise<Texture>;
39
+ static fromImage(url: string, engine: Engine, options?: TextureOptionsBase): Promise<Texture>;
40
40
  /**
41
41
  * 通过数据创建 Texture 对象。
42
42
  * @param data - 要创建的 Texture 数据
@@ -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.1",
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",