@galacean/effects-core 2.1.0-alpha.6 → 2.1.0-alpha.7
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/animation/color-playable.d.ts +26 -0
- package/dist/animation/index.d.ts +1 -0
- package/dist/asset-manager.d.ts +8 -1
- package/dist/asset.d.ts +4 -0
- package/dist/comp-vfx-item.d.ts +1 -4
- package/dist/components/base-render-component.d.ts +99 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/shape-component.d.ts +39 -5
- package/dist/composition/scene-ticking.d.ts +1 -1
- package/dist/composition-source-manager.d.ts +4 -5
- package/dist/composition.d.ts +2 -5
- package/dist/downloader.d.ts +0 -3
- package/dist/index.d.ts +3 -1
- package/dist/index.js +18820 -18200
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18818 -18200
- package/dist/index.mjs.map +1 -1
- package/dist/plugin-system.d.ts +7 -5
- package/dist/plugins/cal/calculate-item.d.ts +4 -3
- package/dist/plugins/cal/calculate-loader.d.ts +1 -1
- package/dist/plugins/cal/calculate-vfx-item.d.ts +1 -1
- package/dist/plugins/camera/camera-vfx-item-loader.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -7
- package/dist/plugins/interact/interact-loader.d.ts +1 -1
- package/dist/plugins/particle/particle-system.d.ts +1 -2
- package/dist/plugins/plugin.d.ts +14 -3
- package/dist/plugins/shape/ellipse.d.ts +79 -0
- package/dist/plugins/shape/graphics-path.d.ts +2 -0
- package/dist/plugins/shape/point-like.d.ts +31 -0
- package/dist/plugins/shape/point.d.ts +58 -0
- package/dist/plugins/shape/polygon.d.ts +12 -5
- package/dist/plugins/shape/shape-path.d.ts +25 -3
- package/dist/plugins/shape/shape-primitive.d.ts +18 -0
- package/dist/plugins/sprite/sprite-item.d.ts +17 -111
- package/dist/plugins/sprite/sprite-loader.d.ts +1 -1
- package/dist/plugins/sprite/sprite-mesh.d.ts +3 -4
- package/dist/plugins/text/text-item.d.ts +15 -5
- package/dist/plugins/timeline/index.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/index.d.ts +3 -0
- package/dist/plugins/{cal → timeline/playable-assets}/timeline-asset.d.ts +4 -4
- package/dist/plugins/timeline/playables/float-property-clip-playable.d.ts +8 -0
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/index.d.ts +5 -0
- package/dist/plugins/timeline/track.d.ts +4 -2
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +8 -0
- package/dist/plugins/timeline/tracks/index.d.ts +5 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +1 -1
- package/dist/render/mesh.d.ts +1 -1
- package/dist/render/renderer.d.ts +1 -1
- package/dist/render/semantic-map.d.ts +1 -1
- package/dist/serialization-helper.d.ts +3 -3
- package/dist/texture/texture.d.ts +9 -0
- package/dist/utils/color.d.ts +4 -5
- package/dist/utils/index.d.ts +1 -1
- package/dist/vfx-item.d.ts +0 -1
- package/package.json +1 -1
- package/dist/image-asset.d.ts +0 -5
- /package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts +0 -0
|
@@ -1,26 +1,36 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import type { Engine } from '../../engine';
|
|
3
|
-
import
|
|
4
|
-
import { SpriteComponent } from '../sprite/sprite-item';
|
|
3
|
+
import { Texture } from '../../texture';
|
|
5
4
|
import { TextLayout } from './text-layout';
|
|
6
5
|
import { TextStyle } from './text-style';
|
|
7
6
|
import type { Material } from '../../material';
|
|
8
7
|
import type { VFXItem } from '../../vfx-item';
|
|
8
|
+
import { BaseRenderComponent } from '../../components';
|
|
9
|
+
/**
|
|
10
|
+
* 用于创建 textItem 的数据类型, 经过处理后的 spec.TextContentOptions
|
|
11
|
+
*/
|
|
12
|
+
export interface TextItemProps extends Omit<spec.TextContent, 'renderer'> {
|
|
13
|
+
listIndex?: number;
|
|
14
|
+
renderer: {
|
|
15
|
+
mask: number;
|
|
16
|
+
texture: Texture;
|
|
17
|
+
} & Omit<spec.RendererOptions, 'texture'>;
|
|
18
|
+
}
|
|
9
19
|
export declare const DEFAULT_FONTS: string[];
|
|
10
20
|
export interface TextComponent extends TextComponentBase {
|
|
11
21
|
}
|
|
12
22
|
/**
|
|
13
23
|
* @since 2.0.0
|
|
14
24
|
*/
|
|
15
|
-
export declare class TextComponent extends
|
|
25
|
+
export declare class TextComponent extends BaseRenderComponent {
|
|
16
26
|
isDirty: boolean;
|
|
17
27
|
/**
|
|
18
28
|
* 文本行数
|
|
19
29
|
*/
|
|
20
30
|
lineCount: number;
|
|
21
|
-
constructor(engine: Engine, props?:
|
|
31
|
+
constructor(engine: Engine, props?: TextItemProps);
|
|
22
32
|
onUpdate(dt: number): void;
|
|
23
|
-
fromData(data:
|
|
33
|
+
fromData(data: TextItemProps): void;
|
|
24
34
|
updateWithOptions(options: spec.TextContentOptions): void;
|
|
25
35
|
updateTexture(flipY?: boolean): void;
|
|
26
36
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FixedNumberExpression } from '@galacean/effects-specification';
|
|
2
|
+
import type { Playable, PlayableGraph } from '../../cal/playable-graph';
|
|
3
|
+
import { PlayableAsset } from '../../cal/playable-graph';
|
|
4
|
+
export declare class FloatPropertyPlayableAsset extends PlayableAsset {
|
|
5
|
+
curveData: FixedNumberExpression;
|
|
6
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
7
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
|
-
import type { RuntimeClip, TrackAsset } from '../
|
|
3
|
-
import type { FrameContext, PlayableGraph } from '
|
|
4
|
-
import { Playable, PlayableAsset } from '
|
|
5
|
-
import type { Constructor } from '
|
|
2
|
+
import type { RuntimeClip, TrackAsset } from '../track';
|
|
3
|
+
import type { FrameContext, PlayableGraph } from '../../cal/playable-graph';
|
|
4
|
+
import { Playable, PlayableAsset } from '../../cal/playable-graph';
|
|
5
|
+
import type { Constructor } from '../../../utils';
|
|
6
6
|
export declare class TimelineAsset extends PlayableAsset {
|
|
7
7
|
tracks: TrackAsset[];
|
|
8
8
|
createPlayable(graph: PlayableGraph): Playable;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ValueGetter } from '../../../math';
|
|
2
|
+
import type { FrameContext } from '../../cal/playable-graph';
|
|
3
|
+
import { Playable } from '../../cal/playable-graph';
|
|
4
|
+
export declare class FloatPropertyClipPlayable extends Playable {
|
|
5
|
+
value: number;
|
|
6
|
+
curve: ValueGetter<number>;
|
|
7
|
+
processFrame(context: FrameContext): void;
|
|
8
|
+
}
|
|
@@ -21,7 +21,8 @@ export declare class TimelineClip {
|
|
|
21
21
|
*/
|
|
22
22
|
export declare class TrackAsset extends PlayableAsset {
|
|
23
23
|
name: string;
|
|
24
|
-
|
|
24
|
+
boundObject: object;
|
|
25
|
+
parent: TrackAsset;
|
|
25
26
|
trackType: TrackType;
|
|
26
27
|
private clipSeed;
|
|
27
28
|
private clips;
|
|
@@ -29,7 +30,7 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
29
30
|
/**
|
|
30
31
|
* 重写该方法以获取自定义对象绑定
|
|
31
32
|
*/
|
|
32
|
-
resolveBinding(
|
|
33
|
+
resolveBinding(): void;
|
|
33
34
|
/**
|
|
34
35
|
* 重写该方法以创建自定义混合器
|
|
35
36
|
*/
|
|
@@ -46,6 +47,7 @@ export declare class TrackAsset extends PlayableAsset {
|
|
|
46
47
|
findClip(name: string): TimelineClip | undefined;
|
|
47
48
|
addClip(clip: TimelineClip): void;
|
|
48
49
|
private createClipPlayable;
|
|
50
|
+
fromData(data: spec.EffectsObjectData): void;
|
|
49
51
|
}
|
|
50
52
|
export declare enum TrackType {
|
|
51
53
|
MasterTrack = 0,
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
2
|
+
import { TrackAsset } from '../track';
|
|
3
|
+
export declare class FloatPropertyTrack extends TrackAsset {
|
|
4
|
+
path: string;
|
|
5
|
+
propertyName: string;
|
|
6
|
+
createTrackMixer(graph: PlayableGraph): Playable;
|
|
7
|
+
resolveBinding(): void;
|
|
8
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TrackAsset } from '../track';
|
|
2
2
|
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
3
3
|
export declare class SubCompositionTrack extends TrackAsset {
|
|
4
|
-
resolveBinding(
|
|
4
|
+
resolveBinding(): void;
|
|
5
5
|
createTrackMixer(graph: PlayableGraph): Playable;
|
|
6
6
|
}
|
package/dist/render/mesh.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Material, MaterialDestroyOptions } from '../material';
|
|
|
4
4
|
import type { Geometry, Renderer } from '../render';
|
|
5
5
|
import type { Disposable } from '../utils';
|
|
6
6
|
import { DestroyOptions } from '../utils';
|
|
7
|
-
import { RendererComponent } from '../components
|
|
7
|
+
import { RendererComponent } from '../components';
|
|
8
8
|
export interface MeshOptionsBase {
|
|
9
9
|
material: Material;
|
|
10
10
|
name?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Matrix4, Vector4 } from '@galacean/effects-math/es/core/index';
|
|
2
|
-
import type { RendererComponent } from '../components
|
|
2
|
+
import type { RendererComponent } from '../components';
|
|
3
3
|
import type { Engine } from '../engine';
|
|
4
4
|
import type { Material } from '../material';
|
|
5
5
|
import type { LostHandler, RestoreHandler } from '../utils';
|
|
@@ -8,7 +8,7 @@ export declare class SemanticMap implements Disposable {
|
|
|
8
8
|
constructor(semantics?: Record<string, SemanticGetter>);
|
|
9
9
|
toObject(): Record<string, SemanticGetter>;
|
|
10
10
|
setSemantic(name: string, value?: SemanticGetter): void;
|
|
11
|
-
getSemanticValue(name: string, state: RenderingData):
|
|
11
|
+
getSemanticValue(name: string, state: RenderingData): UniformValue | undefined;
|
|
12
12
|
hasSemanticValue(name: string): boolean;
|
|
13
13
|
dispose(): void;
|
|
14
14
|
}
|
|
@@ -3,9 +3,9 @@ import { EffectsObject } from './effects-object';
|
|
|
3
3
|
export declare class SerializationHelper {
|
|
4
4
|
static collectSerializableObject(effectsObject: EffectsObject, res: Record<string, EffectsObject>): void;
|
|
5
5
|
static serializeEffectObject(effectsObject: EffectsObject): Record<string, any>;
|
|
6
|
-
static
|
|
7
|
-
static
|
|
8
|
-
static
|
|
6
|
+
static serialize(effectsObject: EffectsObject, serializedData?: Record<string, any>): Record<string, any>;
|
|
7
|
+
static deserialize(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): void;
|
|
8
|
+
static deserializeAsync(serializedData: spec.EffectsObjectData, effectsObject: EffectsObject): Promise<void>;
|
|
9
9
|
static checkTypedArray(obj: unknown): boolean;
|
|
10
10
|
static checkDataPath(value: unknown): value is spec.DataPath;
|
|
11
11
|
static checkGLTFNode(value: any): boolean;
|
|
@@ -37,6 +37,15 @@ export declare abstract class Texture extends EffectsObject {
|
|
|
37
37
|
* @since 2.0.0
|
|
38
38
|
*/
|
|
39
39
|
static fromImage(url: string, engine: Engine, options?: TextureOptionsBase): Promise<Texture>;
|
|
40
|
+
/**
|
|
41
|
+
* 通过视频 URL 创建 Texture 对象。
|
|
42
|
+
* @param url - 要创建的 Texture URL
|
|
43
|
+
* @param engine - 引擎对象
|
|
44
|
+
* @param options - 可选的 Texture 选项
|
|
45
|
+
* @since 2.1.0
|
|
46
|
+
* @returns
|
|
47
|
+
*/
|
|
48
|
+
static fromVideo(url: string, engine: Engine, options?: TextureOptionsBase): Promise<Texture>;
|
|
40
49
|
/**
|
|
41
50
|
* 通过数据创建 Texture 对象。
|
|
42
51
|
* @param data - 要创建的 Texture 数据
|
package/dist/utils/color.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
export type color = [r: number, g: number, b: number, a: number];
|
|
2
1
|
export interface ColorStop {
|
|
3
2
|
stop: number;
|
|
4
|
-
color:
|
|
3
|
+
color: number[];
|
|
5
4
|
}
|
|
6
|
-
export declare function colorToArr(hex: string | number[], normalized?: boolean):
|
|
7
|
-
export declare function getColorFromGradientStops(stops: ColorStop[], key: number, normalize?: boolean):
|
|
5
|
+
export declare function colorToArr(hex: string | number[], normalized?: boolean): number[];
|
|
6
|
+
export declare function getColorFromGradientStops(stops: ColorStop[], key: number, normalize?: boolean): number[];
|
|
8
7
|
export declare function colorStopsFromGradient(gradient: number[][] | Record<string, string | number[]>): ColorStop[];
|
|
9
|
-
export declare function interpolateColor(a:
|
|
8
|
+
export declare function interpolateColor(a: number[], b: number[], s: number, origin?: boolean): number[];
|
|
10
9
|
export declare function parsePercent(c: string): number;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const isArray: (arg: any) => arg is any[];
|
|
|
60
60
|
* @param obj - 要判断的对象
|
|
61
61
|
* @return
|
|
62
62
|
*/
|
|
63
|
-
export declare function isFunction(obj: unknown):
|
|
63
|
+
export declare function isFunction(obj: unknown): obj is Function;
|
|
64
64
|
/**
|
|
65
65
|
* 判断对象是否是`Object`类型
|
|
66
66
|
*
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -101,7 +101,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
101
101
|
static isNull(item: VFXItem): boolean;
|
|
102
102
|
static isTree(item: VFXItem): boolean;
|
|
103
103
|
static isCamera(item: VFXItem): boolean;
|
|
104
|
-
static isExtraCamera(item: VFXItem): boolean;
|
|
105
104
|
static isAncestor(ancestorCandidate: VFXItem, descendantCandidate: VFXItem): boolean;
|
|
106
105
|
constructor(engine: Engine, props?: VFXItemProps);
|
|
107
106
|
/**
|
package/package.json
CHANGED
package/dist/image-asset.d.ts
DELETED
/package/dist/plugins/timeline/{playables → playable-assets}/sub-composition-playable-asset.d.ts
RENAMED
|
File without changes
|