-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Optimize code size for webgl-commands.ts & webgl2-commands.ts #18266
Conversation
👍 Package size ⤵ -1086 bytes, old: 5218954, new: 5217868Interface Check ReportThis pull request does not change any public interfaces ! |
cocos/gfx/webgl/webgl-commands.ts
Outdated
|
||
offset.x = regionTexOffset.x === 0 ? 0 : alignTo(regionTexOffset.x, blockSizeWidth); | ||
offset.y = regionTexOffset.y === 0 ? 0 : alignTo(regionTexOffset.y, blockSizeHeight); | ||
extent.width = regionTexExtentWidth < blockSizeWidth ? regionTexExtent.width : alignTo(regionTexExtentWidth, blockSizeWidth); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regionTexExtent.width -> regionTexExtentWidth
offset.y = regionTexOffset.y === 0 ? 0 : alignTo(regionTexOffset.y, blockSizeHeight); | ||
extent.width = regionTexExtentWidth < blockSizeWidth ? regionTexExtent.width : alignTo(regionTexExtentWidth, blockSizeWidth); | ||
extent.height = regionTexExtentHeight < blockSizeHeight ? regionTexExtent.width | ||
: alignTo(regionTexExtentHeight, blockSizeHeight); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regionTexExtent.width -> regionTexExtentWidth
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
Fixed.
@cocos-robot run test cases |
Re: #18222
Changelog
Continuous Integration
This pull request:
Compatibility Check
This pull request: