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

Phaser.Camera.position for quick access #1015

Merged
merged 3 commits into from Aug 28, 2014

Conversation

@Zielak
Copy link
Contributor

commented Jul 14, 2014

I wanted to quickly access camera's position and set it to other physic's body. I had to get camera's x and y separately. Now it's possible to use it with other Point static methods like add(), multiply() etc.

ps: first pull request ever :)

@photonstorm

This comment has been minimized.

Copy link
Owner

commented Jul 15, 2014

Thanks for your PR - you did it correctly too! Right branch, jshint passed, etc. So many people do it wrong :)

But I'm afraid I'm quite worried about implementing the change. The thought of generating a brand new Point object every single time you call Camera.position seems incredibly inefficient to me, sorry. I like the idea, but we're going to need to find a different way to implement it.

@Zielak

This comment has been minimized.

Copy link
Contributor Author

commented Jul 15, 2014

Thanks for the explanation, I have to start thinking this way doing my own code... New commit heading your way!

photonstorm added a commit that referenced this pull request Aug 28, 2014
Merge pull request #1015 from Zielak/dev
Phaser.Camera.position for quick access

@photonstorm photonstorm merged commit 50179d7 into photonstorm:dev Aug 28, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
@photonstorm

This comment has been minimized.

Copy link
Owner

commented Aug 28, 2014

👍

@Zielak

This comment has been minimized.

Copy link
Contributor Author

commented Aug 28, 2014

Nnnnnice!

@Zielak Zielak deleted the Zielak:dev branch Sep 8, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.