-
Notifications
You must be signed in to change notification settings - Fork 46
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
Gui #227
base: master
Are you sure you want to change the base?
Gui #227
Conversation
Naturally my PR doesn't pass the tests, but that's because of the window instantiation backwards compat thing, like I explained above. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 5 of 51 files at r1, 1 of 3 files at r2.
Reviewable status: 6 of 51 files reviewed, 2 unresolved discussions (waiting on @cedric-h)
Cargo.toml, line 34 at r2 (raw file):
genmesh = "0.6" gfx = "0.17.1" gfx_core = "^0.8"
this is unexpected - all the required types should have been re-exported by gfx
crate iself
examples/anim.rs, line 86 at r2 (raw file):
cam.look_at([100.0, 0.0, 100.0], [0.0, 0.0, 30.0], Some([0.0, 1.0, 0.0].into())); let geom = three::Geometry { base: three::Shape { vertices: make_vertices(VERTICES), normals: Vec::new(), ..three::Shape::default() }, faces: make_indices(INDICES), shapes: V_FLY.iter().map(|data| three::Shape { vertices: make_vertices(data), ..three::Shape::default() }).collect(), ..three::Geometry::default() };
this looks somewhat sad
Could you make a PR without formatting any existing code?
@kvark Hey, I'm loving this library and was looking into updating the Cargo.toml to get onto current versions of libraries, and in the process of fixing some of that, the rustfmt.toml issue that I found on gitter came up as I edited factory/mod.rb. In current versions of toolchains, this file shrinks drastically because max_width now appears to transform all multiline expressions, such as the one you mentioned in the last comment on here. What is your current opinion on how the formatting of files for this project should happen? I'd suggest removing the max_width directive, and using Sorry for hijacking this PR for the question -- it seemed relevant to this issue's conversation. Great library, btw! |
@ecton this is indeed unrelated to the PR:) Please open an issue about rust formatting (or a PR with the suggest changes). Roughly, your proposal looks reasonable to me. |
I tried to run
cargo fmt
, but that didn't seem to work at all.I think that's why almost every file was changed. I saw your .rustfmt, so I figured it was configured the way you guys wanted it.
The files you should be looking at, then, are src/window.rs, src/gui.rs, and examples/gui.rs.
I broke backwards compatibility because of the Window struct, right now for all of the other examples you'd have to do
Window<gui::NoBackend>::new()
to make a new window.I'm not sure how you'd want me to fix that, whether you'd want me to
cfg
out everything GUI related, or maybe make what is now the window intoGuiWindow
, and then typedefWindow
asGuiWindow<NoBackend>
. Either of these and several other things could preserve backwards compatibility, but it's up to you guys.This change is![Reviewable](https://camo.githubusercontent.com/1541c4039185914e83657d3683ec25920c672c6c5c7ab4240ee7bff601adec0b/68747470733a2f2f72657669657761626c652e696f2f7265766965775f627574746f6e2e737667)