@galacean/effects-core 2.2.6 → 2.3.0-alpha.0
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/components/base-render-component.d.ts +10 -4
- package/dist/components/shape-component.d.ts +5 -2
- package/dist/composition.d.ts +62 -2
- package/dist/config.d.ts +11 -0
- package/dist/downloader.d.ts +15 -0
- package/dist/index.js +1605 -1020
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1605 -1021
- package/dist/index.mjs.map +1 -1
- package/dist/math/value-getters/index.d.ts +1 -1
- package/dist/math/value-getters/{vector4-curve.d.ts → vector-curves.d.ts} +8 -0
- package/dist/plugins/shape/build-line.d.ts +32 -0
- package/dist/plugins/shape/graphics-path.d.ts +0 -4
- package/dist/plugins/shape/polygon.d.ts +0 -4
- package/dist/plugins/shape/shape-path.d.ts +0 -4
- package/dist/plugins/timeline/playable-assets/index.d.ts +1 -1
- package/dist/plugins/timeline/playable-assets/{vector4-property-playable-asset.d.ts → vector-property-playable-assets.d.ts} +5 -1
- package/dist/plugins/timeline/playables/color-property-mixer-playable.d.ts +5 -5
- package/dist/plugins/timeline/playables/float-property-mixer-playable.d.ts +4 -5
- package/dist/plugins/timeline/playables/index.d.ts +1 -1
- package/dist/plugins/timeline/playables/property-mixer-playable.d.ts +9 -0
- package/dist/plugins/timeline/playables/vector-property-mixer-playable.d.ts +11 -0
- package/dist/plugins/timeline/tracks/index.d.ts +1 -1
- package/dist/plugins/timeline/tracks/{vector4-property-track.d.ts → vector-property-track.d.ts} +3 -0
- package/package.json +2 -2
- package/dist/plugins/timeline/playables/vector4-property-mixer-playable.d.ts +0 -6
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
1
2
|
import { Vector4 } from '@galacean/effects-math/es/core/vector4';
|
|
2
3
|
import { ValueGetter } from './value-getter';
|
|
3
4
|
import type * as spec from '@galacean/effects-specification';
|
|
@@ -10,3 +11,10 @@ export declare class Vector4Curve extends ValueGetter<Vector4> {
|
|
|
10
11
|
onCreate(arg: spec.Vector4CurveData): void;
|
|
11
12
|
getValue(t: number): Vector4;
|
|
12
13
|
}
|
|
14
|
+
export declare class Vector2Curve extends ValueGetter<Vector2> {
|
|
15
|
+
private value;
|
|
16
|
+
private xCurve;
|
|
17
|
+
private yCurve;
|
|
18
|
+
onCreate(arg: spec.Vector2CurveData): void;
|
|
19
|
+
getValue(t: number): Vector2;
|
|
20
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export type LineCap = 'butt' | 'round' | 'square';
|
|
2
|
+
export type LineJoin = 'round' | 'bevel' | 'miter';
|
|
3
|
+
export declare const closePointEps = 0.0001;
|
|
4
|
+
export declare const curveEps = 0.0001;
|
|
5
|
+
/**
|
|
6
|
+
* A stroke attribute object, used to define properties for a stroke.
|
|
7
|
+
*/
|
|
8
|
+
export interface StrokeAttributes {
|
|
9
|
+
/** The width of the stroke. */
|
|
10
|
+
width: number;
|
|
11
|
+
/** The alignment of the stroke. */
|
|
12
|
+
alignment: number;
|
|
13
|
+
/** The line cap style to use. */
|
|
14
|
+
cap: LineCap;
|
|
15
|
+
/** The line join style to use. */
|
|
16
|
+
join: LineJoin;
|
|
17
|
+
/** The miter limit to use. */
|
|
18
|
+
miterLimit: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Builds a line to draw using the polygon method.
|
|
22
|
+
* @param points
|
|
23
|
+
* @param lineStyle
|
|
24
|
+
* @param flipAlignment
|
|
25
|
+
* @param closed
|
|
26
|
+
* @param vertices
|
|
27
|
+
* @param _verticesStride
|
|
28
|
+
* @param _verticesOffset
|
|
29
|
+
* @param indices
|
|
30
|
+
* @param _indicesOffset
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildLine(points: number[], lineStyle: StrokeAttributes, flipAlignment: boolean, closed: boolean, vertices: number[], _verticesStride: number, _verticesOffset: number, indices: number[], _indicesOffset: number): void;
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Based on:
|
|
3
|
-
* https://github.com/pixijs/pixijs/blob/dev/src/scene/graphics/shared/path/GraphicsPath.ts
|
|
4
|
-
*/
|
|
5
1
|
import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
6
2
|
import { ShapePath } from './shape-path';
|
|
7
3
|
import type { StarType } from './poly-star';
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Based on:
|
|
3
|
-
* https://github.com/pixijs/pixijs/blob/dev/src/scene/graphics/shared/path/ShapePath.ts
|
|
4
|
-
*/
|
|
5
1
|
import type { Matrix4 } from '@galacean/effects-math/es/core/matrix4';
|
|
6
2
|
import { Polygon } from './polygon';
|
|
7
3
|
import type { GraphicsPath } from './graphics-path';
|
|
@@ -2,4 +2,4 @@ export * from './color-property-playable-asset';
|
|
|
2
2
|
export * from './float-property-playable-asset';
|
|
3
3
|
export * from './sub-composition-playable-asset';
|
|
4
4
|
export * from './timeline-asset';
|
|
5
|
-
export * from './
|
|
5
|
+
export * from './vector-property-playable-assets';
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
import * as spec from '@galacean/effects-specification';
|
|
1
2
|
import type { Playable, PlayableGraph } from '../../cal/playable-graph';
|
|
2
3
|
import { PlayableAsset } from '../../cal/playable-graph';
|
|
3
|
-
import type * as spec from '@galacean/effects-specification';
|
|
4
4
|
export declare class Vector4PropertyPlayableAsset extends PlayableAsset {
|
|
5
5
|
curveData: spec.Vector4CurveValue;
|
|
6
6
|
createPlayable(graph: PlayableGraph): Playable;
|
|
7
7
|
}
|
|
8
|
+
export declare class Vector2PropertyPlayableAsset extends PlayableAsset {
|
|
9
|
+
curveData: spec.Vector2CurveValue;
|
|
10
|
+
createPlayable(graph: PlayableGraph): Playable;
|
|
11
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
export declare class ColorPropertyMixerPlayable extends
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import type { Color } from '@galacean/effects-math/es/core/color';
|
|
2
|
+
import { PropertyMixerPlayable } from './property-mixer-playable';
|
|
3
|
+
export declare class ColorPropertyMixerPlayable extends PropertyMixerPlayable<Color> {
|
|
4
|
+
resetPropertyValue(): void;
|
|
5
|
+
addWeightedValue(curveValue: Color, weight: number): void;
|
|
6
6
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
evaluate(context: FrameContext): void;
|
|
1
|
+
import { PropertyMixerPlayable } from './property-mixer-playable';
|
|
2
|
+
export declare class FloatPropertyMixerPlayable extends PropertyMixerPlayable<number> {
|
|
3
|
+
resetPropertyValue(): void;
|
|
4
|
+
addWeightedValue(curveValue: number, weight: number): void;
|
|
6
5
|
}
|
|
@@ -8,4 +8,4 @@ export * from './sub-composition-clip-playable';
|
|
|
8
8
|
export * from './sub-composition-mixer-playable';
|
|
9
9
|
export * from './track-mixer-playable';
|
|
10
10
|
export * from './transform-mixer-playable';
|
|
11
|
-
export * from './
|
|
11
|
+
export * from './vector-property-mixer-playable';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
+
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
+
export declare abstract class PropertyMixerPlayable<T> extends TrackMixerPlayable {
|
|
4
|
+
propertyName: string;
|
|
5
|
+
propertyValue: T;
|
|
6
|
+
abstract resetPropertyValue(): void;
|
|
7
|
+
abstract addWeightedValue(curveValue: T, weight: number): void;
|
|
8
|
+
evaluate(context: FrameContext): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Vector2 } from '@galacean/effects-math/es/core/vector2';
|
|
2
|
+
import type { Vector4 } from '@galacean/effects-math/es/core/vector4';
|
|
3
|
+
import { PropertyMixerPlayable } from './property-mixer-playable';
|
|
4
|
+
export declare class Vector4PropertyMixerPlayable extends PropertyMixerPlayable<Vector4> {
|
|
5
|
+
resetPropertyValue(): void;
|
|
6
|
+
addWeightedValue(curveValue: Vector4, weight: number): void;
|
|
7
|
+
}
|
|
8
|
+
export declare class Vector2PropertyMixerPlayable extends PropertyMixerPlayable<Vector2> {
|
|
9
|
+
resetPropertyValue(): void;
|
|
10
|
+
addWeightedValue(curveValue: Vector2, weight: number): void;
|
|
11
|
+
}
|
|
@@ -6,5 +6,5 @@ export * from './transform-track';
|
|
|
6
6
|
export * from './material-track';
|
|
7
7
|
export * from './particle-track';
|
|
8
8
|
export * from './property-track';
|
|
9
|
-
export * from './
|
|
9
|
+
export * from './vector-property-track';
|
|
10
10
|
export * from './color-property-track';
|
package/dist/plugins/timeline/tracks/{vector4-property-track.d.ts → vector-property-track.d.ts}
RENAMED
|
@@ -4,3 +4,6 @@ import { PropertyTrack } from './property-track';
|
|
|
4
4
|
export declare class Vector4PropertyTrack extends PropertyTrack {
|
|
5
5
|
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
6
6
|
}
|
|
7
|
+
export declare class Vector2PropertyTrack extends PropertyTrack {
|
|
8
|
+
createTrackMixer(graph: PlayableGraph): TrackMixerPlayable;
|
|
9
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0-alpha.0",
|
|
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.
|
|
45
|
+
"@galacean/effects-specification": "2.2.0-alpha.2",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { FrameContext } from '../../cal/playable-graph';
|
|
2
|
-
import { TrackMixerPlayable } from './track-mixer-playable';
|
|
3
|
-
export declare class Vector4PropertyMixerPlayable extends TrackMixerPlayable {
|
|
4
|
-
propertyName: string;
|
|
5
|
-
evaluate(context: FrameContext): void;
|
|
6
|
-
}
|