-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Refactor 2d assembler #17659
Draft
dumganhar
wants to merge
15
commits into
cocos:v3.8.6
Choose a base branch
from
dumganhar:refactor-2d-assembler
base: v3.8.6
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Refactor 2d assembler #17659
+449
−497
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
👍 Package size ⤵ -190 bytes, old: 5225108, new: 5224918Interface Check Report! WARNING this pull request has changed these public interfaces:
@@ -3576,9 +3576,16 @@
/**
* @internal
*/
export interface IAssembler {
- [key: string]: any;
+ createData?(comp: UIRenderer): BaseRenderData;
+ fillBuffers?(comp: UIRenderer, renderer: __private._cocos_2d_renderer_i_batcher__IBatcher): void;
+ updateUVs?(comp: UIRenderer, ...args: any[]): void;
+ updateColor?(comp: UIRenderer): void;
+ updateRenderData?(comp: UIRenderer): void;
+ update?(comp: UIRenderer, dt: number): void;
+ resetAssemblerData?(data: any): void;
+ removeData?(data: BaseRenderData): void;
}
/**
* @internal
*/
@@ -46318,9 +46325,9 @@
* is vertically aligned along the streak segment.
* @zh 运动轨迹,用于游戏对象的运动轨迹上实现拖尾渐隐效果。
*/
export class MotionStreak extends UIRenderer {
- static Point: typeof __private._cocos_particle_2d_motion_streak_2d__Point;
+ static Point: typeof __private._cocos_particle_2d_motion_streak_2d__MotionStreakPoint;
constructor();
/**
* @en Preview the trailing effect in editor mode.
* @zh 在编辑器模式下预览拖尾效果。
@@ -46366,9 +46373,9 @@
* motionStreak.fastMode = true;
*/
get fastMode(): boolean;
set fastMode(val: boolean);
- get points(): __private._cocos_particle_2d_motion_streak_2d__Point[];
+ get points(): __private._cocos_particle_2d_motion_streak_2d__MotionStreakPoint[];
onEnable(): void;
protected _flushAssembler(): void;
onFocusInEditor(): void;
onLostFocusInEditor(): void;
@@ -46379,9 +46386,9 @@
* // Remove all living segments of the ribbon.
* myMotionStreak.reset();
*/
reset(): void;
- lateUpdate(dt: any): void;
+ lateUpdate(dt: number): void;
/**
* @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
*/
_render(render: __private._cocos_2d_renderer_i_batcher__IBatcher): void;
@@ -68255,9 +68262,9 @@
step(dt: number): void;
requestData(vertexCount: number, indexCount: number): void;
initDrawInfo(): void;
}
- export class _cocos_particle_2d_motion_streak_2d__Point {
+ export class _cocos_particle_2d_motion_streak_2d__MotionStreakPoint {
point: math.Vec2;
dir: math.Vec2;
distance: number;
time: number;
|
…efactor-2d-assembler # Conflicts: # cocos/2d/assembler/label/index.ts
@cocos-robot run test cases |
This reverts commit ee77f23.
@cocos-robot run test cases |
…efactor-2d-assembler # Conflicts: # cocos/2d/assembler/label/bmfontUtils.ts # cocos/2d/assembler/label/letter-font.ts # cocos/2d/assembler/label/ttf.ts # cocos/2d/assembler/sprite/bar-filled.ts # cocos/2d/assembler/sprite/simple.ts # cocos/2d/assembler/sprite/sliced.ts # cocos/2d/assembler/sprite/tiled.ts # cocos/2d/components/label.ts # cocos/2d/components/sprite.ts # cocos/particle-2d/particle-system-2d.ts
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Re: #
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: