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

Merged
merged 21 commits into from
Feb 14, 2025
Merged

Refactor 2d assembler #17659

merged 21 commits into from
Feb 14, 2025

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

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1001928 bytes 1001884 bytes 👍 -44 bytes
2D All (legacy pipeline) 2409169 bytes 2409023 bytes 👍 -146 bytes
2D All (new pipeline) 2498652 bytes 2498512 bytes 👍 -140 bytes
(2D + 3D) All 5381355 bytes 5381162 bytes 👍 -193 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16604819 bytes 16604626 bytes 👍 -193 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -3520,9 +3520,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
      */
@@ -46349,9 +46356,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;
@@ -68260,10 +68267,10 @@
             dir: math.Vec2;
             distance: number;
             time: number;
             constructor(point?: math.Vec2, dir?: math.Vec2);
-            setPoint(x: any, y: any): void;
-            setDir(x: any, y: any): void;
+            setPoint(x: number, y: number): void;
+            setDir(x: number, y: number): void;
         }
         export enum _cocos_particle_enum__ParticleSpace {
             World = 0,
             Local = 1,

@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
# Conflicts:
#	cocos/2d/assembler/graphics/webgl/graphics-assembler.ts
#	cocos/2d/assembler/graphics/webgl/index.ts
#	cocos/particle-2d/particle-system-2d.ts
#	cocos/spine/skeleton.ts
@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

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

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS PASS pageView_free_horizontal graphics-line-join
ios PASS PASS FAIL
mac PASS PASS FAIL reflection-probe

Copy link

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

Task Details

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

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

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS FAIL graphics-line-join
ios PASS PASS FAIL reflection-probe
mac PASS PASS FAIL reflection-probe

Copy link

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

Task Details

@dumganhar dumganhar marked this pull request as ready for review February 14, 2025 05:58
@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

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

Task Details

Platform build boot runned crashScene FailScene
web-mobile PASS PASS PASS
ios PASS PASS FAIL reflection-probe
mac PASS PASS FAIL reflection-probe

Copy link

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

Task Details

@dumganhar
Copy link
Contributor Author

@minggo, this PR is ready now.

@minggo minggo merged commit f23e599 into cocos:v3.8.6 Feb 14, 2025
12 checks passed
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