vsrg 0.3.0

Data structures for vertical scrolling rhythm games
Documentation
//! Generic storage of rhythm game notes.
//!
//! This module provides abstraction of rhythm game notes as [`LongNoteData`] and
//! [`ShortNoteData`], and generic storage for them as [`LongNoteTypeStorage`] and
//! [`ShortNoteTypeStorage`]. Both storages stores the notes in struct-of-array layout via
//! [`soa_rs`] for good cache-locality, and also sort the notes such that querying them either by
//! note's time or by their [`crate::ScrollPosition`] is fast.
//!
//! It also provides [`crate::generate_notes_storage`] that allows quickly generating a type for
//! storing, querying and editing different kinds of rhythm game notes that your game may require,
//! ideal for both supporting rhythm gameplay, and also modifying them at runtime with an editor.
//!
//! To support games that requires representing not just individual notes, but relationships
//! between notes (for example: highlighting notes with the same time), [`NotesStorageEditHook`] is
//! provided that allows note storage to modify notes before and after each edit. Some common cases
//! are provided by the [`relations`] module.

pub mod relations;

mod generator;
mod group;
mod long;
mod short;
mod types;

pub use generator::notes_storage::{Note, NoteState, NotesStorage, NotesStorageEditHook};
pub use group::{GroupId, NoteGroup, NoteGroups};
pub use long::{
    LongNoteData, LongNoteTypeStorage, ScrollIndexedLongNoteGroup, TimeIndexedLongNoteGroup,
};
pub use short::{ShortNoteData, ShortNoteTypeStorage, query_intersecting};
pub use types::{Interval, NoteMut, NoteRef, NoteSnapshot};