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 9 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 ⤴ 542 bytes, old: 5442364, new: 5442906

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -3558,9 +3558,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
      */
@@ -46024,13 +46031,13 @@
         _applyFile(): void;
         /**
          * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
          */
-        _initTextureWithDictionary(dict: any): boolean;
+        _initTextureWithDictionary(dict: __private._cocos_particle_2d_particle_system_2d__IParticle2DParameters): boolean;
         /**
          * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
          */
-        _initWithDictionary(dict: any): boolean;
+        _initWithDictionary(dict: __private._cocos_particle_2d_particle_system_2d__IParticle2DParameters): boolean;
         /**
          * @deprecated since v3.5.0, this is an engine private interface that will be removed in the future.
          */
         _syncAspect(): void;
@@ -46065,9 +46072,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 在编辑器模式下预览拖尾效果。
@@ -46113,9 +46120,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;
@@ -46126,9 +46133,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;
@@ -68233,9 +68240,66 @@
             step(dt: number): void;
             requestData(vertexCount: number, indexCount: number): void;
             initDrawInfo(): void;
         }
-        export class _cocos_particle_2d_motion_streak_2d__Point {
+        export interface _cocos_particle_2d_particle_system_2d__IParticle2DParameters {
+            maxParticles?: string;
+            particleLifespan?: string;
+            particleLifespanVariance?: string;
+            emissionRate?: string;
+            duration?: string;
+            blendFuncSource?: string;
+            blendFuncDestination?: string;
+            startColorRed?: string;
+            startColorGreen?: string;
+            startColorBlue?: string;
+            startColorAlpha?: string;
+            startColorVarianceRed?: string;
+            startColorVarianceGreen?: string;
+            startColorVarianceBlue?: string;
+            startColorVarianceAlpha?: string;
+            finishColorRed?: string;
+            finishColorGreen?: string;
+            finishColorBlue?: string;
+            finishColorAlpha?: string;
+            finishColorVarianceRed?: string;
+            finishColorVarianceGreen?: string;
+            finishColorVarianceBlue?: string;
+            finishColorVarianceAlpha?: string;
+            startParticleSize?: string;
+            startParticleSizeVariance?: string;
+            finishParticleSize?: string;
+            finishParticleSizeVariance?: string;
+            positionType?: string;
+            sourcePositionVariancex?: string;
+            sourcePositionVariancey?: string;
+            angle?: string;
+            angleVariance?: string;
+            rotationStart?: string;
+            rotationStartVariance?: string;
+            rotationEnd?: string;
+            rotationEndVariance?: string;
+            emitterType?: string;
+            gravityx?: string;
+            gravityy?: string;
+            speed?: string;
+            speedVariance?: string;
+            radialAcceleration?: string;
+            radialAccelVariance?: string;
+            tangentialAcceleration?: string;
+            tangentialAccelVariance?: string;
+            rotationIsDir?: string;
+            maxRadius?: string;
+            maxRadiusVariance?: string;
+            minRadius?: string;
+            minRadiusVariance?: string;
+            rotatePerSecond?: string;
+            rotatePerSecondVariance?: string;
+            spriteFrameUuid?: string;
+            textureFileName?: string;
+            textureImageData?: string;
+        }
+        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
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.

1 participant