@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.
- package/dist/components/effect-component.d.ts +1 -0
- package/dist/index.js +286 -251
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +286 -251
- package/dist/index.mjs.map +1 -1
- package/dist/math/value-getter.d.ts +2 -0
- package/dist/plugins/cal/playable-graph.d.ts +0 -1
- package/dist/plugins/cal/timeline-asset.d.ts +2 -5
- package/dist/plugins/particle/burst.d.ts +2 -0
- package/dist/plugins/particle/particle-mesh.d.ts +8 -5
- package/dist/plugins/particle/particle-system.d.ts +2 -2
- package/dist/texture/texture.d.ts +2 -2
- package/dist/vfx-item.d.ts +4 -0
- package/package.json +1 -1
|
@@ -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
|
|
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[];
|
|
@@ -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:
|
|
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 数据
|
package/dist/vfx-item.d.ts
CHANGED