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
Merged

Phaser.Camera.position for quick access #1015

merged 3 commits into from
Aug 28, 2014

Conversation

Zielak
Copy link
Contributor

@Zielak Zielak 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
Copy link
Collaborator

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
Copy link
Contributor Author

Zielak 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
Phaser.Camera.position for quick access
@photonstorm photonstorm merged commit 50179d7 into phaserjs:dev Aug 28, 2014
@photonstorm
Copy link
Collaborator

👍

@Zielak
Copy link
Contributor Author

Zielak commented Aug 28, 2014

Nnnnnice!

@Zielak Zielak deleted the dev branch September 8, 2014 11:25
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.

None yet

2 participants