Use put_object for objects as well
This commit is contained in:
parent
f06e502e26
commit
a4e2573a7c
|
|
@ -49,15 +49,11 @@ pub fn main() {
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.map(|(k, &y)| Object {
|
.map(|(k, &y)| Object {
|
||||||
id: k as i32,
|
id: k as i32,
|
||||||
loc: {
|
loc: put_object(
|
||||||
let pos = vec2(0.0, y * tube.external_halflength);
|
&tube,
|
||||||
let adj: Mat2 = tube.sqrt_at(pos).inverse().into();
|
vec2(0.0, y * tube.external_halflength),
|
||||||
let rot = Mat2::from_angle(y);
|
Mat2::from_angle(y),
|
||||||
Location {
|
),
|
||||||
pos,
|
|
||||||
rot: adj * rot,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
r: 20.0,
|
r: 20.0,
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user