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

fixed #18374: 2D Node with MotionStreak and Rigidbody has wrong offset #18375

Merged

Conversation

dumganhar
Copy link
Contributor

Re: #18374

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 requested a review from qiuguohua February 26, 2025 06:15
bool _isMeshBuffer{false};
uint8_t _isMeshBuffer: 1;
uint8_t _isVertexPositionInWorld: 1;
uint8_t _padding: 6;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add a new boolean property, we could reuse the byte and make 8 bits for 8 boolean values.

@dumganhar
Copy link
Contributor Author

@cocos-robot run test cases

Copy link

Code Size Check Report

Wechat (WASM) Before After Diff
2D Empty (legacy pipeline) 1001794 bytes 1001812 bytes ⚠️ +18 bytes
2D All (legacy pipeline) 2408779 bytes 2408765 bytes 👍 -14 bytes
2D All (new pipeline) 2498268 bytes 2498254 bytes 👍 -14 bytes
(2D + 3D) All 5412998 bytes 5412984 bytes 👍 -14 bytes
Web (WASM + ASMJS) Before After Diff
(2D + 3D) All 16636449 bytes 16636435 bytes 👍 -14 bytes

Interface Check Report

! WARNING this pull request has changed these public interfaces:

@@ -61558,22 +61558,23 @@
             constructor(nativeDrawInfo?: _cocos_2d_renderer_native_2d__NativeRenderDrawInfo);
             get nativeObj(): _cocos_2d_renderer_native_2d__NativeRenderDrawInfo;
             get render2dBuffer(): Float32Array | null;
             clear(): void;
-            setAccId(accId: any): void;
-            setBufferId(bufferId: any): void;
-            setAccAndBuffer(accId: any, bufferId: any): void;
-            setVertexOffset(vertexOffset: any): void;
-            setIndexOffset(indexOffset: any): void;
+            setAccId(accId: number): void;
+            setBufferId(bufferId: number): void;
+            setAccAndBuffer(accId: number, bufferId: number): void;
+            setVertexOffset(vertexOffset: number): void;
+            setIndexOffset(indexOffset: number): void;
             setVB(vbBuffer: Float32Array): void;
             setIB(ibBuffer: Uint16Array): void;
             setVData(vDataBuffer: ArrayBufferLike): void;
             setIData(iDataBuffer: ArrayBufferLike): void;
-            setVBCount(vbCount: any): void;
-            setIBCount(ibCount: any): void;
+            setVBCount(vbCount: number): void;
+            setIBCount(ibCount: number): void;
             setVertDirty(val: boolean): void;
             setDataHash(dataHash: number): void;
             setIsMeshBuffer(isMeshBuffer: boolean): void;
+            setVertexPositionInWorld(isVertexPositionInWorld: boolean): void;
             setMaterial(material: Material): void;
             setTexture(texture: gfx.Texture | null): void;
             setSampler(sampler: gfx.Sampler | null): void;
             setModel(model: renderer.scene.Model): void;

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 dumganhar merged commit 9730ac0 into cocos:v3.8.6 Feb 26, 2025
25 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