Compare commits
No commits in common. "cc2877c9d88ad8606b35515c25cb7e93e6e346ca" and "1d22c11cde12798dbbda9ec80e9999831786bffd" have entirely different histories.
cc2877c9d8
...
1d22c11cde
4 changed files with 3 additions and 9 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -1312,7 +1312,6 @@ dependencies = [
|
|||
"parking_lot 0.12.1",
|
||||
"stdweb",
|
||||
"thiserror",
|
||||
"wasm-bindgen",
|
||||
"web-sys",
|
||||
"windows",
|
||||
]
|
||||
|
|
|
@ -22,7 +22,6 @@ hexodsp = { git = "https://github.com/WeirdConstructor/HexoDSP", default-feature
|
|||
ticktock = "0.8.0"
|
||||
|
||||
[target."cfg(target_arch = \"wasm32\")".dependencies]
|
||||
cpal = { version = "0.14.0", features = ["wasm-bindgen"] }
|
||||
|
||||
[profile.dev.package."*"]
|
||||
opt-level = 3
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
source build-wasm.sh
|
||||
python -m http.server
|
|
@ -471,15 +471,13 @@ fn move_camera(
|
|||
|
||||
let size: Vec2 = camera.logical_viewport_size().unwrap();
|
||||
let half_height: f32 = size.y * 0.5;
|
||||
let mut target_translation = character_transform.translation;
|
||||
// prevent camera from going too low
|
||||
target_translation.y = target_translation.y.max(half_height - MARGIN);
|
||||
|
||||
camera_transform.translation = camera_transform.translation.lerp(
|
||||
target_translation,
|
||||
character_transform.translation,
|
||||
time.delta_seconds() * FOLLOW_SPEED,
|
||||
);
|
||||
|
||||
// prevent camera from going too low
|
||||
camera_transform.translation.y = camera_transform.translation.y.max(half_height - MARGIN);
|
||||
// always make sure that camera is away from the object in order to render them
|
||||
camera_transform.translation.z = 999.0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue