@galacean/effects-core 2.7.0-alpha.2 → 2.7.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/camera.d.ts +30 -0
- package/dist/components/shape-component.d.ts +4 -3
- package/dist/composition.d.ts +2 -5
- package/dist/effects-object.d.ts +1 -1
- package/dist/engine.d.ts +1 -1
- package/dist/index.js +384 -224
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +384 -224
- package/dist/index.mjs.map +1 -1
- package/dist/material/material.d.ts +0 -4
- package/dist/plugin-system.d.ts +3 -2
- package/dist/plugins/animation-graph/pose.d.ts +1 -1
- package/dist/plugins/animation-graph/skeleton.d.ts +1 -1
- package/dist/plugins/interact/interact-item.d.ts +25 -0
- package/dist/plugins/interact/interact-mesh.d.ts +1 -2
- package/dist/plugins/sprite/sprite-item.d.ts +1 -1
- package/dist/plugins/text/text-item.d.ts +2 -0
- package/dist/plugins/text/text-layout.d.ts +12 -0
- package/dist/render/index.d.ts +0 -1
- package/dist/render/render-frame.d.ts +0 -8
- package/dist/texture/texture.d.ts +0 -4
- package/dist/vfx-item.d.ts +7 -20
- package/package.json +2 -2
- package/dist/render/types.d.ts +0 -5
package/dist/camera.d.ts
CHANGED
|
@@ -42,6 +42,14 @@ export interface CameraOptions extends CameraOptionsBase {
|
|
|
42
42
|
* 相机的旋转,四元数
|
|
43
43
|
*/
|
|
44
44
|
quat?: spec.vec4;
|
|
45
|
+
/**
|
|
46
|
+
* 画布的像素宽度
|
|
47
|
+
*/
|
|
48
|
+
pixelWidth: number;
|
|
49
|
+
/**
|
|
50
|
+
* 画布的像素高度
|
|
51
|
+
*/
|
|
52
|
+
pixelHeight: number;
|
|
45
53
|
}
|
|
46
54
|
export interface CameraOptionsEx extends CameraOptionsBase {
|
|
47
55
|
/**
|
|
@@ -62,6 +70,14 @@ export interface CameraOptionsEx extends CameraOptionsBase {
|
|
|
62
70
|
*/
|
|
63
71
|
export declare class Camera {
|
|
64
72
|
name: string;
|
|
73
|
+
/**
|
|
74
|
+
* 画布的像素宽度
|
|
75
|
+
*/
|
|
76
|
+
pixelWidth: number;
|
|
77
|
+
/**
|
|
78
|
+
* 画布的像素高度
|
|
79
|
+
*/
|
|
80
|
+
pixelHeight: number;
|
|
65
81
|
/**
|
|
66
82
|
* 编辑器用于缩放画布
|
|
67
83
|
*/
|
|
@@ -202,5 +218,19 @@ export declare class Camera {
|
|
|
202
218
|
* 更新相机相关的矩阵,获取矩阵前会自动调用
|
|
203
219
|
*/
|
|
204
220
|
updateMatrix(): void;
|
|
221
|
+
/**
|
|
222
|
+
* 将世界坐标转换为屏幕像素坐标
|
|
223
|
+
* @param position - 世界坐标
|
|
224
|
+
* @param out - 输出的屏幕坐标,如果不传则创建新的 Vector3
|
|
225
|
+
* @returns 屏幕坐标 (x, y 为像素坐标,左下角为(0,0),右上角为(width,height),z 为深度比例 [0,1],0=近平面,1=远平面)
|
|
226
|
+
*/
|
|
227
|
+
worldToScreenPoint(position: Vector3, out?: Vector3): Vector3;
|
|
228
|
+
/**
|
|
229
|
+
* 将屏幕像素坐标转换为世界坐标
|
|
230
|
+
* @param position - 屏幕坐标 (x, y 为像素坐标,左下角为(0,0),z 为深度比例 [0,1],0=近平面,1=远平面)
|
|
231
|
+
* @param out - 输出的世界坐标,如果不传则创建新的 Vector3
|
|
232
|
+
* @returns 世界坐标
|
|
233
|
+
*/
|
|
234
|
+
screenToWorldPoint(position: Vector3, out?: Vector3): Vector3;
|
|
205
235
|
}
|
|
206
236
|
export {};
|
|
@@ -123,8 +123,6 @@ export interface PolygonAttribute extends ShapeAttributes {
|
|
|
123
123
|
* @since 2.1.0
|
|
124
124
|
*/
|
|
125
125
|
export declare class ShapeComponent extends RendererComponent implements Maskable {
|
|
126
|
-
private hasStroke;
|
|
127
|
-
private hasFill;
|
|
128
126
|
private shapeDirty;
|
|
129
127
|
private materialDirty;
|
|
130
128
|
private graphicsPath;
|
|
@@ -139,8 +137,10 @@ export declare class ShapeComponent extends RendererComponent implements Maskabl
|
|
|
139
137
|
* 用于点击测试的碰撞器
|
|
140
138
|
*/
|
|
141
139
|
private meshCollider;
|
|
142
|
-
private
|
|
140
|
+
private rendererOptions;
|
|
143
141
|
private geometry;
|
|
142
|
+
private fillMaterials;
|
|
143
|
+
private strokeMaterials;
|
|
144
144
|
private readonly maskManager;
|
|
145
145
|
get shape(): ShapeAttributes;
|
|
146
146
|
/**
|
|
@@ -159,6 +159,7 @@ export declare class ShapeComponent extends RendererComponent implements Maskabl
|
|
|
159
159
|
private updateMaterials;
|
|
160
160
|
private updatePaintMaterial;
|
|
161
161
|
private updateGradientMaterial;
|
|
162
|
+
private createMaterialFromRendererOptions;
|
|
162
163
|
fromData(data: spec.ShapeComponentData): void;
|
|
163
164
|
private createPaint;
|
|
164
165
|
onApplyAnimationProperties(): void;
|
package/dist/composition.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { Camera } from './camera';
|
|
|
5
5
|
import { CompositionComponent } from './comp-vfx-item';
|
|
6
6
|
import type { PluginSystem } from './plugin-system';
|
|
7
7
|
import type { EventSystem, Plugin, Region } from './plugins';
|
|
8
|
-
import type {
|
|
8
|
+
import type { Renderer } from './render';
|
|
9
9
|
import { RenderFrame } from './render';
|
|
10
10
|
import type { Scene } from './scene';
|
|
11
11
|
import type { Texture } from './texture';
|
|
@@ -215,7 +215,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
215
215
|
* 是否开启后处理
|
|
216
216
|
*/
|
|
217
217
|
postProcessingEnabled: boolean;
|
|
218
|
-
protected rendererOptions: MeshRendererOptions | null;
|
|
219
218
|
/**
|
|
220
219
|
* 销毁状态位
|
|
221
220
|
*/
|
|
@@ -359,7 +358,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
359
358
|
*/
|
|
360
359
|
update(deltaTime: number): void;
|
|
361
360
|
private shouldDispose;
|
|
362
|
-
private callAwake;
|
|
363
361
|
/**
|
|
364
362
|
* 更新相机
|
|
365
363
|
* @override
|
|
@@ -393,7 +391,7 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
393
391
|
*/
|
|
394
392
|
getEngine(): import("@galacean/effects-core").Engine;
|
|
395
393
|
/**
|
|
396
|
-
* Item 求交测试,返回求交结果列表,x 和 y 是归一化到[-1, 1]
|
|
394
|
+
* Item 求交测试,返回求交结果列表,x 和 y 是归一化到[-1, 1]区间的值,x 向右,y 向上
|
|
397
395
|
* @param x - 鼠标或触点的 x,已经归一化到[-1, 1]
|
|
398
396
|
* @param y - 鼠标或触点的 y,已经归一化到[-1, 1]
|
|
399
397
|
* @param force - 是否强制求交,没有交互信息的 Item 也要进行求交测试
|
|
@@ -458,7 +456,6 @@ export declare class Composition extends EventEmitter<CompositionEvent<Compositi
|
|
|
458
456
|
* 卸载贴图纹理方法,减少内存
|
|
459
457
|
*/
|
|
460
458
|
offloadTexture(): void;
|
|
461
|
-
getRendererOptions(): MeshRendererOptions;
|
|
462
459
|
/**
|
|
463
460
|
* 重新加载纹理
|
|
464
461
|
*/
|
package/dist/effects-object.d.ts
CHANGED