-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
【don't merge】UI subsystem additions #15890
Conversation
@@ -50,68 +50,6 @@ export const bmfont: IAssembler = { | |||
// Fill All | |||
fillMeshVertices3D(node, renderer, comp.renderData!, tempColor); | |||
}, | |||
|
|||
appendQuad (comp: Label, spriteFrame: SpriteFrame, rect: Rect, rotated: boolean, x: number, y: number, scale: number) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why delete this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless function,now use generateVertexData in bmfontUtils
style.fontSize = comp.fontSize; //both | ||
style.actualFontSize = comp.fontSize; //both | ||
style.originFontSize = _fntConfig ? _fntConfig.fontSize : comp.fontSize; //both | ||
layout.horizontalAlign = comp.horizontalAlign; //both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like the options in the layout are also part of the style, maybe merge the layout into the style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In design, style should only affect rendering, but because of the use of canvas, some rendering-related information is needed in the layout, and there is actually information that affects both rendering and layout, so it can't be completely separated.
outputRenderData.uiTransAnchorX = anchor.x; | ||
outputRenderData.uiTransAnchorY = anchor.y; | ||
|
||
style.spriteFrame = _spriteFrame; // render only |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why style has a spriteFrame?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since bmfont's font is actually composed of fnt and spriteFrame, there is no need to save the spriteFrame in the style if the font is encapsulated.
|
||
this._updateLabelInfo(comp); | ||
|
||
style.fontDesc = shareLabelInfo.fontDesc; | ||
|
||
// TextProcessing | ||
processing.processingString(true, style, layout, outputLayoutData, comp.string); | ||
|
||
comp.actualFontSize = style.actualFontSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does comp should know actualFontSize?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To maintain interface compatibility
cclegacy.director.root.batcher2D._releaseDescriptorSetCache(tex.getHash()); | ||
} | ||
if (uiSystem.batcher2D) { | ||
uiSystem.batcher2D.releaseDescriptorSetCache(tex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing the descriptorSetCache. Each rendering component holds a descriptorSet, which follows the component's lifecycle and is destroyed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's best that way.
This cache is designed to be efficient, and binding ds has a large impact on efficiency.
accessor.uploadBuffers(); | ||
accessor.reset(); | ||
} | ||
BufferAccessorManager.instance.upload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems better using UISystem to control BufferAccessorManager. No need to couple batcher and BufferAccessor.
cocos/2d/renderer/batcher-2d.ts
Outdated
this._meshDataArray[i].freeIAPool(); | ||
for (let i = 0; i < this._batches.length; ++i) { | ||
const batch = this._batches.array[i]; | ||
if (batch.isStatic) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still have static batches?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
cocos/game/director.ts
Outdated
@@ -691,10 +701,11 @@ export class Director extends EventTarget { | |||
for (let i = 0; i < this._systems.length; ++i) { | |||
this._systems[i].postUpdate(dt); | |||
} | |||
|
|||
this.emit(Director.EVENT_UPDATE_UI); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UIEvent timing should not be place in not-pause
branch. UI should ignore director‘s pause.
@@ -44,30 +53,12 @@ Batcher2d::Batcher2d(Root* root) | |||
_root = root; | |||
_device = _root->getDevice(); | |||
_stencilManager = StencilManager::getInstance(); | |||
instance = this; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems not correct. should use a static function to do this. Maybe add a static initialize function to create batcher and set it to instance.
native/cocos/2d/renderer/Batcher2d.h
Outdated
@@ -134,6 +145,10 @@ class Batcher2d final { | |||
} | |||
} | |||
|
|||
static inline size_t screenSort (Node* nodeA, Node* nodeB) { | |||
return nodeA->getSiblingIndex() - nodeB->getSiblingIndex(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not correct to sort canvas like this.
19384c8
to
c3cad12
Compare
ee0901e
to
f640f84
Compare
Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -2840,51 +2840,20 @@
updateRenderer(): void;
protected createRenderEntity(): __private._cocos_2d_renderer_render_entity__RenderEntity;
}
/**
- * @en
- * Static batch component of UI.
- * This component is placed on the root node of all node objects that need to be batch.
- * Only sprites and label participate in the batch.
- * Static batch must be enabled manually, otherwise dynamic batch is still used.
- * Note: Do not place mask, Graphics, and objects such as UI models or particles under child nodes,
- * otherwise rendering will be skipped after static batching is enabled.
- *
- * @zh
- * UI 静态合批组件。
- * 该组件放在所有需要被静态合批的节点对象的根节点上,子节点放置对象必须是精灵和文本,其余对象不参与静态合批。
- * 用户必须通过手动方式启用收集静态合批数据[[markAsDirty]],否则合批方式仍然采用动态合批(采集数据的流程相同)。此后渲染的内容是采用收集到的合批渲染数据,子节点的任何修改将不再有效。
- * 注意:子节点下不要放置 Mask,Graphics,以及 UI 模型或者粒子之类对象,否则会在启用完静态合批后跳过渲染。
- *
* @deprecated Since v3.4.1, We have adopted a new rendering batching policy in v3.4.1,
* which will result in an effective performance improvement for normal dynamic batching components,
* so manual management with the UIStaticBatch component is no longer recommended and will be removed in the future
*/
- export class UIStaticBatch extends UIRenderer {
- get color(): Readonly<math.Color>;
- set color(value: Readonly<math.Color>);
- get drawBatchList(): __private._cocos_2d_renderer_draw_batch__DrawBatch2D[];
- protected _init: boolean;
- protected _bufferAccessor: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor | null;
- protected _dirty: boolean;
- postUpdateAssembler(render: __private._cocos_2d_renderer_i_batcher__IBatcher): void;
- /**
- * @en
- * Recollect data tags.
- * The render data will be recollected during the render phase of the current frame, and the next frame will be rendered using fixed data.
- * Note: 尽量不要频繁调用此接口, 会有一定内存损耗.
- *
- * @zh
- * 重新采集数据标记,会在当前帧的渲染阶段重新采集渲染数据,下一帧开始将会使用固定数据进行渲染。
- * 注意:尽量不要频繁调用此接口,因为会清空原先存储的 ia 数据重新采集,会有一定内存损耗。
- */
+ export class UIStaticBatch {
+ constructor();
+ get color(): any;
+ set color(value: any);
+ get drawBatchList(): any;
+ postUpdateAssembler(render: any): void;
markAsDirty(): void;
- /**
- * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
- */
- _requireDrawBatch(): __private._cocos_2d_renderer_draw_batch__DrawBatch2D;
- protected _clearData(): void;
- protected _getBatcher(): UI | null;
+ _requireDrawBatch(): any;
}
/**
* @en Shadow effect for Label component, only for system fonts or TTF fonts.
* @zh 用于给 Label 组件添加阴影效果,只能用于系统字体或 ttf 字体。
@@ -3317,8 +3286,9 @@
protected _textStyle: __private._cocos_2d_assembler_label_text_style__TextStyle | null;
protected _textLayout: __private._cocos_2d_assembler_label_text_layout__TextLayout | null;
protected _textRenderData: __private._cocos_2d_assembler_label_text_output_data__TextOutputRenderData | null;
protected _textLayoutData: __private._cocos_2d_assembler_label_text_output_data__TextOutputLayoutData | null;
+ protected _layoutDirty: boolean;
constructor();
onEnable(): void;
onDestroy(): void;
/**
@@ -3336,8 +3306,9 @@
protected _canRender(): boolean;
protected _flushAssembler(): void;
protected _applyFontTexture(): void;
protected changeMaterialForDefine(): void;
+ protected _nodeStateChange(transformType: TransformBit): void;
}
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
@@ -3377,10 +3348,8 @@
protected _drawInfoType: __private._cocos_2d_renderer_render_draw_info__RenderDrawInfoType;
protected _multiOwner: boolean;
get multiOwner(): boolean;
set multiOwner(val: boolean);
- protected _batcher: UI | null;
- get batcher(): UI;
constructor(vertexFormat?: gfx.Attribute[]);
isValid(): false | __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
initRenderDrawInfo(comp: UIRenderer, drawInfoType?: __private._cocos_2d_renderer_render_draw_info__RenderDrawInfoType): void;
removeRenderDrawInfo(comp: UIRenderer): void;
@@ -3578,14 +3547,10 @@
* @en UI rendering process
* @zh UI 渲染流程
*/
export class UI implements __private._cocos_2d_renderer_i_batcher__IBatcher {
- protected _nativeObj: __private._cocos_2d_renderer_native_2d__NativeBatcher2d;
- get nativeObj(): __private._cocos_2d_renderer_native_2d__NativeBatcher2d;
- get currBufferAccessor(): __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
+ static getInstance(): UI;
get batches(): memop.CachedArray<__private._cocos_2d_renderer_draw_batch__DrawBatch2D>;
- set currStaticRoot(value: UIStaticBatch | null);
- set currIsStatic(value: boolean);
device: gfx.Device;
constructor(_root: Root);
initialize(): boolean;
destroy(): void;
@@ -3598,29 +3563,23 @@
*
* @param comp @en The render root of 2d.
* @zh 2d 渲染入口组件。
*/
- addScreen(comp: RenderRoot2D): void;
+ addScreen(node: Node): void;
/**
* @zh
* Removes the Canvas from the list.
*
* @param comp @en The target to removed.
* @zh 被移除的屏幕。
*/
- removeScreen(comp: RenderRoot2D): void;
+ removeScreen(node: Node): void;
sortScreens(): void;
getFirstRenderCamera(node: Node): renderer.scene.Camera | null;
update(): void;
uploadBuffers(): void;
reset(): void;
- /**
- * @zh 如果有必要,为相应的顶点布局切换网格缓冲区。
- * @en Switch the mesh buffer for corresponding vertex layout if necessary.
- * @param attributes use VertexFormat.vfmtPosUvColor by default
- */
- switchBufferAccessor(attributes?: gfx.Attribute[]): __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
- registerBufferAccessor(key: number, accessor: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): void;
+ syncMeshBuffersToNative(accId: number, buffers: __private._cocos_2d_renderer_native_2d__NativeUIMeshBuffer[]): void;
updateBuffer(attributes: gfx.Attribute[], bid: number): void;
/**
* @en
* Render component data submission process of UI.
@@ -3680,23 +3639,10 @@
* @param model - The committed model
* @param mat - The material used, could be null
*/
commitModel(comp: UIMeshRenderer | UIRenderer, model: renderer.scene.Model | null, mat: Material | null): void;
- setupStaticBatch(staticComp: UIStaticBatch, bufferAccessor: __private._cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): void;
- endStaticBatch(): void;
/**
* @en
- * Submit separate render data.
- * This data does not participate in the batch.
- *
- * @zh
- * 提交独立渲染数据.
- * @param comp @en The UIStaticBatch component.
- * @zh 静态组件
- */
- commitStaticBatch(comp: UIStaticBatch): void;
- /**
- * @en
* End a section of render data and submit according to the batch condition.
*
* @zh
* 根据合批条件,结束一段渲染数据并提交。
@@ -3732,9 +3678,9 @@
* 强制刷新材质。
*/
flushMaterial(mat: Material): void;
walk(node: Node, level?: number): void;
- syncMeshBuffersToNative(accId: number, buffers: MeshBuffer[]): void;
+ releaseDescriptorSetCache(texture: __private._cocos_asset_assets_texture_base__TextureBase): void;
}
/**
* @deprecated since v3.6.0, this is an engine private interface that will be removed in the future.
* @internal
@@ -7661,8 +7607,9 @@
get pipelineEvent(): __private._cocos_rendering_pipeline_event__IPipelineEvent;
/**
* @en The draw batch manager for 2D UI, for engine internal usage, user do not need to use this.
* @zh 2D UI 渲染合批管理器,引擎内部使用,用户无需使用此接口
+ * @deprecated Since v3.8.1, this is an engine private interface that will be removed in the future.
*/
get batcher2D(): UI;
/**
* @en Render scenes list
@@ -27331,8 +27278,14 @@
* @zh 一帧结束之后所触发的事件。
* @event Director.EVENT_END_FRAME
*/
static readonly EVENT_END_FRAME = "director_end_frame";
+ /**
+ * @en The event which will be triggered at the time that UI system update.
+ * @zh UI系统开始更新时的事件。
+ * @event Director.EVENT_UPDATE_UI
+ */
+ static readonly EVENT_UPDATE_UI = "director_update_ui";
static instance: Director;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
@@ -56888,8 +56841,9 @@
updateOffsetsToStayPut(widget: Widget, e?: __private._cocos_ui_widget__AlignFlags): void;
updateAlignment: typeof __private._cocos_ui_widget_manager__updateAlignment;
AlignMode: typeof __private._cocos_ui_widget__AlignMode;
AlignFlags: typeof __private._cocos_ui_widget__AlignFlags;
+ refreshScene: typeof __private._cocos_ui_widget_manager__refreshScene;
};
export class View extends __private._cocos_ui_view__View_base {
static instance: View;
/**
@@ -59527,55 +59481,8 @@
nuv: number[];
minPos: math.Vec3;
maxPos: math.Vec3;
}
- /**
- * @internal
- */
- export class _cocos_2d_renderer_static_vb_accessor__StaticVBChunk {
- vertexAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
- bufferId: number;
- meshBuffer: MeshBuffer;
- vertexOffset: number;
- vb: Float32Array;
- indexCount: number;
- get ib(): Readonly<Uint16Array>;
- constructor(vertexAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor, bufferId: number, meshBuffer: MeshBuffer, vertexOffset: number, vb: Float32Array, indexCount: number);
- setIndexBuffer(indices: ArrayLike<number>): void;
- }
- export class _cocos_2d_renderer_buffer_accessor__BufferAccessor {
- get attributes(): Readonly<gfx.Attribute[]>;
- get vertexFormatBytes(): number;
- get floatsPerVertex(): number;
- protected _device: gfx.Device;
- protected _attributes: gfx.Attribute[];
- protected _vertexFormatBytes: number;
- protected _floatsPerVertex: number;
- protected _buffers: MeshBuffer[];
- constructor(device: gfx.Device, attributes: gfx.Attribute[]);
- initialize(): void;
- reset(): void;
- request(vertexCount?: number, indexCount?: number): void;
- appendBuffers(vertices: Float32Array, indices: Uint16Array): void;
- uploadBuffers(): void;
- destroy(): void;
- }
- export class _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor extends _cocos_2d_renderer_buffer_accessor__BufferAccessor {
- static IB_SCALE: number;
- static ID_COUNT: number;
- get id(): number;
- constructor(device: gfx.Device, attributes: gfx.Attribute[], vCount?: number, iCount?: number);
- destroy(): void;
- reset(): void;
- getVertexBuffer(bid: number): Float32Array;
- getIndexBuffer(bid: number): Uint16Array;
- getMeshBuffer(bid: number): MeshBuffer;
- uploadBuffers(): void;
- appendIndices(bufferId: number, indices: Uint16Array): void;
- allocateChunk(vertexCount: number, indexCount: number): _cocos_2d_renderer_static_vb_accessor__StaticVBChunk | null;
- recycleChunk(chunk: _cocos_2d_renderer_static_vb_accessor__StaticVBChunk): void;
- static generateID(): number;
- }
export class _cocos_2d_renderer_draw_batch__DrawBatch2D {
get inputAssembler(): gfx.InputAssembler | null;
set inputAssembler(ia: gfx.InputAssembler | null);
get descriptorSet(): gfx.DescriptorSet | null;
@@ -59587,36 +59494,28 @@
model: renderer.scene.Model | null;
texture: gfx.Texture | null;
sampler: gfx.Sampler | null;
useLocalData: Node | null;
- isStatic: boolean;
textureHash: number;
samplerHash: number;
destroy(ui: _cocos_2d_renderer_i_batcher__IBatcher): void;
clear(): void;
fillPasses(mat: Material | null, dss: any, dssHash: any, patches: any): void;
}
export interface _cocos_2d_renderer_i_batcher__IBatcher {
- currBufferAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
readonly batches: memop.CachedArray<_cocos_2d_renderer_draw_batch__DrawBatch2D>;
- currStaticRoot: UIStaticBatch | null;
- currIsStatic: boolean;
device: gfx.Device;
initialize(): boolean;
destroy(): any;
- addScreen(comp: RenderRoot2D): any;
+ addScreen(node: Node): any;
getFirstRenderCamera(node: Node): renderer.scene.Camera | null;
- removeScreen(comp: RenderRoot2D): any;
+ removeScreen(node: Node): any;
sortScreens(): any;
update(): any;
uploadBuffers(): any;
reset(): any;
- switchBufferAccessor(attributes?: gfx.Attribute[]): _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
commitComp(comp: UIRenderer, renderData: BaseRenderData | null, frame: _cocos_asset_assets_texture_base__TextureBase | SpriteFrame | null, assembler: any, transform: Node | null): any;
commitModel(comp: UIMeshRenderer | UIRenderer, model: renderer.scene.Model | null, mat: Material | null): any;
- setupStaticBatch(staticComp: UIStaticBatch, bufferAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor): any;
- endStaticBatch(): any;
- commitStaticBatch(comp: UIStaticBatch): any;
autoMergeBatches(renderComp?: UIRenderer): any;
forceMergeBatches(material: Material, frame: _cocos_asset_assets_texture_base__TextureBase | SpriteFrame | null, renderComp: UIRenderer): any;
finishMergeBatches(): any;
flushMaterial(mat: Material): any;
@@ -60072,8 +59971,59 @@
* @param {Number} y
*/
drawTextureAt(image: ImageAsset, x: number, y: number): void;
}
+ export interface _cocos_2d_assembler_label_font_utils__ILabelInfo {
+ fontSize: number;
+ fontFamily: string;
+ fontDesc: string;
+ color: math.Color;
+ isOutlined: boolean;
+ out: math.Color;
+ margin: number;
+ fontScale: number;
+ }
+ export class _cocos_2d_assembler_label_font_utils__LetterTexture {
+ image: ImageAsset | null;
+ labelInfo: _cocos_2d_assembler_label_font_utils__ILabelInfo;
+ char: string;
+ data: _cocos_2d_assembler_label_font_utils__ISharedLabelData | null;
+ canvas: HTMLCanvasElement | null;
+ context: CanvasRenderingContext2D | null;
+ width: number;
+ height: number;
+ offsetY: number;
+ hash: string;
+ constructor(char: string, labelInfo: _cocos_2d_assembler_label_font_utils__ILabelInfo, hash: string);
+ updateRenderData(): void;
+ destroy(): void;
+ }
+ export class _cocos_2d_assembler_label_font_utils__FontLetterDefinition {
+ u: number;
+ v: number;
+ w: number;
+ h: number;
+ texture: _cocos_2d_assembler_label_font_utils__LetterRenderTexture | null;
+ offsetX: number;
+ offsetY: number;
+ valid: boolean;
+ xAdvance: number;
+ }
+ export class _cocos_2d_assembler_label_font_utils__LetterAtlas {
+ get width(): number;
+ get height(): number;
+ fontDefDictionary: _cocos_2d_assets_bitmap_font__FontAtlas;
+ constructor(width: number, height: number);
+ insertLetterTexture(letterTexture: _cocos_2d_assembler_label_font_utils__LetterTexture): _cocos_2d_assembler_label_font_utils__FontLetterDefinition | null;
+ update(): void;
+ reset(): void;
+ destroy(): void;
+ getTexture(): any;
+ beforeSceneLoad(): void;
+ clearAllCache(): void;
+ getLetter(key: string): any;
+ getLetterDefinitionForChar(char: string, style: _cocos_2d_assembler_label_text_style__TextStyle, fontScale: number): any;
+ }
export class _cocos_2d_assembler_label_text_style__TextStyle {
isBold: boolean;
isItalic: boolean;
isUnderline: boolean;
@@ -60095,8 +60045,10 @@
fontFamily: string;
fontDesc: string;
fntConfig: _cocos_2d_assets_bitmap_font__IConfig | null;
spriteFrame: SpriteFrame | null;
+ hash: string;
+ fontAtlas: _cocos_2d_assets_bitmap_font__FontAtlas | _cocos_2d_assembler_label_font_utils__LetterAtlas | null;
fontScale: number;
reset(): void;
}
export class _cocos_2d_assembler_label_text_layout__TextLayout {
@@ -60135,25 +60087,73 @@
uiTransAnchorX: number;
uiTransAnchorY: number;
reset(): void;
}
+ export class _cocos_2d_assembler_label_text_processing__LetterInfo {
+ char: string;
+ valid: boolean;
+ x: number;
+ y: number;
+ line: number;
+ hash: string;
+ }
export class _cocos_2d_assembler_label_text_output_data__TextOutputLayoutData {
parsedString: string[];
nodeContentSize: math.Size;
canvasSize: math.Size;
canvasPadding: math.Rect;
contentSizeExtend: math.Size;
startPosition: math.Vec2;
+ lettersInfo: _cocos_2d_assembler_label_text_processing__LetterInfo[];
reset(): void;
}
- export class _cocos_2d_renderer_native_2d__NativeBatcher2d {
- syncMeshBuffersToNative(accId: number, buffers: _cocos_2d_renderer_native_2d__NativeUIMeshBuffer[]): any;
- update(): any;
- uploadBuffers(): any;
- reset(): any;
- syncRootNodesToNative(nodes: Node[]): any;
- releaseDescriptorSetCache(texture: gfx.Texture, sampler: gfx.Sampler): any;
+ export class _cocos_2d_renderer_buffer_accessor__BufferAccessor {
+ get attributes(): Readonly<gfx.Attribute[]>;
+ get vertexFormatBytes(): number;
+ get floatsPerVertex(): number;
+ protected _device: gfx.Device;
+ protected _attributes: gfx.Attribute[];
+ protected _vertexFormatBytes: number;
+ protected _floatsPerVertex: number;
+ protected _buffers: MeshBuffer[];
+ constructor(device: gfx.Device, attributes: gfx.Attribute[]);
+ initialize(): void;
+ reset(): void;
+ request(vertexCount?: number, indexCount?: number): void;
+ appendBuffers(vertices: Float32Array, indices: Uint16Array): void;
+ uploadBuffers(): void;
+ destroy(): void;
}
+ export class _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor extends _cocos_2d_renderer_buffer_accessor__BufferAccessor {
+ static IB_SCALE: number;
+ static ID_COUNT: number;
+ get id(): number;
+ constructor(device: gfx.Device, attributes: gfx.Attribute[], vCount?: number, iCount?: number);
+ destroy(): void;
+ reset(): void;
+ getVertexBuffer(bid: number): Float32Array;
+ getIndexBuffer(bid: number): Uint16Array;
+ getMeshBuffer(bid: number): MeshBuffer;
+ uploadBuffers(): void;
+ appendIndices(bufferId: number, indices: Uint16Array): void;
+ allocateChunk(vertexCount: number, indexCount: number): _cocos_2d_renderer_static_vb_accessor__StaticVBChunk | null;
+ recycleChunk(chunk: _cocos_2d_renderer_static_vb_accessor__StaticVBChunk): void;
+ static generateID(): number;
+ }
+ /**
+ * @internal
+ */
+ export class _cocos_2d_renderer_static_vb_accessor__StaticVBChunk {
+ vertexAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor;
+ bufferId: number;
+ meshBuffer: MeshBuffer;
+ vertexOffset: number;
+ vb: Float32Array;
+ indexCount: number;
+ get ib(): Readonly<Uint16Array>;
+ constructor(vertexAccessor: _cocos_2d_renderer_static_vb_accessor__StaticVBAccessor, bufferId: number, meshBuffer: MeshBuffer, vertexOffset: number, vb: Float32Array, indexCount: number);
+ setIndexBuffer(indices: ArrayLike<number>): void;
+ }
export class _cocos_2d_utils_dynamic_atlas_atlas__DynamicAtlasTexture extends Texture2D {
/**
* @en
* Initialize the render texture.
@@ -72205,8 +72205,9 @@
*/
VERTICAL = 1
}
function _cocos_ui_widget_manager__updateAlignment(node: Node): void;
+ function _cocos_ui_widget_manager__refreshScene(): void;
export const _cocos_ui_view__View_base: new (...args: any[]) => System & _cocos_core_event_eventify__IEventified;
/**
* ContainerStrategy class is the root strategy class of container's scale strategy,
* it controls the behavior of how to scale the cc.game.container and cc.game.canvas object
|
Re: #15693
Re:https://github.com/cocos/3d-tasks/issues/17388
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: