Part of #41: the comments of `benilla-world`, Rust and WGSL, are rewritten to the rule in `docs/METHOD.md`, which is what the code does and the reference fact behind it, in a line. 24,226 comment lines become 8,863. - **The mechanical strip.** The citations that were only a private record number go first, and each edit is shown to be a pure removal. - **Wrong facts corrected.** The rewrite corrects the comments that stated wrong facts. Among them: - `0x6b62e0` is the WMO group's liquid renderer, not a doodad drawer. - The reference creates a WMO's props once, when a group enters its streaming window (`0x698720` → `0x695aa0`). It then admits them each frame the portal walk visits the group (`0x685d70` → `0x6838f0`). The old text had them created per visible group. - The liquid query's comments now state the reference's order: the map-object leg first, then the ADT (`0x69b6d0`). They no longer call the Outdoors/Inside split a match. - The interior probe runs from the character, not the camera. - The reference lights ground clutter. The old comment said it draws unlit. - The model-particle "pool order" deviation was wrong. Each instance is its own mesh, depth-sorted every frame. - The reference's vertical field of view follows the aspect ratio (44.1° at 16:9). The comment now gives it beside our fixed 45°. - The effect shader's far wall is the live `farclip`, 177 to 777 yd, not a fixed 777 yd. - Dozens more turned up on the way: renamed or deleted items, docs sitting on the wrong item, stale counts and links. - **Deviation labels.** "Deviation:" now marks only a choice with a reason. An unbuilt behaviour says so plainly. - **Verification.** Every file strips to identical code, and `cargo fmt --check` is clean. Five second readers compared every file old against new, restored the facts the rewrite had dropped, and checked each new citation against the reference. Defects the rewrite surfaced outside the comments are filed as their own issues (#106, #114, #115, #116). The comments here state what the code does. String literals are untouched; they are #92. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
29 lines
1.0 KiB
Rust
29 lines
1.0 KiB
Rust
//! The rig machinery the renderer needs: pose storage, the pose post-pass window, the rig world
|
|
//! composition and the free-running global-sequence channels. Which clip a unit plays and when a
|
|
//! rig parks are the game's policy (`creature_anim`); [`AnimParked`] lives here because it gates
|
|
//! the pose evaluator and the billboard joint pass.
|
|
|
|
use bevy::prelude::*;
|
|
|
|
mod compose;
|
|
mod global_seq;
|
|
mod pose;
|
|
|
|
pub(crate) use compose::seed_rig_rows;
|
|
pub use compose::{finalize_rig_worlds, PosePost};
|
|
pub use global_seq::GlobalSeqDrive;
|
|
pub use pose::{RigAnchor, RigFrame, RigPose};
|
|
|
|
/// Parks this rig's per-bone pose evaluation: the evaluator and the pose post-passes skip it,
|
|
/// while the sequence clocks, the driver state machine and the event scanner keep running.
|
|
#[derive(Component)]
|
|
pub struct AnimParked;
|
|
|
|
/// Registers the rig machinery; `WorldPlugins` adds it, so a program with no game still poses its
|
|
/// rigs.
|
|
pub fn plugin(app: &mut App) {
|
|
global_seq::plugin(app);
|
|
pose::plugin(app);
|
|
compose::plugin(app);
|
|
}
|