@galacean/effects-core 2.1.0-alpha.7 → 2.1.0-alpha.9
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/effect-component.d.ts +2 -34
- package/dist/components/mesh-component.d.ts +18 -0
- package/dist/components/post-process-volume.d.ts +2 -3
- package/dist/components/shape-component.d.ts +4 -6
- package/dist/composition.d.ts +5 -3
- package/dist/index.js +2418 -2122
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2415 -2122
- package/dist/index.mjs.map +1 -1
- package/dist/math/index.d.ts +1 -1
- package/dist/math/translate.d.ts +1 -1
- package/dist/math/value-getters/color-curve.d.ts +12 -0
- package/dist/math/value-getters/index.d.ts +4 -0
- package/dist/math/value-getters/value-getter-map.d.ts +2 -0
- package/dist/math/{value-getter.d.ts → value-getters/value-getter.d.ts} +3 -4
- package/dist/math/value-getters/vector4-curve.d.ts +12 -0
- package/dist/plugins/cal/calculate-item.d.ts +1 -0
- package/dist/plugins/cal/playable-graph.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -0
- package/dist/plugins/interact/interact-item.d.ts +11 -0
- package/dist/plugins/interact/mesh-collider.d.ts +11 -0
- package/dist/plugins/shape/graphics-path.d.ts +27 -1
- package/dist/plugins/shape/rectangle.d.ts +129 -0
- package/dist/plugins/shape/triangle.d.ts +89 -0
- package/dist/plugins/timeline/playable-assets/color-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playable-assets/timeline-asset.d.ts +3 -0
- package/dist/plugins/timeline/playable-assets/vector4-property-playable-asset.d.ts +7 -0
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/playables/index.d.ts +3 -1
- package/dist/plugins/timeline/playables/{float-property-clip-playable.d.ts → property-clip-playable.d.ts} +3 -3
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +6 -0
- package/dist/plugins/timeline/track-instance.d.ts +14 -0
- package/dist/plugins/timeline/track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/color-property-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/float-property-track.d.ts +3 -5
- package/dist/plugins/timeline/tracks/index.d.ts +4 -0
- package/dist/plugins/timeline/tracks/material-track.d.ts +5 -0
- package/dist/plugins/timeline/tracks/property-track.d.ts +8 -0
- package/dist/plugins/timeline/tracks/sub-composition-track.d.ts +1 -1
- package/dist/plugins/timeline/tracks/vector4-property-track.d.ts +5 -0
- package/dist/render/index.d.ts +0 -1
- package/dist/render/render-frame.d.ts +5 -1
- package/dist/vfx-item.d.ts +0 -8
- package/package.json +2 -2
- package/dist/render/global-volume.d.ts +0 -17
package/dist/math/index.d.ts
CHANGED
package/dist/math/translate.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
2
2
|
import type { ItemLinearVelOverLifetime } from '../plugins';
|
|
3
|
-
import type { ValueGetter } from './value-
|
|
3
|
+
import type { ValueGetter } from './value-getters';
|
|
4
4
|
export declare function translatePoint(x: number, y: number): number[];
|
|
5
5
|
export interface TranslateTarget {
|
|
6
6
|
speedOverLifetime?: ValueGetter<number>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Color } from '@galacean/effects-math/es/core/color';
|
|
2
|
+
import { ValueGetter } from './value-getter';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
export declare class ColorCurve extends ValueGetter<Color> {
|
|
5
|
+
private value;
|
|
6
|
+
private rCurve;
|
|
7
|
+
private gCurve;
|
|
8
|
+
private bCurve;
|
|
9
|
+
private aCurve;
|
|
10
|
+
onCreate(arg: spec.ColorCurveData): void;
|
|
11
|
+
getValue(t: number): Color;
|
|
12
|
+
}
|
|
@@ -2,9 +2,9 @@ import type { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
|
2
2
|
import { Vector3 } from '@galacean/effects-math/es/core/vector3';
|
|
3
3
|
import { Quaternion } from '@galacean/effects-math/es/core/quaternion';
|
|
4
4
|
import * as spec from '@galacean/effects-specification';
|
|
5
|
-
import type { ColorStop } from '
|
|
6
|
-
import type { BezierEasing } from '
|
|
7
|
-
import { BezierPath, BezierQuat } from '
|
|
5
|
+
import type { ColorStop } from '../../utils';
|
|
6
|
+
import type { BezierEasing } from '../bezier';
|
|
7
|
+
import { BezierPath, BezierQuat } from '../bezier';
|
|
8
8
|
interface KeyFrameMeta {
|
|
9
9
|
curves: ValueGetter<any>[];
|
|
10
10
|
index: number;
|
|
@@ -145,7 +145,6 @@ export declare class BezierCurveQuat extends ValueGetter<Quaternion> {
|
|
|
145
145
|
getPercValue(curveKey: string, time: number): number;
|
|
146
146
|
getMaxTime(): number;
|
|
147
147
|
}
|
|
148
|
-
export declare function createValueGetter(args: any): ValueGetter<any>;
|
|
149
148
|
export declare function getKeyFrameMetaByRawValue(meta: KeyFrameMeta, value?: [type: spec.ValueType, value: any]): void;
|
|
150
149
|
export declare function createKeyFrameMeta(): {
|
|
151
150
|
curves: never[];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Vector4 } from '@galacean/effects-math/es/core/vector4';
|
|
2
|
+
import { ValueGetter } from './value-getter';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
export declare class Vector4Curve extends ValueGetter<Vector4> {
|
|
5
|
+
private value;
|
|
6
|
+
private xCurve;
|
|
7
|
+
private yCurve;
|
|
8
|
+
private zCurve;
|
|
9
|
+
private wCurve;
|
|
10
|
+
onCreate(arg: spec.Vector4CurveData): void;
|
|
11
|
+
getValue(t: number): Vector4;
|
|
12
|
+
}
|
|
@@ -81,7 +81,7 @@ export declare class PlayableOutput {
|
|
|
81
81
|
protected time: number;
|
|
82
82
|
private sourceOutputPort;
|
|
83
83
|
constructor();
|
|
84
|
-
|
|
84
|
+
setSourcePlayable(playable: Playable, port?: number): void;
|
|
85
85
|
getSourceOutputPort(): number;
|
|
86
86
|
setUserData(value: object): void;
|
|
87
87
|
getUserData(): object;
|
package/dist/plugins/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export * from './interact/interact-loader';
|
|
|
7
7
|
export * from './interact/interact-mesh';
|
|
8
8
|
export * from './interact/interact-vfx-item';
|
|
9
9
|
export * from './interact/interact-item';
|
|
10
|
+
export * from './interact/mesh-collider';
|
|
10
11
|
export * from './sprite/sprite-loader';
|
|
11
12
|
export * from './sprite/sprite-item';
|
|
12
13
|
export * from './sprite/sprite-mesh';
|
|
@@ -22,11 +22,22 @@ export declare class InteractComponent extends RendererComponent {
|
|
|
22
22
|
* 拖拽的距离映射系数,越大越容易拖动
|
|
23
23
|
*/
|
|
24
24
|
dragRatio: number[];
|
|
25
|
+
/**
|
|
26
|
+
* 拖拽X范围
|
|
27
|
+
*/
|
|
28
|
+
dragRange: {
|
|
29
|
+
dxRange: [min: number, max: number];
|
|
30
|
+
dyRange: [min: number, max: number];
|
|
31
|
+
};
|
|
25
32
|
/** 是否响应点击和拖拽交互事件 */
|
|
26
33
|
private _interactive;
|
|
27
34
|
private hasBeenAddedToComposition;
|
|
28
35
|
set interactive(enable: boolean);
|
|
29
36
|
get interactive(): boolean;
|
|
37
|
+
getDragRangeX(): [min: number, max: number];
|
|
38
|
+
setDragRangeX(min: number, max: number): void;
|
|
39
|
+
getDragRangeY(): [min: number, max: number];
|
|
40
|
+
setDragRangeY(min: number, max: number): void;
|
|
30
41
|
onStart(): void;
|
|
31
42
|
onUpdate(dt: number): void;
|
|
32
43
|
render(renderer: Renderer): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Geometry } from '../../render/geometry';
|
|
2
|
+
import type { BoundingBoxTriangle } from './click-handler';
|
|
3
|
+
import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
4
|
+
export declare class MeshCollider {
|
|
5
|
+
private boundingBoxData;
|
|
6
|
+
private geometry;
|
|
7
|
+
private triangles;
|
|
8
|
+
getBoundingBoxData(): BoundingBoxTriangle;
|
|
9
|
+
setGeometry(geometry: Geometry, worldMatrix?: Matrix4): void;
|
|
10
|
+
private geometryToTriangles;
|
|
11
|
+
}
|
|
@@ -27,8 +27,34 @@ export declare class GraphicsPath {
|
|
|
27
27
|
* @returns The instance of the current object for chaining.
|
|
28
28
|
*/
|
|
29
29
|
bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number, smoothness?: number): GraphicsPath;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the starting point for a new sub-path. Any subsequent drawing commands are considered part of this path.
|
|
32
|
+
* @param x - The x-coordinate for the starting point.
|
|
33
|
+
* @param y - The y-coordinate for the starting point.
|
|
34
|
+
* @returns The instance of the current object for chaining.
|
|
35
|
+
*/
|
|
30
36
|
moveTo(x: number, y: number): GraphicsPath;
|
|
31
|
-
|
|
37
|
+
/**
|
|
38
|
+
* Draws an ellipse at the specified location and with the given x and y radii.
|
|
39
|
+
* An optional transformation can be applied, allowing for rotation, scaling, and translation.
|
|
40
|
+
* @param x - The x-coordinate of the center of the ellipse.
|
|
41
|
+
* @param y - The y-coordinate of the center of the ellipse.
|
|
42
|
+
* @param radiusX - The horizontal radius of the ellipse.
|
|
43
|
+
* @param radiusY - The vertical radius of the ellipse.
|
|
44
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the ellipse. This can include rotations.
|
|
45
|
+
* @returns The instance of the current object for chaining.
|
|
46
|
+
*/
|
|
47
|
+
ellipse(x: number, y: number, radiusX: number, radiusY: number, transform?: Matrix4): this;
|
|
48
|
+
/**
|
|
49
|
+
* Draws a rectangle shape. This method adds a new rectangle path to the current drawing.
|
|
50
|
+
* @param x - The x-coordinate of the top-left corner of the rectangle.
|
|
51
|
+
* @param y - The y-coordinate of the top-left corner of the rectangle.
|
|
52
|
+
* @param w - The width of the rectangle.
|
|
53
|
+
* @param h - The height of the rectangle.
|
|
54
|
+
* @param transform - An optional `Matrix` object to apply a transformation to the rectangle.
|
|
55
|
+
* @returns The instance of the current object for chaining.
|
|
56
|
+
*/
|
|
57
|
+
rect(x: number, y: number, w: number, h: number, transform?: Matrix4): this;
|
|
32
58
|
clear(): GraphicsPath;
|
|
33
59
|
}
|
|
34
60
|
export interface PathInstruction {
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { ShapePrimitive } from './shape-primitive';
|
|
2
|
+
/**
|
|
3
|
+
* The `Rectangle` object is an area defined by its position, as indicated by its top-left corner
|
|
4
|
+
* point (`x`, `y`) and by its `width` and its `height`.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Rectangle extends ShapePrimitive {
|
|
7
|
+
/**
|
|
8
|
+
* The X coordinate of the upper-left corner of the rectangle
|
|
9
|
+
* @default 0
|
|
10
|
+
*/
|
|
11
|
+
x: number;
|
|
12
|
+
/**
|
|
13
|
+
* The Y coordinate of the upper-left corner of the rectangle
|
|
14
|
+
* @default 0
|
|
15
|
+
*/
|
|
16
|
+
y: number;
|
|
17
|
+
/**
|
|
18
|
+
* The overall width of this rectangle
|
|
19
|
+
* @default 0
|
|
20
|
+
*/
|
|
21
|
+
width: number;
|
|
22
|
+
/**
|
|
23
|
+
* The overall height of this rectangle
|
|
24
|
+
* @default 0
|
|
25
|
+
*/
|
|
26
|
+
height: number;
|
|
27
|
+
/**
|
|
28
|
+
* @param x - The X coordinate of the upper-left corner of the rectangle
|
|
29
|
+
* @param y - The Y coordinate of the upper-left corner of the rectangle
|
|
30
|
+
* @param width - The overall width of the rectangle
|
|
31
|
+
* @param height - The overall height of the rectangle
|
|
32
|
+
*/
|
|
33
|
+
constructor(x?: string | number, y?: string | number, width?: string | number, height?: string | number);
|
|
34
|
+
/** Returns the left edge of the rectangle. */
|
|
35
|
+
get left(): number;
|
|
36
|
+
/** Returns the right edge of the rectangle. */
|
|
37
|
+
get right(): number;
|
|
38
|
+
/** Returns the top edge of the rectangle. */
|
|
39
|
+
get top(): number;
|
|
40
|
+
/** Returns the bottom edge of the rectangle. */
|
|
41
|
+
get bottom(): number;
|
|
42
|
+
/** Determines whether the Rectangle is empty. */
|
|
43
|
+
isEmpty(): boolean;
|
|
44
|
+
/** A constant empty rectangle. This is a new object every time the property is accessed */
|
|
45
|
+
static get EMPTY(): Rectangle;
|
|
46
|
+
/**
|
|
47
|
+
* Creates a clone of this Rectangle
|
|
48
|
+
* @returns a copy of the rectangle
|
|
49
|
+
*/
|
|
50
|
+
clone(): Rectangle;
|
|
51
|
+
/**
|
|
52
|
+
* Converts a Bounds object to a Rectangle object.
|
|
53
|
+
* @param bounds - The bounds to copy and convert to a rectangle.
|
|
54
|
+
* @returns Returns itself.
|
|
55
|
+
*/
|
|
56
|
+
/**
|
|
57
|
+
* Copies another rectangle to this one.
|
|
58
|
+
* @param rectangle - The rectangle to copy from.
|
|
59
|
+
* @returns Returns itself.
|
|
60
|
+
*/
|
|
61
|
+
copyFrom(rectangle: Rectangle): Rectangle;
|
|
62
|
+
/**
|
|
63
|
+
* Copies this rectangle to another one.
|
|
64
|
+
* @param rectangle - The rectangle to copy to.
|
|
65
|
+
* @returns Returns given parameter.
|
|
66
|
+
*/
|
|
67
|
+
copyTo(rectangle: Rectangle): Rectangle;
|
|
68
|
+
/**
|
|
69
|
+
* Checks whether the x and y coordinates given are contained within this Rectangle
|
|
70
|
+
* @param x - The X coordinate of the point to test
|
|
71
|
+
* @param y - The Y coordinate of the point to test
|
|
72
|
+
* @returns Whether the x/y coordinates are within this Rectangle
|
|
73
|
+
*/
|
|
74
|
+
contains(x: number, y: number): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Checks whether the x and y coordinates given are contained within this rectangle including the stroke.
|
|
77
|
+
* @param x - The X coordinate of the point to test
|
|
78
|
+
* @param y - The Y coordinate of the point to test
|
|
79
|
+
* @param strokeWidth - The width of the line to check
|
|
80
|
+
* @returns Whether the x/y coordinates are within this rectangle
|
|
81
|
+
*/
|
|
82
|
+
strokeContains(x: number, y: number, strokeWidth: number): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Determines whether the `other` Rectangle transformed by `transform` intersects with `this` Rectangle object.
|
|
85
|
+
* Returns true only if the area of the intersection is >0, this means that Rectangles
|
|
86
|
+
* sharing a side are not overlapping. Another side effect is that an arealess rectangle
|
|
87
|
+
* (width or height equal to zero) can't intersect any other rectangle.
|
|
88
|
+
* @param {Rectangle} other - The Rectangle to intersect with `this`.
|
|
89
|
+
* @param {Matrix} transform - The transformation matrix of `other`.
|
|
90
|
+
* @returns {boolean} A value of `true` if the transformed `other` Rectangle intersects with `this`; otherwise `false`.
|
|
91
|
+
*/
|
|
92
|
+
/**
|
|
93
|
+
* Pads the rectangle making it grow in all directions.
|
|
94
|
+
* If paddingY is omitted, both paddingX and paddingY will be set to paddingX.
|
|
95
|
+
* @param paddingX - The horizontal padding amount.
|
|
96
|
+
* @param paddingY - The vertical padding amount.
|
|
97
|
+
* @returns Returns itself.
|
|
98
|
+
*/
|
|
99
|
+
pad(paddingX?: number, paddingY?: number): this;
|
|
100
|
+
/**
|
|
101
|
+
* Fits this rectangle around the passed one.
|
|
102
|
+
* @param rectangle - The rectangle to fit.
|
|
103
|
+
* @returns Returns itself.
|
|
104
|
+
*/
|
|
105
|
+
fit(rectangle: Rectangle): this;
|
|
106
|
+
/**
|
|
107
|
+
* Enlarges rectangle that way its corners lie on grid
|
|
108
|
+
* @param resolution - resolution
|
|
109
|
+
* @param eps - precision
|
|
110
|
+
* @returns Returns itself.
|
|
111
|
+
*/
|
|
112
|
+
ceil(resolution?: number, eps?: number): this;
|
|
113
|
+
/**
|
|
114
|
+
* Enlarges this rectangle to include the passed rectangle.
|
|
115
|
+
* @param rectangle - The rectangle to include.
|
|
116
|
+
* @returns Returns itself.
|
|
117
|
+
*/
|
|
118
|
+
enlarge(rectangle: Rectangle): this;
|
|
119
|
+
/**
|
|
120
|
+
* Returns the framing rectangle of the rectangle as a Rectangle object
|
|
121
|
+
* @param out - optional rectangle to store the result
|
|
122
|
+
* @returns The framing rectangle
|
|
123
|
+
*/
|
|
124
|
+
getBounds(out?: Rectangle): Rectangle;
|
|
125
|
+
getX(): number;
|
|
126
|
+
getY(): number;
|
|
127
|
+
build(points: number[]): number[];
|
|
128
|
+
triangulate(points: number[], vertices: number[], verticesOffset: number, indices: number[], indicesOffset: number): void;
|
|
129
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Rectangle } from './rectangle';
|
|
2
|
+
import { ShapePrimitive } from './shape-primitive';
|
|
3
|
+
/**
|
|
4
|
+
* A class to define a shape of a triangle via user defined coordinates.
|
|
5
|
+
*
|
|
6
|
+
* Create a `Triangle` object with the `x`, `y`, `x2`, `y2`, `x3`, `y3` properties.
|
|
7
|
+
*/
|
|
8
|
+
export declare class Triangle extends ShapePrimitive {
|
|
9
|
+
/**
|
|
10
|
+
* The X coord of the first point.
|
|
11
|
+
* @default 0
|
|
12
|
+
*/
|
|
13
|
+
x: number;
|
|
14
|
+
/**
|
|
15
|
+
* The Y coord of the first point.
|
|
16
|
+
* @default 0
|
|
17
|
+
*/
|
|
18
|
+
y: number;
|
|
19
|
+
/**
|
|
20
|
+
* The X coord of the second point.
|
|
21
|
+
* @default 0
|
|
22
|
+
*/
|
|
23
|
+
x2: number;
|
|
24
|
+
/**
|
|
25
|
+
* The Y coord of the second point.
|
|
26
|
+
* @default 0
|
|
27
|
+
*/
|
|
28
|
+
y2: number;
|
|
29
|
+
/**
|
|
30
|
+
* The X coord of the third point.
|
|
31
|
+
* @default 0
|
|
32
|
+
*/
|
|
33
|
+
x3: number;
|
|
34
|
+
/**
|
|
35
|
+
* The Y coord of the third point.
|
|
36
|
+
* @default 0
|
|
37
|
+
*/
|
|
38
|
+
y3: number;
|
|
39
|
+
/**
|
|
40
|
+
* @param x - The X coord of the first point.
|
|
41
|
+
* @param y - The Y coord of the first point.
|
|
42
|
+
* @param x2 - The X coord of the second point.
|
|
43
|
+
* @param y2 - The Y coord of the second point.
|
|
44
|
+
* @param x3 - The X coord of the third point.
|
|
45
|
+
* @param y3 - The Y coord of the third point.
|
|
46
|
+
*/
|
|
47
|
+
constructor(x?: number, y?: number, x2?: number, y2?: number, x3?: number, y3?: number);
|
|
48
|
+
/**
|
|
49
|
+
* Checks whether the x and y coordinates given are contained within this triangle
|
|
50
|
+
* @param x - The X coordinate of the point to test
|
|
51
|
+
* @param y - The Y coordinate of the point to test
|
|
52
|
+
* @returns Whether the x/y coordinates are within this Triangle
|
|
53
|
+
*/
|
|
54
|
+
contains(x: number, y: number): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Checks whether the x and y coordinates given are contained within this triangle including the stroke.
|
|
57
|
+
* @param pointX - The X coordinate of the point to test
|
|
58
|
+
* @param pointY - The Y coordinate of the point to test
|
|
59
|
+
* @param strokeWidth - The width of the line to check
|
|
60
|
+
* @returns Whether the x/y coordinates are within this triangle
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Creates a clone of this Triangle
|
|
64
|
+
* @returns a copy of the triangle
|
|
65
|
+
*/
|
|
66
|
+
clone(): ShapePrimitive;
|
|
67
|
+
/**
|
|
68
|
+
* Copies another triangle to this one.
|
|
69
|
+
* @param triangle - The triangle to copy from.
|
|
70
|
+
* @returns Returns itself.
|
|
71
|
+
*/
|
|
72
|
+
copyFrom(triangle: Triangle): this;
|
|
73
|
+
/**
|
|
74
|
+
* Copies this triangle to another one.
|
|
75
|
+
* @param triangle - The triangle to copy to.
|
|
76
|
+
* @returns Returns given parameter.
|
|
77
|
+
*/
|
|
78
|
+
copyTo(triangle: Triangle): Triangle;
|
|
79
|
+
/**
|
|
80
|
+
* Returns the framing rectangle of the triangle as a Rectangle object
|
|
81
|
+
* @param out - optional rectangle to store the result
|
|
82
|
+
* @returns The framing rectangle
|
|
83
|
+
*/
|
|
84
|
+
getBounds(out?: Rectangle): Rectangle;
|
|
85
|
+
getX(): number;
|
|
86
|
+
getY(): number;
|
|
87
|
+
build(points: number[]): void;
|
|
88
|
+
triangulate(points: number[], vertices: number[], verticesOffset: number, indices: number[], indicesOffset: number): void;
|
|
89
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Playable, PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import { PlayableAsset } from '../../cal/playable-graph';
|
|
3
|
+
import * as spec from '@galacean/effects-specification';
|
|
4
|
+
export declare class ColorPropertyPlayableAsset extends PlayableAsset {
|
|
5
|
+
curveData: spec.ColorCurveData;
|
|
6
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
7
|
+
}
|
|
@@ -3,6 +3,7 @@ import type { RuntimeClip, TrackAsset } from '../track';
|
|
|
3
3
|
import type { FrameContext, PlayableGraph } from '../../cal/playable-graph';
|
|
4
4
|
import { Playable, PlayableAsset } from '../../cal/playable-graph';
|
|
5
5
|
import type { Constructor } from '../../../utils';
|
|
6
|
+
import { TrackInstance } from '../track-instance';
|
|
6
7
|
export declare class TimelineAsset extends PlayableAsset {
|
|
7
8
|
tracks: TrackAsset[];
|
|
8
9
|
createPlayable(graph: PlayableGraph): Playable;
|
|
@@ -11,9 +12,11 @@ export declare class TimelineAsset extends PlayableAsset {
|
|
|
11
12
|
}
|
|
12
13
|
export declare class TimelinePlayable extends Playable {
|
|
13
14
|
clips: RuntimeClip[];
|
|
15
|
+
masterTrackInstances: TrackInstance[];
|
|
14
16
|
prepareFrame(context: FrameContext): void;
|
|
15
17
|
evaluate(): void;
|
|
16
18
|
compileTracks(graph: PlayableGraph, tracks: TrackAsset[]): void;
|
|
19
|
+
private updateTrackAnimatedObject;
|
|
17
20
|
private sortTracks;
|
|
18
21
|
private addSubTracksRecursive;
|
|
19
22
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Playable, PlayableGraph } from '../../cal/playable-graph';
|
|
2
|
+
import { PlayableAsset } from '../../cal/playable-graph';
|
|
3
|
+
import type * as spec from '@galacean/effects-specification';
|
|
4
|
+
export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
|
|
5
|
+
curveData: spec.Vector4CurveData;
|
|
6
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
7
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export * from './activation-mixer-playable';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './property-clip-playable';
|
|
3
3
|
export * from './float-property-mixer-playable';
|
|
4
4
|
export * from './sub-composition-clip-playable';
|
|
5
5
|
export * from './sub-composition-mixer-playable';
|
|
6
|
+
export * from './vector4-property-mixer-playable';
|
|
7
|
+
export * from './color-property-mixer-playable';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ValueGetter } from '../../../math';
|
|
2
2
|
import type { FrameContext } from '../../cal/playable-graph';
|
|
3
3
|
import { Playable } from '../../cal/playable-graph';
|
|
4
|
-
export declare class
|
|
5
|
-
value:
|
|
6
|
-
curve: ValueGetter<
|
|
4
|
+
export declare class PropertyClipPlayable<T> extends Playable {
|
|
5
|
+
value: T;
|
|
6
|
+
curve: ValueGetter<T>;
|
|
7
7
|
processFrame(context: FrameContext): void;
|
|
8
8
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Playable, PlayableOutput } from '../cal/playable-graph';
|
|
2
|
+
import type { TrackAsset } from './track';
|
|
3
|
+
/**
|
|
4
|
+
* A class that stores track assets and the generated mixer playables and playable outputs.
|
|
5
|
+
* It is used to query the corresponding playable object based on the track asset.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TrackInstance {
|
|
8
|
+
trackAsset: TrackAsset;
|
|
9
|
+
mixer: Playable;
|
|
10
|
+
output: PlayableOutput;
|
|
11
|
+
children: TrackInstance[];
|
|
12
|
+
constructor(trackAsset: TrackAsset, mixer: Playable, output: PlayableOutput);
|
|
13
|
+
addChild(trackInstance: TrackInstance): void;
|
|
14
|
+
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import type { PlayableGraph, Playable } from '../../cal/playable-graph';
|
|
2
|
-
import {
|
|
3
|
-
export declare class FloatPropertyTrack extends
|
|
4
|
-
path: string;
|
|
5
|
-
propertyName: string;
|
|
2
|
+
import { PropertyTrack } from './property-track';
|
|
3
|
+
export declare class FloatPropertyTrack extends PropertyTrack {
|
|
6
4
|
createTrackMixer(graph: PlayableGraph): Playable;
|
|
7
|
-
|
|
5
|
+
updateAnimatedObject(): void;
|
|
8
6
|
}
|
|
@@ -3,3 +3,7 @@ export * from './float-property-track';
|
|
|
3
3
|
export * from './sprite-color-track';
|
|
4
4
|
export * from './sub-composition-track';
|
|
5
5
|
export * from './transform-track';
|
|
6
|
+
export * from './material-track';
|
|
7
|
+
export * from './property-track';
|
|
8
|
+
export * from './vector4-property-track';
|
|
9
|
+
export * from './color-property-track';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { EffectsObjectData } from '@galacean/effects-specification';
|
|
2
|
+
import { TrackAsset } from '../track';
|
|
3
|
+
export declare class PropertyTrack extends TrackAsset {
|
|
4
|
+
protected propertyNames: string[];
|
|
5
|
+
private path;
|
|
6
|
+
updateAnimatedObject(): void;
|
|
7
|
+
fromData(data: EffectsObjectData): 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
|
-
|
|
4
|
+
updateAnimatedObject(): void;
|
|
5
5
|
createTrackMixer(graph: PlayableGraph): Playable;
|
|
6
6
|
}
|
package/dist/render/index.d.ts
CHANGED
|
@@ -128,6 +128,10 @@ export interface RenderFrameOptions {
|
|
|
128
128
|
* 后处理渲染配置
|
|
129
129
|
*/
|
|
130
130
|
globalVolume?: PostProcessVolume;
|
|
131
|
+
/**
|
|
132
|
+
* 后处理是否开启
|
|
133
|
+
*/
|
|
134
|
+
postProcessingEnabled?: boolean;
|
|
131
135
|
/**
|
|
132
136
|
* 名称
|
|
133
137
|
*/
|
|
@@ -165,7 +169,7 @@ export declare class RenderFrame implements Disposable {
|
|
|
165
169
|
/**
|
|
166
170
|
* 存放后处理的属性设置
|
|
167
171
|
*/
|
|
168
|
-
globalVolume
|
|
172
|
+
globalVolume?: PostProcessVolume;
|
|
169
173
|
renderer: Renderer;
|
|
170
174
|
resource: RenderFrameResource;
|
|
171
175
|
keepColorBuffer?: boolean;
|
package/dist/vfx-item.d.ts
CHANGED
|
@@ -28,8 +28,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
28
28
|
* 元素绑定的父元素,
|
|
29
29
|
* 1. 当元素没有绑定任何父元素时,parent为空,transform.parentTransform 为 composition.transform
|
|
30
30
|
* 2. 当元素绑定 nullItem 时,parent 为 nullItem, transform.parentTransform 为 nullItem.transform
|
|
31
|
-
* 3. 当元素绑定 TreeItem 的node时,parent为treeItem, transform.parentTransform 为 tree.nodes[i].transform(绑定的node节点上的transform)
|
|
32
|
-
* 4. 当元素绑定 TreeItem 本身时,行为表现和绑定 nullItem 相同
|
|
33
31
|
*/
|
|
34
32
|
parent?: VFXItem;
|
|
35
33
|
children: VFXItem[];
|
|
@@ -201,12 +199,6 @@ export declare class VFXItem extends EffectsObject implements Disposable {
|
|
|
201
199
|
* @returns 元素变换的拷贝
|
|
202
200
|
*/
|
|
203
201
|
getWorldTransform(transform?: Transform): Transform;
|
|
204
|
-
/**
|
|
205
|
-
* 获取元素内部节点的变换,目前只有场景树元素在使用
|
|
206
|
-
* @param itemId 元素id信息,如果带^就返回内部节点变换,否则返回自己的变换
|
|
207
|
-
* @returns 元素变换或内部节点变换
|
|
208
|
-
*/
|
|
209
|
-
getNodeTransform(itemId: string): Transform;
|
|
210
202
|
/**
|
|
211
203
|
* 设置元素在 3D 坐标轴上相对移动
|
|
212
204
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.1.0-alpha.
|
|
3
|
+
"version": "2.1.0-alpha.9",
|
|
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.1.0-alpha.
|
|
45
|
+
"@galacean/effects-specification": "2.1.0-alpha.1",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 后处理配置
|
|
3
|
-
*/
|
|
4
|
-
export interface PostProcessVolumeData {
|
|
5
|
-
useHDR: boolean;
|
|
6
|
-
useBloom: boolean;
|
|
7
|
-
threshold: number;
|
|
8
|
-
bloomIntensity: number;
|
|
9
|
-
brightness: number;
|
|
10
|
-
saturation: number;
|
|
11
|
-
contrast: number;
|
|
12
|
-
vignetteIntensity: number;
|
|
13
|
-
vignetteSmoothness: number;
|
|
14
|
-
vignetteRoundness: number;
|
|
15
|
-
useToneMapping: boolean;
|
|
16
|
-
}
|
|
17
|
-
export declare const defaultGlobalVolume: PostProcessVolumeData;
|