···4141 pub color_event_boxes: Vec<ColorEventBox>,
4242 #[serde(rename = "lightRotationEventBoxGroups")]
4343 pub rotation_event_boxes: Vec<RotationEventBox>,
4444- /// Only present in difficulty file V3.2 or higher.
4444+ /// > Only present in difficulty file V3.2 or higher.
4545 #[serde(rename = "lightTranslationEventBoxGroups")]
4646 pub translation_event_boxes: Option<Vec<TranslationEventBox>>,
4747 #[doc(alias = "keyword_events")]
+7
src/difficulty/lightshow/boxes.rs
···3232 fn get_filter(&self) -> &Filter;
3333 fn get_data(&self) -> &Vec<Self::Data>;
34343535+ /// Returns the number of beats that the event will be offset for a given light ID.
3636+ /// # Panics
3737+ /// Will panic if the light ID is greater than or equal to the group size.
3538 fn get_beat_offset(&self, light_id: i32, group_size: i32) -> f32;
3939+4040+ /// Returns the value that the event will be offset for a given light ID (i.e. brightness offset).
4141+ /// # Panics
4242+ /// Will panic if the light ID is greater than or equal to the group size.
3643 fn get_value_offset(&self, light_id: i32, group_size: i32) -> f32;
3744}
3845
+4-1
src/difficulty/lightshow/boxes/color.rs
···5252 pub bright_dist_value: f32,
5353 #[serde(rename = "b")]
5454 pub bright_dist_effect_first: LooseBool,
5555- /// Only present in difficulty file V3.2 or higher.
5555+ /// > Only present in difficulty file V3.2 or higher.
5656 #[serde(rename = "i")]
5757 pub bright_dist_easing: Option<Easing>,
5858 #[serde(rename = "e")]
···7777impl_event_group!(ColorEventGroup::get_brightness_offset, ColorEventData);
78787979impl ColorEventGroup {
8080+ /// Returns the brightness that the event will be offset for a given light ID.
8181+ /// # Panics
8282+ /// Will panic if the light ID is greater than or equal to the group size.
8083 pub fn get_brightness_offset(&self, light_id: i32, group_size: i32) -> f32 {
8184 self.bright_dist_type.compute_offset(
8285 light_id,
+4-1
src/difficulty/lightshow/boxes/rotation.rs
···5353 pub rotation_dist_value: f32,
5454 #[serde(rename = "b")]
5555 pub rotation_dist_effect_first: LooseBool,
5656- /// Only present in difficulty file V3.2 or higher.
5656+ /// > Only present in difficulty file V3.2 or higher.
5757 #[serde(rename = "i")]
5858 pub rotation_dist_easing: Option<Easing>,
5959 #[serde(rename = "a")]
···8484impl_event_group!(RotationEventGroup::get_rotation_offset, RotationEventData);
85858686impl RotationEventGroup {
8787+ /// Returns the number of degrees that the event will be offset for a given light ID.
8888+ /// # Panics
8989+ /// Will panic if the light ID is greater than or equal to the group size.
8790 pub fn get_rotation_offset(&self, light_id: i32, group_size: i32) -> f32 {
8891 self.rotation_dist_type.compute_offset(
8992 light_id,
+3
src/difficulty/lightshow/boxes/translation.rs
···9090);
91919292impl TranslationEventGroup {
9393+ /// Returns the number of units that the event will be offset for a given light ID.
9494+ /// # Panics
9595+ /// Will panic if the light ID is greater than or equal to the group size.
9396 pub fn get_translation_offset(&self, light_id: i32, group_size: i32) -> f32 {
9497 self.translation_dist_type.compute_offset(
9598 light_id,
+4
src/difficulty/lightshow/easing.rs
···4646}
47474848impl Easing {
4949+ /// Applies the relevant easing function.
5050+ ///
5151+ /// The Beatsaber specific easing use the standard equivalent instead.
5252+ /// If the easing is [`None`](Self::None) or [`Unknown`](Self::Unknown), then the result will be zero.
4953 pub fn ease(&self, num: f32) -> f32 {
5054 match self {
5155 Easing::None => 0.0,
+16-6
src/difficulty/lightshow/filter.rs
···2222 #[serde(rename = "r")]
2323 pub reverse: LooseBool,
2424 // V3.1:
2525- /// Only present in difficulty file V3.1 or higher.
2525+ /// > Only present in difficulty file V3.1 or higher.
2626+ ///
2727+ /// Chunks will divide the group into multiple chunks, which will each behave as a single object.
2828+ ///
2929+ /// To see this in practice, check out [this video](https://youtube.com/watch?v=NJPPBvyHJjg&t=197).
2630 #[serde(rename = "c")]
2731 pub chunks: Option<i32>,
2828- /// Only present in difficulty file V3.1 or higher.
3232+ /// > Only present in difficulty file V3.1 or higher.
2933 #[serde(rename = "n")]
3034 pub random_behaviour: Option<RandomBehaviour>,
3131- /// Only present in difficulty file V3.1 or higher.
3535+ /// > Only present in difficulty file V3.1 or higher.
3236 #[serde(rename = "s")]
3337 pub random_seed: Option<i32>,
3434- /// Only present in difficulty file V3.1 or higher.
3838+ /// > Only present in difficulty file V3.1 or higher.
3939+ ///
4040+ /// Determines how [the limit](Filter::limit_percent) behaves. This is applied *after* the [`FilterType`] behaviour.
4141+ ///
4242+ /// To see this in practice, check out [this video](https://youtube.com/watch?v=NJPPBvyHJjg&t=338).
3543 #[serde(rename = "d")]
3644 pub limit_behaviour: Option<LimitBehaviour>,
3737- /// Only present in difficulty file V3.1 or higher.
4545+ /// > Only present in difficulty file V3.1 or higher.
4646+ ///
4747+ /// A value from 0.0 to 1.0 which represents the percent of lights that will be effected,
4848+ /// and the behaviour is dependent on [`LimitBehaviour`].
3849 #[serde(rename = "l")]
3950 pub limit_percent: Option<f32>,
4051}
···4657 parameter1: 1,
4758 parameter2: 0,
4859 reverse: LooseBool::False,
4949- // Todo
5060 chunks: Some(1),
5161 random_behaviour: Some(RandomBehaviour::None),
5262 random_seed: Some(0),
+3-3
src/info.rs
···4141 pub environment: Environment,
4242 #[serde(rename = "_allDirectionsEnvironmentName")]
4343 pub all_directions_environment: AllDirectionEnvironment,
4444- /// Only present in info file V2.1 or higher.
4444+ /// > Only present in info file V2.1 or higher.
4545 #[serde(rename = "_environmentNames")]
4646 pub environments: Option<Vec<Environment>>,
4747- /// Only present in info file V2.1 or higher.
4747+ /// > Only present in info file V2.1 or higher.
4848 #[serde(rename = "_colorSchemes")]
4949 pub color_schemes: Option<Vec<ColorSchemeOverride>>,
5050 #[serde(rename = "_difficultyBeatmapSets")]
···161161 #[doc(alias = "node_jump_distance")]
162162 #[serde(rename = "_noteJumpStartBeatOffset")]
163163 pub njd: f32,
164164- /// Only present in info file V2.1 or higher.
164164+ /// > Only present in info file V2.1 or higher.
165165 #[serde(rename = "_beatmapColorSchemeIdx")]
166166 pub color_scheme_index: Option<i32>,
167167}
+3
src/timing_traits.rs
···11/// Represents any beatmap object that happens at a specific beat.
22pub trait Timed {
33+ /// Returns the beat that an object takes place.
34 fn get_beat(&self) -> f32;
45}
5667/// Represents any beatmap object that happens over a duration of time in beats.
78pub trait Duration: Timed {
99+ /// Returns the beat that an object ends.
810 fn get_end_beat(&self) -> f32;
1111+ /// Returns the length (in beats) that an object takes place.
912 fn get_duration(&self) -> f32;
1013}
1114