@galacean/effects-core 2.8.8 → 2.9.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/animation/animation-clip.d.ts +2 -0
- package/dist/animation/animation-events.d.ts +29 -0
- package/dist/animation/index.d.ts +1 -0
- package/dist/camera.d.ts +3 -17
- package/dist/components/base-render-component.d.ts +5 -8
- package/dist/components/component.d.ts +4 -0
- package/dist/components/composition-component.d.ts +2 -1
- package/dist/components/frame-component.d.ts +16 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/mesh-component.d.ts +5 -11
- package/dist/components/renderer-component.d.ts +11 -2
- package/dist/components/shape-component.d.ts +2 -6
- package/dist/composition/scene-ticking.d.ts +4 -0
- package/dist/composition.d.ts +2 -0
- package/dist/culling/bounding-box.d.ts +114 -0
- package/dist/engine.d.ts +2 -1
- package/dist/events/types.d.ts +11 -0
- package/dist/fallback/migration.d.ts +9 -8
- package/dist/fallback/utils.d.ts +0 -1
- package/dist/index.js +21872 -20185
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +21868 -20185
- package/dist/index.mjs.map +1 -1
- package/dist/material/mask-ref-manager.d.ts +1 -16
- package/dist/material/types.d.ts +14 -2
- package/dist/math/index.d.ts +6 -0
- package/dist/math/shape/circle.d.ts +196 -0
- package/dist/{plugins → math}/shape/graphics-path.d.ts +29 -1
- package/dist/{plugins → math}/shape/shape-path.d.ts +28 -0
- package/dist/math/utils.d.ts +20 -0
- package/dist/plugins/animation-graph/graph-context.d.ts +2 -0
- package/dist/plugins/animation-graph/graph-instance.d.ts +2 -0
- package/dist/plugins/animation-graph/nodes/animation-clip-node.d.ts +1 -0
- package/dist/plugins/index.d.ts +0 -6
- package/dist/plugins/interact/mesh-collider.d.ts +28 -5
- package/dist/plugins/particle/particle-system-renderer.d.ts +0 -2
- package/dist/plugins/particle/particle-system.d.ts +4 -3
- package/dist/plugins/particle/particle-vfx-item.d.ts +2 -3
- package/dist/plugins/text/text-component-base.d.ts +1 -15
- package/dist/plugins/text/text-item.d.ts +16 -13
- package/dist/plugins/text/text-layout.d.ts +4 -5
- package/dist/plugins/timeline/timeline-asset.d.ts +0 -1
- package/dist/plugins/timeline/track.d.ts +0 -3
- package/dist/render/graphics.d.ts +136 -0
- package/dist/render/index.d.ts +1 -0
- package/dist/render/render-frame.d.ts +1 -2
- package/package.json +2 -2
- /package/dist/{plugins → math}/shape/build-adaptive-bezier.d.ts +0 -0
- /package/dist/{plugins → math}/shape/build-line.d.ts +0 -0
- /package/dist/{plugins → math}/shape/ellipse.d.ts +0 -0
- /package/dist/{plugins → math}/shape/point-data.d.ts +0 -0
- /package/dist/{plugins → math}/shape/point-like.d.ts +0 -0
- /package/dist/{plugins → math}/shape/point.d.ts +0 -0
- /package/dist/{plugins → math}/shape/poly-star.d.ts +0 -0
- /package/dist/{plugins → math}/shape/polygon.d.ts +0 -0
- /package/dist/{plugins → math}/shape/rectangle.d.ts +0 -0
- /package/dist/{plugins → math}/shape/shape-primitive.d.ts +0 -0
- /package/dist/{plugins → math}/shape/triangle.d.ts +0 -0
- /package/dist/{plugins → math}/shape/triangulate.d.ts +0 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as spec from '@galacean/effects-specification';
|
|
2
2
|
import { Playable, PlayableAsset, PlayableOutput } from './playable';
|
|
3
|
-
import { ParticleSystem } from '../particle/particle-system';
|
|
4
3
|
import type { Constructor } from '../../utils';
|
|
5
4
|
import { TrackMixerPlayable } from './playables';
|
|
6
5
|
/**
|
|
@@ -56,10 +55,8 @@ export declare class RuntimeClip {
|
|
|
56
55
|
clip: TimelineClip;
|
|
57
56
|
playable: Playable;
|
|
58
57
|
parentMixer: TrackMixerPlayable;
|
|
59
|
-
private particleSystem;
|
|
60
58
|
constructor(clip: TimelineClip, clipPlayable: Playable, parentMixer: TrackMixerPlayable);
|
|
61
59
|
set enable(value: boolean);
|
|
62
|
-
getParticleSystem(): ParticleSystem;
|
|
63
60
|
evaluateAt(localTime: number): void;
|
|
64
61
|
}
|
|
65
62
|
/**
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { Color } from '@galacean/effects-math/es/core/color';
|
|
2
|
+
import { Matrix3 } from '@galacean/effects-math/es/core/matrix3';
|
|
3
|
+
import type { Engine } from '../engine';
|
|
4
|
+
export declare class Graphics {
|
|
5
|
+
private engine;
|
|
6
|
+
private geometry;
|
|
7
|
+
private material;
|
|
8
|
+
private graphicsPath;
|
|
9
|
+
private vertices;
|
|
10
|
+
private colors;
|
|
11
|
+
private indices;
|
|
12
|
+
private lineStyle;
|
|
13
|
+
private transformStack;
|
|
14
|
+
private currentTransform;
|
|
15
|
+
private get currentVertexCount();
|
|
16
|
+
private get currentIndexCount();
|
|
17
|
+
constructor(engine: Engine);
|
|
18
|
+
/**
|
|
19
|
+
* 清空缓冲区,准备新的绘制批次
|
|
20
|
+
*/
|
|
21
|
+
begin(): void;
|
|
22
|
+
/**
|
|
23
|
+
* 将当前变换压入栈,并设置新的变换
|
|
24
|
+
* @param transform - 新的变换矩阵(会与当前变换相乘)
|
|
25
|
+
*/
|
|
26
|
+
pushTransform(transform: Matrix3): void;
|
|
27
|
+
/**
|
|
28
|
+
* 恢复上一个变换
|
|
29
|
+
*/
|
|
30
|
+
popTransform(): void;
|
|
31
|
+
/**
|
|
32
|
+
* 刷新并渲染所有累积的绘制命令
|
|
33
|
+
*/
|
|
34
|
+
end(): void;
|
|
35
|
+
/**
|
|
36
|
+
* 线段顶点按顺序连接 (p0-p1, p1-p2, p2-p3, ...)
|
|
37
|
+
* @param points - 点数组,格式 [x1,y1,x2,y2,...],至少需要2个点(4个数值)
|
|
38
|
+
* @param color - 线条颜色,范围 0-1
|
|
39
|
+
* @param thickness - 线宽(像素)
|
|
40
|
+
*/
|
|
41
|
+
drawLines(points: number[], color?: Color, thickness?: number): void;
|
|
42
|
+
/**
|
|
43
|
+
* 绘制单条线段
|
|
44
|
+
* @param x1 - 起点x
|
|
45
|
+
* @param y1 - 起点y
|
|
46
|
+
* @param x2 - 终点x
|
|
47
|
+
* @param y2 - 终点y
|
|
48
|
+
* @param color - 线条颜色
|
|
49
|
+
* @param thickness - 线宽
|
|
50
|
+
*/
|
|
51
|
+
drawLine(x1: number, y1: number, x2: number, y2: number, color?: Color, thickness?: number): void;
|
|
52
|
+
/**
|
|
53
|
+
* 绘制贝塞尔曲线
|
|
54
|
+
* @param x1 - 起点x
|
|
55
|
+
* @param y1 - 起点y
|
|
56
|
+
* @param x2 - 控制点1x
|
|
57
|
+
* @param y2 - 控制点1y
|
|
58
|
+
* @param x3 - 控制点2x
|
|
59
|
+
* @param y3 - 控制点2y
|
|
60
|
+
* @param x4 - 终点x
|
|
61
|
+
* @param y4 - 终点y
|
|
62
|
+
* @param color - 线条颜色
|
|
63
|
+
* @param thickness - 线宽
|
|
64
|
+
*/
|
|
65
|
+
drawBezier(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, x4: number, y4: number, color?: Color, thickness?: number): void;
|
|
66
|
+
/**
|
|
67
|
+
* 绘制三角形边框
|
|
68
|
+
* @param x1 - 顶点1x
|
|
69
|
+
* @param y1 - 顶点1y
|
|
70
|
+
* @param x2 - 顶点2x
|
|
71
|
+
* @param y2 - 顶点2y
|
|
72
|
+
* @param x3 - 顶点3x
|
|
73
|
+
* @param y3 - 顶点3y
|
|
74
|
+
* @param color - 线条颜色
|
|
75
|
+
* @param thickness - 线宽
|
|
76
|
+
*/
|
|
77
|
+
drawTriangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, color?: Color, thickness?: number): void;
|
|
78
|
+
/**
|
|
79
|
+
* 绘制矩形边框
|
|
80
|
+
* @param x - 矩形左下角 X 坐标
|
|
81
|
+
* @param y - 矩形左下角 Y 坐标
|
|
82
|
+
* @param width - 矩形宽度
|
|
83
|
+
* @param height - 矩形高度
|
|
84
|
+
* @param color - 矩形颜色
|
|
85
|
+
*/
|
|
86
|
+
drawRectangle(x: number, y: number, width: number, height: number, color?: Color, thickness?: number): void;
|
|
87
|
+
/**
|
|
88
|
+
* 绘制圆形边框
|
|
89
|
+
* @param cx - 圆心x
|
|
90
|
+
* @param cy - 圆心y
|
|
91
|
+
* @param radius - 半径
|
|
92
|
+
* @param color - 线条颜色
|
|
93
|
+
* @param thickness - 线宽
|
|
94
|
+
*/
|
|
95
|
+
drawCircle(cx: number, cy: number, radius: number, color?: Color, thickness?: number): void;
|
|
96
|
+
/**
|
|
97
|
+
* 绘制填充三角形
|
|
98
|
+
* @param x1 - 顶点1x
|
|
99
|
+
* @param y1 - 顶点1y
|
|
100
|
+
* @param x2 - 顶点2x
|
|
101
|
+
* @param y2 - 顶点2y
|
|
102
|
+
* @param x3 - 顶点3x
|
|
103
|
+
* @param y3 - 顶点3y
|
|
104
|
+
* @param color - 填充颜色
|
|
105
|
+
*/
|
|
106
|
+
fillTriangle(x1: number, y1: number, x2: number, y2: number, x3: number, y3: number, color?: Color): void;
|
|
107
|
+
/**
|
|
108
|
+
* 绘制填充矩形
|
|
109
|
+
* @param x - 矩形左下角 X 坐标
|
|
110
|
+
* @param y - 矩形左下角 Y 坐标
|
|
111
|
+
* @param width - 矩形宽度
|
|
112
|
+
* @param height - 矩形高度
|
|
113
|
+
* @param color - 矩形颜色
|
|
114
|
+
*/
|
|
115
|
+
fillRectangle(x: number, y: number, width: number, height: number, color?: Color): void;
|
|
116
|
+
/**
|
|
117
|
+
* 绘制填充圆形
|
|
118
|
+
* @param cx - 圆心x
|
|
119
|
+
* @param cy - 圆心y
|
|
120
|
+
* @param radius - 半径
|
|
121
|
+
* @param color - 填充颜色
|
|
122
|
+
*/
|
|
123
|
+
fillCircle(cx: number, cy: number, radius: number, color?: Color): void;
|
|
124
|
+
dispose(): void;
|
|
125
|
+
private buildShape;
|
|
126
|
+
private buildShapeLine;
|
|
127
|
+
private applyTransformAndColor;
|
|
128
|
+
/**
|
|
129
|
+
* 应用自定义变换到点
|
|
130
|
+
* @param x - 点的 x 坐标
|
|
131
|
+
* @param y - 点的 y 坐标
|
|
132
|
+
* @param result - 变换结果存储数组
|
|
133
|
+
* @param offset - 存储数组的偏移位置
|
|
134
|
+
*/
|
|
135
|
+
private applyTransform;
|
|
136
|
+
}
|
package/dist/render/index.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare class RenderFrame implements Disposable {
|
|
|
61
61
|
/**
|
|
62
62
|
* 当前使用的全部 RenderPass
|
|
63
63
|
*/
|
|
64
|
-
|
|
64
|
+
renderPasses: RenderPass[];
|
|
65
65
|
/**
|
|
66
66
|
* 渲染时的相机
|
|
67
67
|
*/
|
|
@@ -82,7 +82,6 @@ export declare class RenderFrame implements Disposable {
|
|
|
82
82
|
private postProcessingEnabled;
|
|
83
83
|
private enableHDR;
|
|
84
84
|
constructor(options: RenderFrameOptions);
|
|
85
|
-
get renderPasses(): RenderPass[];
|
|
86
85
|
get isDisposed(): boolean;
|
|
87
86
|
/**
|
|
88
87
|
* 设置 RenderPasses 参数,此函数每帧调用一次
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-core",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.9.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.7.
|
|
45
|
+
"@galacean/effects-specification": "2.7.2",
|
|
46
46
|
"@galacean/effects-math": "1.1.0",
|
|
47
47
|
"flatbuffers": "24.3.25",
|
|
48
48
|
"uuid": "9.0.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|