@galacean/effects-core 2.0.0-alpha.16 → 2.0.0-alpha.17
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/comp-vfx-item.d.ts +1 -1
- package/dist/components/component.d.ts +2 -2
- package/dist/components/effect-component.d.ts +1 -1
- package/dist/components/renderer-component.d.ts +1 -1
- package/dist/decorators.d.ts +4 -3
- package/dist/effects-object.d.ts +1 -0
- package/dist/fallback/migration.d.ts +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +177 -172
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +175 -171
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/cal/calculate-item.d.ts +0 -3
- package/dist/plugins/index.d.ts +1 -2
- package/dist/plugins/interact/interact-item.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -1
- package/dist/plugins/text/index.d.ts +4 -0
- package/dist/plugins/timeline/track.d.ts +14 -14
- package/dist/serialization-helper.d.ts +6 -5
- package/dist/shape/shape.d.ts +1 -1
- package/dist/transform.d.ts +3 -3
- package/dist/utils/index.d.ts +18 -13
- package/dist/vfx-item.d.ts +1 -2
- package/package.json +2 -2
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { Euler, Vector3 } from '@galacean/effects-math/es/core/index';
|
|
2
|
-
import type * as spec from '@galacean/effects-specification';
|
|
3
2
|
import type { ValueGetter } from '../../math';
|
|
4
3
|
import { TrackAsset } from '../timeline/track';
|
|
5
4
|
import type { TimelineAsset } from './timeline-asset';
|
|
@@ -24,7 +23,5 @@ export type ItemLinearVelOverLifetime = {
|
|
|
24
23
|
* @internal
|
|
25
24
|
*/
|
|
26
25
|
export declare class ObjectBindingTrack extends TrackAsset {
|
|
27
|
-
data: spec.EffectsObjectData;
|
|
28
26
|
create(timelineAsset: TimelineAsset): void;
|
|
29
|
-
fromData(data: spec.EffectsObjectData): void;
|
|
30
27
|
}
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -25,5 +25,4 @@ export * from './timeline/tracks/sprite-color-track';
|
|
|
25
25
|
export * from './timeline/tracks/sub-composition-track';
|
|
26
26
|
export * from './timeline/playables/sub-composition-playable-asset';
|
|
27
27
|
export * from './cal/timeline-asset';
|
|
28
|
-
export * from './text
|
|
29
|
-
export * from './text/text-loader';
|
|
28
|
+
export * from './text';
|
|
@@ -24,5 +24,5 @@ export declare class InteractComponent extends RendererComponent {
|
|
|
24
24
|
beginDragTarget(options: spec.DragInteractOption, eventSystem: EventSystem): void;
|
|
25
25
|
getHitTestParams: (force?: boolean) => HitTestTriangleParams | void;
|
|
26
26
|
getBoundingBox(): BoundingBoxTriangle | void;
|
|
27
|
-
fromData(data:
|
|
27
|
+
fromData(data: spec.InteractContent): void;
|
|
28
28
|
}
|
|
@@ -192,6 +192,6 @@ export declare class ParticleSystem extends Component {
|
|
|
192
192
|
resumeParticleEmission(): void;
|
|
193
193
|
getBoundingBox(): void | BoundingBoxSphere;
|
|
194
194
|
getHitTestParams: (force?: boolean) => void | HitTestCustomParams;
|
|
195
|
-
fromData(data:
|
|
195
|
+
fromData(data: unknown): void;
|
|
196
196
|
}
|
|
197
197
|
export {};
|
|
@@ -2,6 +2,20 @@ import { ItemEndBehavior } from '@galacean/effects-specification';
|
|
|
2
2
|
import type { Engine } from '../../engine';
|
|
3
3
|
import type { PlayableGraph } from '../cal/playable-graph';
|
|
4
4
|
import { Playable, PlayableAsset, PlayableOutput } from '../cal/playable-graph';
|
|
5
|
+
/**
|
|
6
|
+
* @since 2.0.0
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export declare class TimelineClip {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
start: number;
|
|
13
|
+
duration: number;
|
|
14
|
+
asset: PlayableAsset;
|
|
15
|
+
endBehaviour: ItemEndBehavior;
|
|
16
|
+
constructor();
|
|
17
|
+
toLocalTime(time: number): number;
|
|
18
|
+
}
|
|
5
19
|
/**
|
|
6
20
|
* @since 2.0.0
|
|
7
21
|
* @internal
|
|
@@ -38,20 +52,6 @@ export declare enum TrackType {
|
|
|
38
52
|
MasterTrack = 0,
|
|
39
53
|
ObjectTrack = 1
|
|
40
54
|
}
|
|
41
|
-
/**
|
|
42
|
-
* @since 2.0.0
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
export declare class TimelineClip {
|
|
46
|
-
id: string;
|
|
47
|
-
name: string;
|
|
48
|
-
start: number;
|
|
49
|
-
duration: number;
|
|
50
|
-
asset: PlayableAsset;
|
|
51
|
-
endBehaviour: ItemEndBehavior;
|
|
52
|
-
constructor();
|
|
53
|
-
toLocalTime(time: number): number;
|
|
54
|
-
}
|
|
55
55
|
export declare class RuntimeClip {
|
|
56
56
|
clip: TimelineClip;
|
|
57
57
|
playable: Playable;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import type * as spec from '@galacean/effects-specification';
|
|
1
2
|
import { EffectsObject } from './effects-object';
|
|
2
3
|
export declare class SerializationHelper {
|
|
3
4
|
static collectSerializableObject(effectsObject: EffectsObject, res: Record<string, EffectsObject>): void;
|
|
4
5
|
static serializeEffectObject(effectsObject: EffectsObject): Record<string, any>;
|
|
5
6
|
static serializeTaggedProperties(effectsObject: EffectsObject, serializedData?: Record<string, any>): Record<string, any>;
|
|
6
|
-
static deserializeTaggedProperties(serializedData:
|
|
7
|
-
static deserializeTaggedPropertiesAsync(serializedData:
|
|
8
|
-
static checkTypedArray(obj:
|
|
9
|
-
static checkDataPath(value:
|
|
7
|
+
static deserializeTaggedProperties(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): void;
|
|
8
|
+
static deserializeTaggedPropertiesAsync(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): Promise<void>;
|
|
9
|
+
static checkTypedArray(obj: unknown): boolean;
|
|
10
|
+
static checkDataPath(value: unknown): value is spec.DataPath;
|
|
10
11
|
static checkGLTFNode(value: any): boolean;
|
|
11
|
-
static checkImageSource(value:
|
|
12
|
+
static checkImageSource(value: HTMLCanvasElement): boolean;
|
|
12
13
|
private static deserializeProperty;
|
|
13
14
|
private static deserializePropertyAsync;
|
|
14
15
|
private static serializeObjectProperty;
|
package/dist/shape/shape.d.ts
CHANGED
package/dist/transform.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare class Transform implements Disposable {
|
|
|
22
22
|
static getRotation(quat: Quaternion, out: Euler): Euler;
|
|
23
23
|
engine: Engine;
|
|
24
24
|
name: string;
|
|
25
|
-
taggedProperties:
|
|
25
|
+
taggedProperties: spec.TransformData;
|
|
26
26
|
/**
|
|
27
27
|
* 自身位移
|
|
28
28
|
*/
|
|
@@ -223,8 +223,8 @@ export declare class Transform implements Disposable {
|
|
|
223
223
|
* 获取 Transform 是否生效
|
|
224
224
|
*/
|
|
225
225
|
getValid(): boolean;
|
|
226
|
-
toData():
|
|
227
|
-
fromData(data:
|
|
226
|
+
toData(): spec.TransformData;
|
|
227
|
+
fromData(data: spec.TransformData): void;
|
|
228
228
|
dispose(): void;
|
|
229
229
|
private updateTRSCache;
|
|
230
230
|
private dispatchValueChange;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -35,17 +35,17 @@ export declare function noop(): void;
|
|
|
35
35
|
*
|
|
36
36
|
* @static
|
|
37
37
|
* @function isString
|
|
38
|
-
* @param
|
|
39
|
-
* @return
|
|
38
|
+
* @param obj - 要判断的对象
|
|
39
|
+
* @return
|
|
40
40
|
*/
|
|
41
|
-
export declare function isString(obj:
|
|
41
|
+
export declare function isString(obj: unknown): obj is string;
|
|
42
42
|
/**
|
|
43
43
|
* 判断对象是否是`Array`类型
|
|
44
44
|
*
|
|
45
45
|
* @static
|
|
46
46
|
* @function isArray
|
|
47
|
-
* @param
|
|
48
|
-
* @return
|
|
47
|
+
* @param obj - 要判断的对象
|
|
48
|
+
* @return
|
|
49
49
|
*/
|
|
50
50
|
export declare const isArray: (arg: any) => arg is any[];
|
|
51
51
|
/**
|
|
@@ -53,22 +53,27 @@ export declare const isArray: (arg: any) => arg is any[];
|
|
|
53
53
|
*
|
|
54
54
|
* @static
|
|
55
55
|
* @function isFunction
|
|
56
|
-
* @param
|
|
57
|
-
* @return
|
|
56
|
+
* @param obj - 要判断的对象
|
|
57
|
+
* @return
|
|
58
58
|
*/
|
|
59
|
-
export declare function isFunction(obj:
|
|
59
|
+
export declare function isFunction(obj: unknown): boolean;
|
|
60
60
|
/**
|
|
61
61
|
* 判断对象是否是`Object`类型
|
|
62
62
|
*
|
|
63
63
|
* @static
|
|
64
64
|
* @function isObject
|
|
65
|
-
* @param
|
|
66
|
-
* @return
|
|
65
|
+
* @param obj - 要判断的对象
|
|
66
|
+
* @return
|
|
67
67
|
*/
|
|
68
|
-
export declare function isObject(obj:
|
|
68
|
+
export declare function isObject(obj: unknown): obj is Record<string | symbol, unknown>;
|
|
69
69
|
export declare function isCanvas(canvas: HTMLCanvasElement): boolean;
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
/**
|
|
71
|
+
* 生成一个位于 min 和 max 之间的随机数
|
|
72
|
+
* @param min
|
|
73
|
+
* @param max
|
|
74
|
+
* @returns
|
|
75
|
+
*/
|
|
76
|
+
export declare function randomInRange(min: number, max: number): number;
|
|
72
77
|
export declare function throwDestroyedError(): void;
|
|
73
78
|
export declare function generateGUID(): string;
|
|
74
79
|
export declare function base64ToFile(base64: string, filename?: string, contentType?: string): File;
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
2
|
import * as spec from '@galacean/effects-specification';
|
|
3
3
|
import type { VFXItemData } from './asset-loader';
|
|
4
|
-
import type { Component } from './components';
|
|
5
|
-
import { RendererComponent, ItemBehaviour } from './components';
|
|
4
|
+
import type { Component, RendererComponent, ItemBehaviour } from './components';
|
|
6
5
|
import type { Composition } from './composition';
|
|
7
6
|
import { EffectsObject } from './effects-object';
|
|
8
7
|
import type { Engine } from './engine';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.17",
|
|
4
4
|
"description": "Galacean Effects runtime core for the web",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"registry": "https://registry.npmjs.org"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@galacean/effects-specification": "2.0.0-alpha.
|
|
45
|
+
"@galacean/effects-specification": "2.0.0-alpha.19",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"uuid": "9.0.1"
|
|
48
48
|
},
|