Skip to content

Commit

Permalink
Custom render distance strumline
Browse files Browse the repository at this point in the history
  • Loading branch information
Kade-github authored Dec 28, 2024
1 parent bb24821 commit 5480d54
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions source/funkin/play/notes/Strumline.hx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,21 @@ class Strumline extends FlxSpriteGroup

static var RENDER_DISTANCE_MS(get, never):Float;

/**
* The custom render distance for the strumline.
* This should be in miliseconds only! Not pixels.
*/
public static var CUSTOM_RENDER_DISTANCE_MS:Float = 0.0;

/**
* Whether to use the custom render distance.
* If false, the render distance will be calculated based on the screen height.
*/
public static var USE_CUSTOM_RENDER_DISTANCE:Bool = false;

static function get_RENDER_DISTANCE_MS():Float
{
if (USE_CUSTOM_RENDER_DISTANCE) return CUSTOM_RENDER_DISTANCE_MS;
return FlxG.height / Constants.PIXELS_PER_MS;
}

Expand Down

0 comments on commit 5480d54

Please sign in to comment.