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

Feat: add ability to set width/height of Container together #10116

Merged
merged 3 commits into from
Jan 16, 2024

Conversation

Zyie
Copy link
Member

@Zyie Zyie commented Jan 15, 2024

This PR adds the ability to set the width/height of a container in one go which reduces the number of getLocalBounds calls that get made

new Container()
    .setSize(100) // 100, 100
    .setSize(100, 150) // 100, 150
    .setSize({width: 100}) // 100, 100
    .setSize({width: 100, height: 150}) // 100, 150

There is also a getSize() with an optional out property to get the width/height of a container without the additional calls as well

Copy link

codesandbox-ci bot commented Jan 15, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 388395f:

Sandbox Source
pixi.js-sandbox Configuration

@Zyie Zyie self-assigned this Jan 15, 2024
Copy link
Member

@GoodBoyDigital GoodBoyDigital left a comment

Choose a reason for hiding this comment

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

👍

@Zyie Zyie merged commit 2e838f5 into next-v8 Jan 16, 2024
4 checks passed
@Zyie Zyie deleted the feature/container-size branch January 16, 2024 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants