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: Allow for localTransform calculations to be overridden #10134

Merged
merged 7 commits into from
Jan 24, 2024

Conversation

GoodBoyDigital
Copy link
Member

@GoodBoyDigital GoodBoyDigital commented Jan 19, 2024

  • add updateLocalTransform to container
  • add setFromMatrix to container

overridde example:

const container = new Container();

// override to only take positions into account

container.updateLocalTransform = function(){
    this.localTransform.tx = this._position.x;
    this.localTransform.ty = this._position.y;
}

// or for full control of the matrix
container.updateLocalTransform = ()={};

@GoodBoyDigital GoodBoyDigital marked this pull request as ready for review January 19, 2024 12:49
Copy link

codesandbox-ci bot commented Jan 19, 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 0a2b21c:

Sandbox Source
pixi.js-sandbox Configuration

@dannyfritz
Copy link

dannyfritz commented Jan 20, 2024

Created #10138 because this PR is unrelated to the Firefox regression.

Previous message:
I think this PR maybe breaks Firefox. No sprite is drawn at all in Firefox.

https://codesandbox.io/p/sandbox/pixi-js-sandbox-ccvs99?file=%2Findex.js%3A16%2C1
This works in Chrome, but not Firefox.

Confirmed it draws the sprite in v8.0.0-rc.4 and this PR seems to be a regression.

@dannyfritz

This comment was marked as off-topic.

@dannyfritz
Copy link

Tested this in Chrome and this PR works as advertised.

@Zyie Zyie changed the title v8: Allow for localTransform calculations to be overridden Feat: Allow for localTransform calculations to be overridden Jan 24, 2024
@Zyie Zyie merged commit 4809ec7 into next-v8 Jan 24, 2024
4 checks passed
@Zyie Zyie deleted the chore/v8-updateLocalTransform branch January 24, 2024 11:03
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

3 participants