Skip to content
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
wants to merge 16 commits into
base: v3.8.6
Choose a base branch
from
Draft

Conversation

dumganhar
Copy link
Contributor

Re: #

Changelog


Continuous Integration

This pull request:

  • needs automatic test cases check.

    Manual trigger with @cocos-robot run test cases afterward.

  • does not change any runtime related code or build configuration

    If any reviewer thinks the CI checks are needed, please uncheck this option, then close and reopen the issue.


Compatibility Check

This pull request:

  • changes public API, and have ensured backward compatibility with deprecated features.
  • affects platform compatibility, e.g. system version, browser version, platform sdk version, platform toolchain, language version, hardware compatibility etc.
  • affects file structure of the build package or build configuration which requires user project upgrade.
  • introduces breaking changes, please list all changes, affected features and the scope of violation.

@dumganhar dumganhar marked this pull request as draft September 22, 2024 09:40
Copy link

github-actions bot commented Sep 22, 2024

👍 Package size ⤵ -125 bytes, old: 5218891, new: 5218766

Interface 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;

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

This reverts commit ee77f23.
@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

@dumganhar dumganhar changed the base branch from v3.8.5 to v3.8.6 December 18, 2024 01:44
@dumganhar dumganhar closed this Dec 18, 2024
@dumganhar dumganhar reopened this Dec 18, 2024
…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
@dumganhar dumganhar requested a review from minggo February 5, 2025 06:59
@dumganhar dumganhar marked this pull request as ready for review February 5, 2025 06:59
@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

github-actions bot commented Feb 5, 2025

@dumganhar, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS FAIL 2d-rendering-in-3d,dynamic-tiled-map,Hexa,puzzle,shield-node
ios PASS PASS FAIL 2d-rendering-in-3d,dynamic-tiled-map,Hexa,puzzle,shield-node
mac PASS PASS FAIL 2d-rendering-in-3d,dynamic-tiled-map,Hexa,puzzle,shield-node

Copy link

github-actions bot commented Feb 5, 2025

@dumganhar, Please check the result of run test cases:

Task Details

Platform build boot runned crashScene FailScene
windows PASS PASS FAIL 2d-rendering-in-3d,dynamic-tiled-map,Hexa,puzzle,shield-node
android PASS PASS FAIL 2d-rendering-in-3d,dynamic-tiled-map,Hexa,puzzle,shield-node
wechatgame PASS FAIL FAIL

@dumganhar dumganhar marked this pull request as draft February 6, 2025 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants