@galacean/effects-core 2.1.0-alpha.0 → 2.1.0-alpha.2
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/asset-manager.d.ts +0 -4
- package/dist/comp-vfx-item.d.ts +2 -0
- package/dist/composition.d.ts +0 -2
- package/dist/index.js +348 -45
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +348 -45
- package/dist/index.mjs.map +1 -1
- package/dist/math/value-getter.d.ts +4 -1
- package/dist/plugins/particle/particle-mesh.d.ts +14 -0
- package/dist/plugins/particle/particle-system.d.ts +1 -0
- package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +2 -0
- package/dist/texture/texture.d.ts +2 -2
- package/package.json +1 -1
|
@@ -45,7 +45,8 @@ export declare class RandomValue extends ValueGetter<number> {
|
|
|
45
45
|
private min;
|
|
46
46
|
private max;
|
|
47
47
|
onCreate(props: [min: number, max: number]): void;
|
|
48
|
-
getValue(time?: number): number;
|
|
48
|
+
getValue(time?: number, seed?: number): number;
|
|
49
|
+
getIntegrateValue(t0: number, t1: number, timeScale?: number): number;
|
|
49
50
|
toUniform(): Float32Array;
|
|
50
51
|
map(func: any): this;
|
|
51
52
|
}
|
|
@@ -96,6 +97,8 @@ export declare class BezierCurve extends ValueGetter<number> {
|
|
|
96
97
|
timeInterval: number;
|
|
97
98
|
valueInterval: number;
|
|
98
99
|
curve: BezierEasing;
|
|
100
|
+
timeStart: number;
|
|
101
|
+
timeEnd: number;
|
|
99
102
|
}>;
|
|
100
103
|
keys: number[][];
|
|
101
104
|
onCreate(props: spec.BezierKeyframeValue[]): void;
|
|
@@ -2,6 +2,7 @@ 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';
|
|
5
6
|
import type { Engine } from '../../engine';
|
|
6
7
|
import { ValueGetter } from '../../math';
|
|
7
8
|
import type { GPUCapability, SharedShaderWithSource } from '../../render';
|
|
@@ -138,13 +139,26 @@ export declare class ParticleMesh implements ParticleMeshData {
|
|
|
138
139
|
readonly textureOffsets: number[];
|
|
139
140
|
readonly maxCount: number;
|
|
140
141
|
readonly anchor: Vector2;
|
|
142
|
+
private cachedVelocity;
|
|
143
|
+
private cachedRotationVector3;
|
|
144
|
+
private cachedRotationMatrix;
|
|
145
|
+
private cachedLinearMove;
|
|
146
|
+
private tempMatrix3;
|
|
147
|
+
private tempVector3;
|
|
148
|
+
VERT_MAX_KEY_FRAME_COUNT: number;
|
|
141
149
|
constructor(engine: Engine, props: ParticleMeshProps);
|
|
142
150
|
getPointColor(index: number): number[];
|
|
143
151
|
clearPoints(): void;
|
|
144
152
|
resetGeometryData(geometry: Geometry): void;
|
|
153
|
+
onUpdate(dt: number): void;
|
|
145
154
|
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;
|
|
146
159
|
removePoint(index: number): void;
|
|
147
160
|
setPoint(index: number, point: Point): void;
|
|
161
|
+
private expandArray;
|
|
148
162
|
}
|
|
149
163
|
export declare function getParticleMeshShader(item: spec.ParticleItem, gpuCapability: GPUCapability, env?: string): {
|
|
150
164
|
shader: SharedShaderWithSource;
|
|
@@ -159,6 +159,7 @@ export declare class ParticleSystem extends Component {
|
|
|
159
159
|
get lifetime(): number;
|
|
160
160
|
get particleCount(): number;
|
|
161
161
|
isFrozen(): boolean;
|
|
162
|
+
isEnded(): boolean;
|
|
162
163
|
initEmitterTransform(): void;
|
|
163
164
|
private updateEmitterTransform;
|
|
164
165
|
private addParticle;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { TrackAsset } from '../track';
|
|
2
|
+
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
2
3
|
export declare class SubCompositionTrack extends TrackAsset {
|
|
3
4
|
resolveBinding(parentBinding: object): object;
|
|
5
|
+
createTrackMixer(graph: PlayableGraph): Playable;
|
|
4
6
|
}
|
|
@@ -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 数据
|