[05/09/2025] SpringV2

Hey guys, I’ve been cooking something lately for use in my other module, but I feel like it’s worthy to be released as a separate entity. So here’s SpringV2 as its own module, independently released (although still developed in the same game).

It’s a complete rewrite of my Spring module which was very janky (and was never posted here, just sitting the background). Instead of a 1D spring, it now has multiple dimensions it can work with, and the results are pretty solid to me.

I know that other spring modules already exist, but it’s nice to have alternatives. This module aims for simplicity, so people can easily use it.

With that out of the way, let’s just continue with the specifications.

Key features:

  1. Tweening instances’ properties with configurable springs.
  2. Nth dimensional springs for many supported data types.
  3. Automatically switches to deferred mode when performance dips below a certain threshold or when doing too many spring calculations.
  4. Spring parameters are slightly similar to SwiftUI’s spring implementations (the main inspiration to making this module in the first place), and uses just two variables, which are duration and bounces. duration controls the duration of the spring tween, and bounces control how much half-oscillations the spring does.

Primary APIs:

  1. module:tween(instance, springInfo:springInfo, propertyTable:{any}):
    Tweens the instance’s properties to the propertyTable given, with the springInfo configuration.

  2. module:springInfo(duration:number?, bounces:number?):
    Helper function to create a springInfo table.

  3. tweenObject.stop():
    Stops a tween object.

  4. tweenObject.getCompletedSignal(propertyKey:string):
    Gets a completed signal for a property currently tweened.

Get the thing:

You can get the module here, and the test place is the exact same place as that other module



You can request a suggestion or maybe report a problem by posting it here. I’ll probably implement or fix it.

10 Likes

can u plez show screenshots or a vid

2 Likes

ops forgor

I’ve updated the test place to include a simple SpringDemo app.

The video is limited to 30 FPS since snipping tool just does that.

Also, ignore the instability of each spring dimensions when the bounces parameter is set to large numbers, it’s due to floating point imprecisions, and it shouldn’t affect general usage. By the way, the windows primarily use the springs for movement.