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

Add from_xyz to Transform #1212

Merged
merged 2 commits into from
Jan 7, 2021
Merged

Add from_xyz to Transform #1212

merged 2 commits into from
Jan 7, 2021

Conversation

DJMcNab
Copy link
Member

@DJMcNab DJMcNab commented Jan 5, 2021

This significantly decreases the amount of boilerplate for the common case of 'Transform at (x, y, z)'. This used to require Transform::from_translation(Vec3::new(x,y,z))

The second commit was almost entirely performed by regex, which demonstrates how common this pattern is.

@cart cart merged commit 9f2410a into bevyengine:master Jan 7, 2021
@DJMcNab DJMcNab deleted the transform_xyz# branch January 7, 2021 14:19
rparrett pushed a commit to rparrett/bevy that referenced this pull request Jan 27, 2021
* Add the from_xyz helper method to Transform

* Use `from_xyz` where possible
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.

2 participants