@galacean/effects-core 2.8.0-alpha.0 → 2.8.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/index.js +89 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +89 -76
- package/dist/index.mjs.map +1 -1
- package/dist/plugins/text/text-component-base.d.ts +4 -0
- package/dist/plugins/text/text-item.d.ts +5 -2
- package/dist/render/draw-object-pass.d.ts +1 -0
- package/dist/render/render-pass.d.ts +4 -64
- package/package.json +1 -1
|
@@ -40,6 +40,10 @@ export declare class TextComponentBase {
|
|
|
40
40
|
setText(value: string): void;
|
|
41
41
|
setTextAlign(value: spec.TextAlignment): void;
|
|
42
42
|
setTextVerticalAlign(value: spec.TextVerticalAlign): void;
|
|
43
|
+
/**
|
|
44
|
+
* @deprecated 2.8.0 本方法已废弃,请使用 setTextVerticalAlign 替代。
|
|
45
|
+
*/
|
|
46
|
+
setTextBaseline(value: spec.TextBaseline): void;
|
|
43
47
|
setTextColor(value: spec.RGBAColorValue): void;
|
|
44
48
|
setFontFamily(value: string): void;
|
|
45
49
|
setFontWeight(value: spec.TextWeight): void;
|
|
@@ -33,7 +33,10 @@ export declare class TextComponent extends MaskableGraphic implements ITextCompo
|
|
|
33
33
|
fromData(data: spec.TextComponentData): void;
|
|
34
34
|
private resetState;
|
|
35
35
|
setText(value: string): void;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 根据配置更新文本样式和布局
|
|
38
|
+
*/
|
|
39
|
+
protected updateWithOptions(options: spec.TextContentOptions): void;
|
|
37
40
|
getLineCount(text: string): number;
|
|
38
41
|
/**
|
|
39
42
|
* 设置行高
|
|
@@ -82,7 +85,7 @@ export declare class TextComponent extends MaskableGraphic implements ITextCompo
|
|
|
82
85
|
* 更新文本
|
|
83
86
|
* @returns
|
|
84
87
|
*/
|
|
85
|
-
updateTexture(flipY?: boolean): void;
|
|
88
|
+
protected updateTexture(flipY?: boolean): void;
|
|
86
89
|
renderText(options: spec.TextContentOptions): void;
|
|
87
90
|
setAutoWidth(value: boolean): void;
|
|
88
91
|
setFontSize(value: number): void;
|
|
@@ -3,6 +3,7 @@ import { RenderPass } from './render-pass';
|
|
|
3
3
|
import type { Renderer } from './renderer';
|
|
4
4
|
export declare class DrawObjectPass extends RenderPass {
|
|
5
5
|
constructor(renderer: Renderer, options: RenderPassOptions);
|
|
6
|
+
execute(renderer: Renderer): void;
|
|
6
7
|
onResize(): void;
|
|
7
8
|
dispose(options?: RenderPassDestroyOptions): void;
|
|
8
9
|
}
|
|
@@ -5,14 +5,11 @@ import type { RendererComponent } from '../components';
|
|
|
5
5
|
import type { Engine } from '../engine';
|
|
6
6
|
import type { MeshDestroyOptions, Renderer } from '../render';
|
|
7
7
|
import { Framebuffer } from '../render';
|
|
8
|
-
import type { SemanticGetter } from './semantic-map';
|
|
9
|
-
import { SemanticMap } from './semantic-map';
|
|
10
8
|
import type { TextureConfigOptions, TextureLoadAction } from '../texture';
|
|
11
9
|
import { Texture } from '../texture';
|
|
12
10
|
import type { Disposable, Sortable } from '../utils';
|
|
13
11
|
import { DestroyOptions, OrderType } from '../utils';
|
|
14
12
|
import type { Renderbuffer } from './renderbuffer';
|
|
15
|
-
import type { RenderingData } from './render-frame';
|
|
16
13
|
export declare const RenderPassPriorityPrepare = 0;
|
|
17
14
|
export declare const RenderPassPriorityNormal = 1000;
|
|
18
15
|
export declare const RenderPassPriorityPostprocess = 3000;
|
|
@@ -133,56 +130,13 @@ export declare enum RenderPassDestroyAttachmentType {
|
|
|
133
130
|
}
|
|
134
131
|
export type RenderPassDestroyOptions = {
|
|
135
132
|
meshes?: MeshDestroyOptions | DestroyOptions.keep;
|
|
136
|
-
semantics?: DestroyOptions;
|
|
137
133
|
colorAttachment?: RenderPassDestroyAttachmentType;
|
|
138
134
|
depthStencilAttachment?: RenderPassDestroyAttachmentType;
|
|
139
135
|
};
|
|
140
|
-
|
|
141
|
-
* RenderPass 渲染过程回调
|
|
142
|
-
*/
|
|
143
|
-
export interface RenderPassDelegate {
|
|
144
|
-
/**
|
|
145
|
-
* 开始前回调
|
|
146
|
-
* @param renderPass - 当前 RenderPass
|
|
147
|
-
* @param state - 当前渲染状态
|
|
148
|
-
*/
|
|
149
|
-
willBeginRenderPass?: (renderPass: RenderPass, state: RenderingData) => void;
|
|
150
|
-
/**
|
|
151
|
-
* 结束后回调
|
|
152
|
-
* @param renderPass - 当前 RenderPass
|
|
153
|
-
* @param state - 当前渲染状态
|
|
154
|
-
*/
|
|
155
|
-
didEndRenderPass?: (renderPass: RenderPass, state: RenderingData) => void;
|
|
156
|
-
/**
|
|
157
|
-
* Mesh 渲染前回调
|
|
158
|
-
* @param mesh - 当前 Mesh
|
|
159
|
-
* @param state - 当前渲染状态
|
|
160
|
-
*/
|
|
161
|
-
willRenderMesh?: (mesh: RendererComponent, state: RenderingData) => void;
|
|
162
|
-
/**
|
|
163
|
-
* Mesh 渲染后回调
|
|
164
|
-
* @param mesh - 当前 Mesh
|
|
165
|
-
* @param state - 当前渲染状态
|
|
166
|
-
*/
|
|
167
|
-
didRenderMesh?: (mesh: RendererComponent, state: RenderingData) => void;
|
|
168
|
-
}
|
|
169
|
-
/**
|
|
170
|
-
* RenderPass Attachment 选项
|
|
171
|
-
*/
|
|
172
|
-
export interface RenderPassAttachmentOptions {
|
|
136
|
+
export interface RenderPassOptions {
|
|
173
137
|
attachments?: RenderPassColorAttachmentOptions[];
|
|
174
138
|
depthStencilAttachment?: RenderPassDepthStencilAttachmentOptions;
|
|
175
139
|
}
|
|
176
|
-
export interface RenderPassOptions extends RenderPassAttachmentOptions {
|
|
177
|
-
name?: string;
|
|
178
|
-
meshes?: RendererComponent[];
|
|
179
|
-
priority?: number;
|
|
180
|
-
meshOrder?: OrderType;
|
|
181
|
-
clearAction?: RenderPassClearAction;
|
|
182
|
-
storeAction?: RenderPassStoreAction;
|
|
183
|
-
semantics?: Record<string, SemanticGetter>;
|
|
184
|
-
delegate?: RenderPassDelegate;
|
|
185
|
-
}
|
|
186
140
|
/**
|
|
187
141
|
* RenderPass 抽象类
|
|
188
142
|
*/
|
|
@@ -191,10 +145,6 @@ export declare class RenderPass implements Disposable, Sortable {
|
|
|
191
145
|
* 优先级
|
|
192
146
|
*/
|
|
193
147
|
priority: number;
|
|
194
|
-
/**
|
|
195
|
-
* 渲染时的回调函数
|
|
196
|
-
*/
|
|
197
|
-
delegate: RenderPassDelegate;
|
|
198
148
|
/**
|
|
199
149
|
* ColorAttachment 数组
|
|
200
150
|
*/
|
|
@@ -203,7 +153,7 @@ export declare class RenderPass implements Disposable, Sortable {
|
|
|
203
153
|
/**
|
|
204
154
|
* 名称
|
|
205
155
|
*/
|
|
206
|
-
|
|
156
|
+
name: string;
|
|
207
157
|
/**
|
|
208
158
|
* 包含的 Mesh 列表
|
|
209
159
|
*/
|
|
@@ -220,26 +170,16 @@ export declare class RenderPass implements Disposable, Sortable {
|
|
|
220
170
|
* 深度和蒙版 Attachment 类型,注意区分纹理和 Renderbuffer
|
|
221
171
|
*/
|
|
222
172
|
readonly depthStencilType: RenderPassAttachmentStorageType;
|
|
223
|
-
/**
|
|
224
|
-
* 渲染前清除缓冲区操作
|
|
225
|
-
*/
|
|
226
|
-
readonly clearAction: RenderPassClearAction;
|
|
227
173
|
/**
|
|
228
174
|
* 渲染后清除缓冲区操作,iOS 上有性能提升, 默认关闭
|
|
229
175
|
*/
|
|
230
176
|
readonly storeAction: RenderPassStoreAction;
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
*/
|
|
234
|
-
readonly semantics: SemanticMap;
|
|
235
|
-
protected destroyed: boolean;
|
|
236
|
-
protected options: RenderPassAttachmentOptions;
|
|
177
|
+
protected disposed: boolean;
|
|
178
|
+
protected options: RenderPassOptions;
|
|
237
179
|
protected renderer: Renderer;
|
|
238
180
|
private initialized;
|
|
239
181
|
private depthTexture?;
|
|
240
182
|
private stencilTexture?;
|
|
241
|
-
private isCustomViewport;
|
|
242
|
-
private customViewport?;
|
|
243
183
|
constructor(renderer: Renderer, options: RenderPassOptions);
|
|
244
184
|
get isDestroyed(): boolean;
|
|
245
185
|
get viewport(): spec.vec4;
|