@galacean/effects-core 2.6.6 → 2.7.0-alpha.1
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/animation-clip.d.ts +44 -0
- package/dist/animation/color-playable.d.ts +5 -5
- package/dist/animation/index.d.ts +1 -0
- package/dist/asset-manager.d.ts +8 -0
- package/dist/comp-vfx-item.d.ts +2 -6
- package/dist/components/animator.d.ts +30 -0
- package/dist/components/base-render-component.d.ts +4 -10
- package/dist/components/component.d.ts +4 -0
- package/dist/components/shape-component.d.ts +95 -16
- package/dist/composition.d.ts +0 -4
- package/dist/downloader.d.ts +6 -0
- package/dist/fallback/migration.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +12829 -12497
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12799 -12482
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +2 -8
- package/dist/math/translate.d.ts +7 -1
- package/dist/math/value-getters/bezier-curve.d.ts +1 -1
- package/dist/math/value-getters/value-getter.d.ts +1 -1
- package/dist/plugins/animation-graph/graph-data-set.d.ts +1 -1
- package/dist/plugins/animation-graph/graph-instance.d.ts +2 -0
- package/dist/plugins/animation-graph/nodes/animation-clip-node.d.ts +1 -1
- package/dist/plugins/animation-graph/nodes/state-machine-node.d.ts +11 -2
- package/dist/plugins/animation-graph/nodes/state-node.d.ts +1 -0
- package/dist/plugins/animation-graph/skeleton.d.ts +4 -2
- package/dist/plugins/index.d.ts +0 -2
- package/dist/plugins/particle/particle-vfx-item.d.ts +3 -3
- package/dist/plugins/shape/build-line.d.ts +0 -3
- package/dist/plugins/sprite/sprite-item.d.ts +24 -7
- package/dist/plugins/text/text-item.d.ts +2 -2
- package/dist/plugins/text/text-layout.d.ts +1 -0
- package/dist/plugins/timeline/index.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/activation-playable-asset.d.ts +5 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/float-property-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/index.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/sub-composition-playable-asset.d.ts +3 -3
- package/dist/plugins/timeline/playable-assets/vector-property-playable-assets.d.ts +8 -4
- package/dist/plugins/{cal/playable-graph.d.ts → timeline/playable.d.ts} +2 -21
- package/dist/plugins/timeline/playables/activation-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/activation-playable.d.ts +8 -0
- package/dist/plugins/timeline/playables/index.d.ts +2 -0
- package/dist/plugins/timeline/playables/particle-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/property-clip-playable.d.ts +2 -2
- package/dist/plugins/timeline/playables/property-mixer-playable.d.ts +6 -3
- package/dist/plugins/timeline/playables/sprite-color-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/sub-composition-clip-playable.d.ts +2 -2
- package/dist/plugins/timeline/playables/sub-composition-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/track-mixer-playable.d.ts +4 -2
- package/dist/plugins/timeline/playables/transform-mixer-playable.d.ts +1 -1
- package/dist/plugins/timeline/playables/transform-playable.d.ts +76 -0
- package/dist/plugins/timeline/playables/vector-property-mixer-playable.d.ts +5 -0
- package/dist/plugins/timeline/timeline-asset.d.ts +27 -0
- package/dist/plugins/timeline/track-instance.d.ts +5 -3
- package/dist/plugins/timeline/track.d.ts +10 -12
- package/dist/plugins/timeline/tracks/activation-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +1 -3
- package/dist/plugins/timeline/tracks/index.d.ts +1 -0
- package/dist/plugins/timeline/tracks/material-track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/object-binding-track.d.ts +9 -0
- package/dist/plugins/timeline/tracks/particle-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/property-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/sprite-color-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +2 -3
- package/dist/plugins/timeline/tracks/transform-track.d.ts +1 -2
- package/dist/plugins/timeline/tracks/vector-property-track.d.ts +5 -3
- package/dist/render/renderer.d.ts +1 -1
- package/dist/shader/index.d.ts +0 -3
- package/dist/utils/color.d.ts +3 -2
- package/dist/vfx-item.d.ts +0 -14
- package/package.json +2 -2
- package/dist/plugins/cal/animation-playable.d.ts +0 -7
- package/dist/plugins/cal/animation-stream.d.ts +0 -13
- package/dist/plugins/cal/calculate-item.d.ts +0 -28
- package/dist/plugins/cal/calculate-vfx-item.d.ts +0 -119
- package/dist/plugins/timeline/playable-assets/timeline-asset.d.ts +0 -32
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { Euler } from '@galacean/effects-math/es/core/euler';
|
|
2
|
+
import type { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
3
|
+
import * as spec from '@galacean/effects-specification';
|
|
4
|
+
import { EffectsObject } from '../effects-object';
|
|
5
|
+
import type { ValueGetter, Vector3Curve, BezierCurve, ColorCurve } from '../math';
|
|
6
|
+
import type { VFXItem } from '../vfx-item';
|
|
7
|
+
export interface AnimationCurve {
|
|
8
|
+
path: string;
|
|
9
|
+
keyFrames: ValueGetter<any>;
|
|
10
|
+
}
|
|
11
|
+
export interface PositionAnimationCurve extends AnimationCurve {
|
|
12
|
+
keyFrames: Vector3Curve;
|
|
13
|
+
}
|
|
14
|
+
export interface EulerAnimationCurve extends AnimationCurve {
|
|
15
|
+
keyFrames: ValueGetter<Euler>;
|
|
16
|
+
}
|
|
17
|
+
export interface RotationAnimationCurve extends AnimationCurve {
|
|
18
|
+
keyFrames: ValueGetter<Quaternion>;
|
|
19
|
+
}
|
|
20
|
+
export interface ScaleAnimationCurve extends AnimationCurve {
|
|
21
|
+
keyFrames: Vector3Curve;
|
|
22
|
+
}
|
|
23
|
+
export interface FloatAnimationCurve extends AnimationCurve {
|
|
24
|
+
property: string;
|
|
25
|
+
className: string;
|
|
26
|
+
keyFrames: BezierCurve;
|
|
27
|
+
}
|
|
28
|
+
export interface ColorAnimationCurve extends AnimationCurve {
|
|
29
|
+
property: string;
|
|
30
|
+
className: string;
|
|
31
|
+
keyFrames: ColorCurve;
|
|
32
|
+
}
|
|
33
|
+
export declare class AnimationClip extends EffectsObject {
|
|
34
|
+
duration: number;
|
|
35
|
+
positionCurves: PositionAnimationCurve[];
|
|
36
|
+
rotationCurves: RotationAnimationCurve[];
|
|
37
|
+
eulerCurves: EulerAnimationCurve[];
|
|
38
|
+
scaleCurves: ScaleAnimationCurve[];
|
|
39
|
+
floatCurves: FloatAnimationCurve[];
|
|
40
|
+
colorCurves: ColorAnimationCurve[];
|
|
41
|
+
sampleAnimation(vfxItem: VFXItem, time: number): void;
|
|
42
|
+
fromData(data: spec.AnimationClipData): void;
|
|
43
|
+
private findTarget;
|
|
44
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { type ValueGetter } from '../math';
|
|
3
|
-
import type { FrameContext } from '../plugins/
|
|
4
|
-
import { Playable } from '../plugins/
|
|
3
|
+
import type { FrameContext } from '../plugins/timeline/playable';
|
|
4
|
+
import { Playable } from '../plugins/timeline/playable';
|
|
5
5
|
import { VFXItem } from '../vfx-item';
|
|
6
6
|
import type { Material } from '../material';
|
|
7
7
|
import type { ColorStop } from '../utils';
|
|
8
|
-
import {
|
|
8
|
+
import { MaskableGraphic } from '../components';
|
|
9
9
|
export interface ColorPlayableAssetData extends spec.EffectsObjectData {
|
|
10
10
|
colorOverLifetime?: spec.ColorOverLifetime;
|
|
11
11
|
}
|
|
@@ -18,9 +18,9 @@ export declare class ColorPlayable extends Playable {
|
|
|
18
18
|
opacityOverLifetime: ValueGetter<number>;
|
|
19
19
|
startColor: spec.RGBAColorValue;
|
|
20
20
|
renderColor: spec.vec4;
|
|
21
|
-
activeComponent?:
|
|
21
|
+
activeComponent?: MaskableGraphic;
|
|
22
22
|
activeMaterial?: Material;
|
|
23
23
|
processFrame(context: FrameContext): void;
|
|
24
24
|
create(clipData: ColorPlayableAssetData): this;
|
|
25
|
-
getActiveComponent(boundObject: VFXItem):
|
|
25
|
+
getActiveComponent(boundObject: VFXItem): MaskableGraphic;
|
|
26
26
|
}
|
package/dist/asset-manager.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
1
2
|
import { Downloader } from './downloader';
|
|
2
3
|
import type { ImageLike, SceneLoadOptions } from './scene';
|
|
3
4
|
import { Scene } from './scene';
|
|
@@ -36,6 +37,13 @@ export declare class AssetManager implements Disposable {
|
|
|
36
37
|
* 场景加载的超时定时器
|
|
37
38
|
*/
|
|
38
39
|
private timers;
|
|
40
|
+
/**
|
|
41
|
+
* 字体加载方法
|
|
42
|
+
* @param fonts - 字体定义数组
|
|
43
|
+
* @param [baseURL=location.href] - URL 的 base 字段
|
|
44
|
+
* @returns
|
|
45
|
+
*/
|
|
46
|
+
static loadFontFamily(fonts: spec.FontDefine[], baseURL?: string): Promise<void[] | undefined>;
|
|
39
47
|
/**
|
|
40
48
|
* 构造函数
|
|
41
49
|
* @param options - 场景加载参数
|
package/dist/comp-vfx-item.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ray } from '@galacean/effects-math/es/core/ray';
|
|
2
|
-
import * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type * as spec from '@galacean/effects-specification';
|
|
3
3
|
import { Component } from './components';
|
|
4
4
|
import type { CompositionHitTestOptions } from './composition';
|
|
5
5
|
import type { Region, TrackAsset } from './plugins';
|
|
@@ -21,10 +21,8 @@ export declare class CompositionComponent extends Component {
|
|
|
21
21
|
private reusable;
|
|
22
22
|
private sceneBindings;
|
|
23
23
|
private timelineAsset;
|
|
24
|
-
private
|
|
25
|
-
private graph;
|
|
24
|
+
private timelineInstance;
|
|
26
25
|
onStart(): void;
|
|
27
|
-
setReusable(value: boolean): void;
|
|
28
26
|
getReusable(): boolean;
|
|
29
27
|
pause(): void;
|
|
30
28
|
resume(): void;
|
|
@@ -34,6 +32,4 @@ export declare class CompositionComponent extends Component {
|
|
|
34
32
|
onDestroy(): void;
|
|
35
33
|
hitTest(ray: Ray, x: number, y: number, regions: Region[], force?: boolean, options?: CompositionHitTestOptions): Region[];
|
|
36
34
|
fromData(data: any): void;
|
|
37
|
-
private resolveBindings;
|
|
38
|
-
private updateTrackAnimatedObject;
|
|
39
35
|
}
|
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
import type * as spec from '@galacean/effects-specification';
|
|
2
|
+
import type { StateMachineNode } from '../plugins/animation-graph';
|
|
2
3
|
import { Component } from './component.js';
|
|
3
4
|
/**
|
|
4
5
|
* @since 2.6.0
|
|
5
6
|
*/
|
|
6
7
|
export declare class Animator extends Component {
|
|
7
8
|
private graphAsset;
|
|
9
|
+
/**
|
|
10
|
+
* 设置布尔类型参数
|
|
11
|
+
* @param name - 参数名
|
|
12
|
+
* @param value - 参数值
|
|
13
|
+
* @since 2.7.0
|
|
14
|
+
*/
|
|
8
15
|
setBool(name: string, value: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* 设置浮点类型参数
|
|
18
|
+
* @param name - 参数名
|
|
19
|
+
* @param value - 参数值
|
|
20
|
+
* @since 2.7.0
|
|
21
|
+
*/
|
|
9
22
|
setFloat(name: string, value: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* 设置触发器参数
|
|
25
|
+
* @since 2.7.0
|
|
26
|
+
* @param name - 参数名
|
|
27
|
+
*/
|
|
10
28
|
setTrigger(name: string): void;
|
|
29
|
+
/**
|
|
30
|
+
* 重置触发器参数
|
|
31
|
+
* @since 2.7.0
|
|
32
|
+
* @param name - 参数名
|
|
33
|
+
*/
|
|
11
34
|
resetTrigger(name: string): void;
|
|
35
|
+
/**
|
|
36
|
+
* 获取状态机节点
|
|
37
|
+
* @param machineName - 状态机名称
|
|
38
|
+
* @since 2.7.0
|
|
39
|
+
* @returns 状态机节点
|
|
40
|
+
*/
|
|
41
|
+
getStateMachineNode(machineName: string): StateMachineNode | null;
|
|
12
42
|
onStart(): void;
|
|
13
43
|
onUpdate(dt: number): void;
|
|
14
44
|
fromData(data: spec.AnimatorData): void;
|
|
@@ -3,11 +3,10 @@ import * as spec from '@galacean/effects-specification';
|
|
|
3
3
|
import type { Engine } from '../engine';
|
|
4
4
|
import type { Maskable } from '../material';
|
|
5
5
|
import { MaskProcessor } from '../material';
|
|
6
|
-
import type { BoundingBoxTriangle, HitTestTriangleParams
|
|
6
|
+
import type { BoundingBoxTriangle, HitTestTriangleParams } from '../plugins';
|
|
7
7
|
import { MeshCollider } from '../plugins';
|
|
8
8
|
import type { Renderer } from '../render';
|
|
9
9
|
import { Geometry } from '../render';
|
|
10
|
-
import { type GeometryFromShape } from '../shape';
|
|
11
10
|
import { Texture } from '../texture';
|
|
12
11
|
import { RendererComponent } from './renderer-component';
|
|
13
12
|
/**
|
|
@@ -16,27 +15,24 @@ import { RendererComponent } from './renderer-component';
|
|
|
16
15
|
export interface ItemRenderer extends Required<Omit<spec.RendererOptions, 'texture' | 'shape' | 'anchor' | 'particleOrigin' | 'mask'>> {
|
|
17
16
|
texture: Texture;
|
|
18
17
|
mask: number;
|
|
19
|
-
shape?: GeometryFromShape;
|
|
20
18
|
}
|
|
21
19
|
/**
|
|
22
|
-
* @since 2.
|
|
20
|
+
* @since 2.7.0
|
|
23
21
|
*/
|
|
24
|
-
export declare class
|
|
22
|
+
export declare class MaskableGraphic extends RendererComponent implements Maskable {
|
|
25
23
|
interaction?: {
|
|
26
24
|
behavior: spec.InteractBehavior;
|
|
27
25
|
};
|
|
28
26
|
renderer: ItemRenderer;
|
|
29
27
|
geometry: Geometry;
|
|
30
28
|
protected visible: boolean;
|
|
31
|
-
protected splits: splitsDataType;
|
|
32
|
-
protected textureSheetAnimation?: spec.TextureSheetAnimation;
|
|
33
29
|
protected readonly maskManager: MaskProcessor;
|
|
34
30
|
/**
|
|
35
31
|
* 用于点击测试的碰撞器
|
|
36
32
|
*/
|
|
37
33
|
protected meshCollider: MeshCollider;
|
|
34
|
+
protected defaultGeometry: Geometry;
|
|
38
35
|
private _color;
|
|
39
|
-
private defaultGeometry;
|
|
40
36
|
/**
|
|
41
37
|
*
|
|
42
38
|
* @param engine
|
|
@@ -93,8 +89,6 @@ export declare class BaseRenderComponent extends RendererComponent implements Ma
|
|
|
93
89
|
onStart(): void;
|
|
94
90
|
getHitTestParams: (force?: boolean) => HitTestTriangleParams | undefined;
|
|
95
91
|
getBoundingBox(): BoundingBoxTriangle;
|
|
96
|
-
private getItemGeometryData;
|
|
97
|
-
private configureDefaultGeometry;
|
|
98
92
|
private configureMaterial;
|
|
99
93
|
private draw;
|
|
100
94
|
fromData(data: unknown): void;
|
|
@@ -51,6 +51,10 @@ export declare abstract class Component extends EffectsObject {
|
|
|
51
51
|
* 生命周期函数,在组件销毁时调用
|
|
52
52
|
*/
|
|
53
53
|
onDestroy(): void;
|
|
54
|
+
/**
|
|
55
|
+
* 当属性被动画修改时调用
|
|
56
|
+
*/
|
|
57
|
+
onApplyAnimationProperties(): void;
|
|
54
58
|
setVFXItem(item: VFXItem): void;
|
|
55
59
|
fromData(data: any): void;
|
|
56
60
|
dispose(): void;
|
|
@@ -1,20 +1,53 @@
|
|
|
1
|
+
import { Color } from '@galacean/effects-math/es/core/color';
|
|
2
|
+
import { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
1
3
|
import * as spec from '@galacean/effects-specification';
|
|
2
4
|
import type { Engine } from '../engine';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
+
import type { Maskable } from '../material';
|
|
6
|
+
import type { BoundingBoxTriangle, HitTestTriangleParams } from '../plugins';
|
|
7
|
+
import type { Renderer } from '../render';
|
|
8
|
+
import type { GradientValue } from '../math';
|
|
9
|
+
import { RendererComponent } from './renderer-component';
|
|
10
|
+
import type { Texture } from '../texture/texture';
|
|
11
|
+
export declare enum FillType {
|
|
12
|
+
Solid = 0,
|
|
13
|
+
GradientLinear = 1,
|
|
14
|
+
GradientRadial = 2,
|
|
15
|
+
GradientAngular = 3,
|
|
16
|
+
Texture = 4
|
|
17
|
+
}
|
|
18
|
+
export interface SolidPaint {
|
|
19
|
+
type: FillType.Solid;
|
|
20
|
+
color: Color;
|
|
21
|
+
}
|
|
22
|
+
export interface GradientPaint {
|
|
23
|
+
type: FillType.GradientLinear | FillType.GradientAngular | FillType.GradientRadial;
|
|
24
|
+
gradientStops: GradientValue;
|
|
25
|
+
startPoint: Vector2;
|
|
26
|
+
endPoint: Vector2;
|
|
27
|
+
}
|
|
28
|
+
export interface TexturePaint {
|
|
29
|
+
type: FillType.Texture;
|
|
30
|
+
texture: Texture;
|
|
31
|
+
scaleMode: TexturePaintScaleMode;
|
|
32
|
+
scalingFactor: number;
|
|
33
|
+
opacity: number;
|
|
34
|
+
}
|
|
35
|
+
export declare enum TexturePaintScaleMode {
|
|
36
|
+
Fill = 0,
|
|
37
|
+
Fit = 1,
|
|
38
|
+
Crop = 2,
|
|
39
|
+
Tile = 3
|
|
40
|
+
}
|
|
41
|
+
interface ShapeAttributes {
|
|
5
42
|
/**
|
|
6
43
|
* 矢量图形类型
|
|
7
44
|
*/
|
|
8
45
|
type: spec.ShapePrimitiveType;
|
|
9
|
-
/**
|
|
10
|
-
* 填充属性
|
|
11
|
-
*/
|
|
12
|
-
fill?: spec.ShapeFillParam;
|
|
13
46
|
}
|
|
14
47
|
/**
|
|
15
48
|
* 椭圆组件参数
|
|
16
49
|
*/
|
|
17
|
-
export interface EllipseAttribute extends
|
|
50
|
+
export interface EllipseAttribute extends ShapeAttributes {
|
|
18
51
|
type: spec.ShapePrimitiveType.Ellipse;
|
|
19
52
|
/**
|
|
20
53
|
* x 轴半径
|
|
@@ -30,7 +63,7 @@ export interface EllipseAttribute extends ShapeAttribute {
|
|
|
30
63
|
/**
|
|
31
64
|
* 矩形参数
|
|
32
65
|
*/
|
|
33
|
-
export interface RectangleAttribute extends
|
|
66
|
+
export interface RectangleAttribute extends ShapeAttributes {
|
|
34
67
|
/**
|
|
35
68
|
* 宽度
|
|
36
69
|
*/
|
|
@@ -47,7 +80,7 @@ export interface RectangleAttribute extends ShapeAttribute {
|
|
|
47
80
|
/**
|
|
48
81
|
* 星形参数
|
|
49
82
|
*/
|
|
50
|
-
export interface StarAttribute extends
|
|
83
|
+
export interface StarAttribute extends ShapeAttributes {
|
|
51
84
|
/**
|
|
52
85
|
* 顶点数 - 内外顶点同数
|
|
53
86
|
*/
|
|
@@ -72,7 +105,7 @@ export interface StarAttribute extends ShapeAttribute {
|
|
|
72
105
|
/**
|
|
73
106
|
* 多边形参数
|
|
74
107
|
*/
|
|
75
|
-
export interface PolygonAttribute extends
|
|
108
|
+
export interface PolygonAttribute extends ShapeAttributes {
|
|
76
109
|
/**
|
|
77
110
|
* 顶点数
|
|
78
111
|
*/
|
|
@@ -90,17 +123,24 @@ export interface PolygonAttribute extends ShapeAttribute {
|
|
|
90
123
|
* 图形组件
|
|
91
124
|
* @since 2.1.0
|
|
92
125
|
*/
|
|
93
|
-
export declare class ShapeComponent extends
|
|
126
|
+
export declare class ShapeComponent extends RendererComponent implements Maskable {
|
|
94
127
|
private hasStroke;
|
|
95
128
|
private hasFill;
|
|
96
129
|
private shapeDirty;
|
|
130
|
+
private materialDirty;
|
|
97
131
|
private graphicsPath;
|
|
98
|
-
private
|
|
132
|
+
private fills;
|
|
99
133
|
private strokeAttributes;
|
|
100
|
-
private
|
|
101
|
-
private
|
|
102
|
-
|
|
103
|
-
|
|
134
|
+
private strokes;
|
|
135
|
+
private shapeAttributes;
|
|
136
|
+
/**
|
|
137
|
+
* 用于点击测试的碰撞器
|
|
138
|
+
*/
|
|
139
|
+
private meshCollider;
|
|
140
|
+
private renderer;
|
|
141
|
+
private geometry;
|
|
142
|
+
private readonly maskManager;
|
|
143
|
+
get shape(): ShapeAttributes;
|
|
104
144
|
/**
|
|
105
145
|
*
|
|
106
146
|
* @param engine
|
|
@@ -108,8 +148,47 @@ export declare class ShapeComponent extends BaseRenderComponent {
|
|
|
108
148
|
constructor(engine: Engine);
|
|
109
149
|
onStart(): void;
|
|
110
150
|
onUpdate(dt: number): void;
|
|
151
|
+
render(renderer: Renderer): void;
|
|
152
|
+
private draw;
|
|
153
|
+
getHitTestParams: (force?: boolean) => HitTestTriangleParams | undefined;
|
|
154
|
+
getBoundingBox(): BoundingBoxTriangle;
|
|
111
155
|
private buildGeometryFromPath;
|
|
112
156
|
private buildPath;
|
|
157
|
+
private updateMaterials;
|
|
158
|
+
private updatePaintMaterial;
|
|
159
|
+
private updateGradientMaterial;
|
|
113
160
|
fromData(data: spec.ShapeComponentData): void;
|
|
161
|
+
private createPaint;
|
|
162
|
+
onApplyAnimationProperties(): void;
|
|
163
|
+
}
|
|
164
|
+
export type PaintData = SolidPaintData | GradientPaintData | TexturePaintData;
|
|
165
|
+
export interface SolidPaintData {
|
|
166
|
+
type: FillType.Solid;
|
|
167
|
+
/**
|
|
168
|
+
* 填充颜色
|
|
169
|
+
*/
|
|
170
|
+
color: spec.ColorData;
|
|
171
|
+
}
|
|
172
|
+
export interface GradientPaintData {
|
|
173
|
+
type: FillType.GradientLinear | FillType.GradientAngular | FillType.GradientRadial;
|
|
174
|
+
/**
|
|
175
|
+
* 渐变颜色
|
|
176
|
+
*/
|
|
177
|
+
gradientStops: spec.GradientColor;
|
|
178
|
+
/**
|
|
179
|
+
* 渐变起点
|
|
180
|
+
*/
|
|
181
|
+
startPoint: spec.Vector2Data;
|
|
182
|
+
/**
|
|
183
|
+
* 渐变终点
|
|
184
|
+
*/
|
|
185
|
+
endPoint: spec.Vector2Data;
|
|
186
|
+
}
|
|
187
|
+
export interface TexturePaintData {
|
|
188
|
+
type: FillType.Texture;
|
|
189
|
+
texture: spec.DataPath;
|
|
190
|
+
scaleMode: TexturePaintScaleMode;
|
|
191
|
+
scalingFactor?: number;
|
|
192
|
+
opacity?: number;
|
|
114
193
|
}
|
|
115
194
|
export {};
|
package/dist/composition.d.ts
CHANGED
|
@@ -146,10 +146,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
146
146
|
* 播放完成后是否需要再使用,是的话生命周期结束后不会自动 dispose
|
|
147
147
|
*/
|
|
148
148
|
reusable: boolean;
|
|
149
|
-
/**
|
|
150
|
-
* 是否播放完成后销毁 texture 对象
|
|
151
|
-
*/
|
|
152
|
-
keepResource: boolean;
|
|
153
149
|
/**
|
|
154
150
|
* 合成内的元素否允许点击、拖拽交互
|
|
155
151
|
* @since 1.6.0
|
package/dist/downloader.d.ts
CHANGED
|
@@ -21,6 +21,12 @@ export type JSONValue = string | number | boolean | {
|
|
|
21
21
|
* 负责下载各种资源,并提供了一些异步加载和缓存管理的功能
|
|
22
22
|
*/
|
|
23
23
|
export declare class Downloader {
|
|
24
|
+
/**
|
|
25
|
+
* 是否信任 XMLHttpRequest 的状态码为 0 的响应
|
|
26
|
+
* 某些浏览器在本地文件协议(file://)下会返回状态码 0,但实际上请求是成功的
|
|
27
|
+
* 设置为 true 可以让 Downloader 将状态码 0 视为成功
|
|
28
|
+
*/
|
|
29
|
+
static trustXHRStatusZero: boolean;
|
|
24
30
|
/**
|
|
25
31
|
* 存储多个回调函数的对象
|
|
26
32
|
*/
|
|
@@ -15,6 +15,7 @@ export declare function version22Migration(json: JSONSceneLegacy): JSONSceneLega
|
|
|
15
15
|
export declare function version31Migration(json: JSONScene): JSONScene;
|
|
16
16
|
export declare function version32Migration(json: JSONScene): JSONScene;
|
|
17
17
|
export declare function version33Migration(json: JSONScene): JSONScene;
|
|
18
|
+
export declare function version34Migration(json: JSONScene): JSONScene;
|
|
18
19
|
export declare function processContent(composition: spec.CompositionData): void;
|
|
19
20
|
export declare function processMask(renderContent: any): void;
|
|
20
21
|
/**
|
package/dist/index.d.ts
CHANGED