clean
This commit is contained in:
parent
d5701cfae4
commit
81e4cee845
@ -80,10 +80,6 @@ impl State {
|
|||||||
x: (((position.x / w_size.width as f64)*2.)-1.)*(w_size.width as f64/w_size.height as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[0] as f64,
|
x: (((position.x / w_size.width as f64)*2.)-1.)*(w_size.width as f64/w_size.height as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[0] as f64,
|
||||||
y: -(((position.y / w_size.height as f64)*2.)-1.)*(w_size.height as f64/w_size.width as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[1] as f64
|
y: -(((position.y / w_size.height as f64)*2.)-1.)*(w_size.height as f64/w_size.width as f64).min(1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[1] as f64
|
||||||
};
|
};
|
||||||
// let pos = Point {
|
|
||||||
// x: ((2.*position.x/(w_size.width.max(w_size.height) as f64))-1.)*(self.uniforms.camera[2] as f64) + self.uniforms.camera[0] as f64,
|
|
||||||
// y: (1.-(2.*position.y/(w_size.height.max(w_size.width) as f64)))*(self.uniforms.camera[2] as f64) + self.uniforms.camera[1] as f64
|
|
||||||
// };
|
|
||||||
let c = self.map.voronoi.cell(self.selected_tile);
|
let c = self.map.voronoi.cell(self.selected_tile);
|
||||||
if self.mouse_pressed {
|
if self.mouse_pressed {
|
||||||
for i in c.iter_path(pos.clone()) {
|
for i in c.iter_path(pos.clone()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user