Skip to content

Optimize code size for tiled-layer.ts #18684

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

Open
wants to merge 1 commit into
base: v3.8.7
Choose a base branch
from

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.

Copy link

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1005779 bytes 1005779 bytes ✅ 0 bytes
2D All (legacy pipeline) 2669492 bytes 2668281 bytes 👍 -1211 bytes
2D All (new pipeline) 2757999 bytes 2756788 bytes 👍 -1211 bytes
(2D + 3D) All 10013883 bytes 10012667 bytes 👍 -1216 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16829448 bytes 16828232 bytes 👍 -1216 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -55099,11 +55099,11 @@
         protected _diffX1?: number;
         protected _diffY1?: number;
         protected _useAutomaticVertexZ?: boolean;
         protected _vertexZvalue?: number;
-        protected _offset?: math.Vec2;
+        protected _offset: math.Vec2;
         protected _tiledDataArray: __private._cocos_tiledmap_tiled_layer__TiledDataArray;
-        protected _cameraNode?: Node;
+        protected _cameraNode: Node | null;
         get tiledDataArray(): __private._cocos_tiledmap_tiled_layer__TiledDataArray;
         get leftDownToCenterX(): number;
         get leftDownToCenterY(): number;
         constructor();
@@ -55433,9 +55433,8 @@
          */
         _tiledDataArrayIdx: number;
         protected _render(ui: __private._cocos_2d_renderer_i_batcher__IBatcher): void;
         protected createRenderEntity(): __private._cocos_2d_renderer_render_entity__RenderEntity;
-        prepareDrawData(): void;
     }
     /**
      * @en Renders the TMX object group.
      * @zh 渲染 tmx object group。

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