MONKEY (skybox): Stratholme skybox scenario, rig test timing

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pkuzic
2026-09-25 12:31:47 +01:00
co-authored by Claude Opus 5.5
parent bd1c6de9f8
commit 7469caa289
2 changed files with 17 additions and 5 deletions
@@ -1381,6 +1381,15 @@ pub(super) const ON_DEMAND: &[Scenario] = &[
}, // MONKEY (skybox): zone skyboxes (run with `WOW_ZONE_SKYBOXES=1`) and the two stock skybox
// lanes. Karazahn40 (Turtle map 814) is the one stock sphere naming a clear-slot skybox
// (Light 553, HellfireSkyBox); the zone shots need the sky patch.
// The stock MOSB lane: Stratholme_B's groups flagged 0x40000, weight = the interior crossfade.
Scenario {
name: "skybox-stratholme-noon",
map: Some(329),
eye: SKYBOX_STRAT_EYE,
look: SKYBOX_STRAT_LOOK,
minute: 720,
ui: None,
},
Scenario {
name: "skybox-karazhan-noon",
map: Some(814),
@@ -1550,6 +1559,8 @@ pub(crate) fn ui_opted_in() -> bool {
// MONKEY (skybox): the skybox shots, eye just above the ground at a sphere's centre, pitched up so
// the upper frame is sky.
const SKYBOX_STRAT_EYE: [f32; 3] = [3450.0, -3380.0, 150.0];
const SKYBOX_STRAT_LOOK: [f32; 3] = [3600.0, -3300.0, 200.0];
const SKYBOX_KZ_EYE: [f32; 3] = [-6474.0, -2912.0, 40.0];
const SKYBOX_KZ_LOOK: [f32; 3] = [-6300.0, -2800.0, 95.0];
const SKYBOX_STEPPES_EYE: [f32; 3] = [-7979.0, -2571.0, 260.0];
+6 -5
View File
@@ -435,7 +435,8 @@ mod tests {
use super::*;
fn spin_rig() -> SkyRig {
// One parentless bone at pivot (1,0,0) turning about +Y over 4 s, linear.
// One parentless bone at pivot (1,0,0) turning 135° about +Y over 4 s, linear; the quarter
// turn falls at 8/3 s.
SkyRig {
parents: vec![-1],
pivots: vec![Vec3::X],
@@ -443,7 +444,7 @@ mod tests {
rotation: Channel {
keys: vec![
(0.0, Quat::IDENTITY),
(4.0, Quat::from_rotation_y(std::f32::consts::PI)),
(4.0, Quat::from_rotation_y(std::f32::consts::FRAC_PI_2 * 1.5)),
],
linear: true,
},
@@ -458,8 +459,8 @@ mod tests {
#[test]
fn a_bone_turns_about_its_pivot() {
let rig = spin_rig();
let m = rig.pose(rig.band_time(4.0 + 2.0), 0.0)[0];
// Half way: a quarter turn about the pivot; the pivot itself stays put.
let m = rig.pose(rig.band_time(4.0 + 8.0 / 3.0), 0.0)[0];
// A quarter turn about the pivot; the pivot itself stays put.
assert!(m.transform_point3(Vec3::X).abs_diff_eq(Vec3::X, 1e-5));
let p = m.transform_point3(Vec3::new(2.0, 0.0, 0.0));
assert!(p.abs_diff_eq(Vec3::new(1.0, 0.0, -1.0), 1e-5), "{p}");
@@ -477,7 +478,7 @@ mod tests {
},
..Default::default()
});
let pose = rig.pose(2.0, 0.0);
let pose = rig.pose(8.0 / 3.0, 0.0);
let p = pose[1].transform_point3(Vec3::new(2.0, 0.0, 0.0));
// Lifted by the child, then turned a quarter by the parent.
assert!(p.abs_diff_eq(Vec3::new(1.0, 1.0, -1.0), 1e-5), "{p}");