This is a replacement to the stock structure, with improved performance and an expanded editor including features such as automatic tangents, pre/post-infinity controls, snapping, undo/redo, and more.
More performant?
At the time of publishing, the stock Curve asset uses
O(n log n) time complexity to find and access keyframes because of the internal workings of ImmutableList. We use a single binary search and constant time array lookups, resulting in us instead running in
O(log n) time.
Profiling shows evaluation running at least 85% faster than the stock evaluations in the worst case, only improving as more keyframes are added.
Shortcuts:
Navigation and View:
F: Focus view
Middle-Mouse: Create keyframe at location
Left-Mouse (Hold): Box select
Delete: Remove selected keyframes
Ctrl+A: Select all
Ctrl+Z: Undo
Ctrl+Y: Redo
Scroll: Zoom
Scroll (Shift): Zoom Vertical
Scroll (Ctrl): Zoom Horizontal
Snapping and Axis Locking:
Z: Toggle time snapping
X: Toggle value snapping
Alt (Hold): Disable snap
Shift (Hold): Lock keyframe movement axis
Keyframe Manipulation:
1: Cubic interpolation - Auto tangents
2: Cubic interpolation - Mirrored tangents
3: Cubic interpolation - Split tangents
4: Linear interpolation
5: Stepped/Constant interpolation
6: Flatten tangents
Source: github.com/jimbomcb/sbox-altcurves