supermedium / moonrider

🌕🏄🏿 Surf the musical road among the stars. Side project built by two people in a few months to demonstrate WebXR.
https://moonrider.xyz
MIT License
581 stars 225 forks source link

support "mapping extensions" beatmaps #192

Open digama0 opened 7 months ago

digama0 commented 7 months ago

Some maps like Shirobon - Into the Zone make use of the Mapping Extensions add-on(?), in which _lineIndex and _lineLayer are not in the range 0..3, 0..2 but are instead more than 1000. This would previously cause these maps to break, generating all notes in a line on the left. The explanation of the mapping is given here, which has been copied into this code.

I had to remove the indirection through horizontalPositionsHumanized, because it does not generalize well to notes at fractional positions. Other mappings have been converted to linear functions as appropriate.