mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-08-20 15:35:13 +00:00
boopin boppers.. head lerp
This commit is contained in:
parent
d49858217e
commit
123a7ae59b
|
@ -57,10 +57,10 @@ class CoolUtil
|
|||
}
|
||||
|
||||
/*
|
||||
* just lerp that does camLerpShit for u so u dont have to do it every time
|
||||
* frame dependant lerp kinda lol
|
||||
*/
|
||||
public static function coolLerp(a:Float, b:Float, ratio:Float):Float
|
||||
public static function coolLerp(base:Float, target:Float, ratio:Float):Float
|
||||
{
|
||||
return FlxMath.lerp(a, b, camLerpShit(ratio));
|
||||
return base + camLerpShit(ratio) * (target - base);
|
||||
}
|
||||
}
|
|
@ -1964,8 +1964,8 @@ class PlayState extends MusicBeatState
|
|||
// FlxG.watch.addQuick('VOL', vocals.amplitudeLeft);
|
||||
// FlxG.watch.addQuick('VOLRight', vocals.amplitudeRight);
|
||||
|
||||
iconP1.setGraphicSize(Std.int(FlxMath.lerp(150, iconP1.width, 0.85)));
|
||||
iconP2.setGraphicSize(Std.int(FlxMath.lerp(150, iconP2.width, 0.85)));
|
||||
iconP1.setGraphicSize(Std.int(CoolUtil.coolLerp(iconP1.width, 150, 0.15)));
|
||||
iconP2.setGraphicSize(Std.int(CoolUtil.coolLerp(iconP2.width, 150, 0.15)));
|
||||
|
||||
iconP1.updateHitbox();
|
||||
iconP2.updateHitbox();
|
||||
|
|
|
@ -93,8 +93,10 @@ class SwagCamera extends FlxCamera
|
|||
else
|
||||
{
|
||||
// THIS THE PART THAT ACTUALLY MATTERS LOL
|
||||
scroll.x += (_scrollTarget.x - scroll.x) * CoolUtil.camLerpShit(followLerp);
|
||||
scroll.y += (_scrollTarget.y - scroll.y) * CoolUtil.camLerpShit(followLerp);
|
||||
scroll.x = CoolUtil.coolLerp(scroll.x, _scrollTarget.x, followLerp);
|
||||
scroll.y = CoolUtil.coolLerp(scroll.y, _scrollTarget.y, followLerp);
|
||||
// scroll.x += (_scrollTarget.x - scroll.x) * CoolUtil.camLerpShit(followLerp);
|
||||
// scroll.y += (_scrollTarget.y - scroll.y) * CoolUtil.camLerpShit(followLerp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue