-
Notifications
You must be signed in to change notification settings - Fork 7
Heck Animation Settings
An AnimationSettings object contains information about how an animation should be processed.
You can create one like so:
const animationSettings = new rm.AnimationSettings()There are 2 properties you can set on it:
-
bakeSampleFrequency- If this animation is baked using the baking system, this is how many points to sample. -
optimizer- This is an OptimizeSettings object for the animation. One is created automatically for you.
When an animation is "optimized", it is essentially trying to remove as many points as possible that don't contribute to the final look of the animation too much.
An OptimizeSettings object describes how the animation should be optimized.
You can create one like so:
const optimizeSettings = new rm.OptimizeSettings()There are a couple properties you can set on it:
-
disabled- Whether the optimizer is bypassed. -
performanceLog- Whether to log the percentage of points that were removed by the optimizer. -
optimizeDuplicates- Whether to run an optimize function that removes adjacent points that have the same value. -
optimizeSimilarPoints- An object that has options for an optimize function that removes points that are similar in value to each other.
{
active: true,
differenceThreshold: 1,
timeDifferenceThreshold: 0.001
}-
optimizeSimilarPointsSlope- An object that has options for an optimize function that removes points that are not contributing to the path of the animation.

{
active: true,
differenceThreshold: 0.03,
timeDifferenceThreshold: 0.025,
yInterceptDifferenceThreshold: 0.5
}-
additionalOptimizers- Custom optimize functions to run on all the points. -
passes- How many times to run all of the optimize functions.
OptimizeFunctions are functions that run on each point in an animation and determine whether it should be kept.
Since we are typically not trying to remove the edge-most points, it is run only on the points between the first and last point. *Unless there are only 2 points, than it's run on the last one.
It gets information about the left point, current point, and right point if the animation size is greater than 2.
If the point is supposed to be removed, return it.
(
pointA: rm.PointInfo,
pointB: rm.PointInfo,
pointC: rm.PointInfo | undefined,
) => rm.PointInfo | undefinedPointInfo is an object that contains information about the point it represents.
{
readonly values: ReadonlyArray<number>
readonly time: number
readonly hasFlags: boolean
readonly original: InnerPointBoundless
}- Info
- Difficulty
- Beatmap Objects
- Gameplay Objects
- Walls
- Basic Notemods
- Note Iterators
- Basic Events
- V3 Events
- Custom Events
- Heck Tracks and Animation
- Easings
- Point Types
- Point Utilities
- Heck Animation Baking
- Heck Animation Settings
Non-Vivify Models
Vivify