chore: rename some struct fields
This commit is contained in:
parent
fb7aef0a4b
commit
42c783448e
16
src/main.rs
16
src/main.rs
|
@ -15,8 +15,8 @@ fn main() {
|
||||||
|
|
||||||
struct SpriteScale {
|
struct SpriteScale {
|
||||||
zoom: f64,
|
zoom: f64,
|
||||||
horiz: f64,
|
horizontal: f64,
|
||||||
verti: f64,
|
vertical: f64,
|
||||||
step: f64,
|
step: f64,
|
||||||
iterations: u32,
|
iterations: u32,
|
||||||
}
|
}
|
||||||
|
@ -25,8 +25,8 @@ impl Default for SpriteScale {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
zoom: 1.0,
|
zoom: 1.0,
|
||||||
horiz: 0.0,
|
horizontal: 0.0,
|
||||||
verti: 0.0,
|
vertical: 0.0,
|
||||||
step: 0.01,
|
step: 0.01,
|
||||||
iterations: 64,
|
iterations: 64,
|
||||||
}
|
}
|
||||||
|
@ -45,8 +45,8 @@ fn transform_mandelbrot_system(
|
||||||
let iter_mod = input.pressed(KeyCode::T) as i8 - input.pressed(KeyCode::G) as i8;
|
let iter_mod = input.pressed(KeyCode::T) as i8 - input.pressed(KeyCode::G) as i8;
|
||||||
|
|
||||||
scale.step += (scale.step / 10.0) * step_mod as f64;
|
scale.step += (scale.step / 10.0) * step_mod as f64;
|
||||||
scale.verti += scale.step * vertical as f64;
|
scale.vertical += scale.step * vertical as f64;
|
||||||
scale.horiz += scale.step * horizontal as f64;
|
scale.horizontal += scale.step * horizontal as f64;
|
||||||
scale.zoom += scale.step * zoom as f64;
|
scale.zoom += scale.step * zoom as f64;
|
||||||
|
|
||||||
if iter_mod == 1 {
|
if iter_mod == 1 {
|
||||||
|
@ -86,8 +86,8 @@ fn mandelbrot_render_system(
|
||||||
if let Some(texture_handle) = &material.texture {
|
if let Some(texture_handle) = &material.texture {
|
||||||
if let Some(texture) = textures.get_mut(texture_handle) {
|
if let Some(texture) = textures.get_mut(texture_handle) {
|
||||||
let z = scale.zoom;
|
let z = scale.zoom;
|
||||||
let h = scale.horiz;
|
let h = scale.horizontal;
|
||||||
let v = scale.verti;
|
let v = scale.vertical;
|
||||||
let iters = scale.iterations;
|
let iters = scale.iterations;
|
||||||
|
|
||||||
let start = Instant::now();
|
let start = Instant::now();
|
||||||
|
|
Loading…
Reference in New Issue