s&
About
The Project
info
About s&box
map
Roadmap
monitoring
Metrics
Engine startup and usage numbers
Updates
newspaper
Latest News
published_with_changes
Changes
Release-by-release changelog
Games
Browse Games
Discover Games
gamejams
Workshop
Playable
sports_esports
Games
Standalone games and gamemodes
Assets
landscape
Maps
view_in_ar
Models
texture
Materials
apparel
Clothing
apps
Everything
Every asset type in one list
Forum
Learn
Documentation
rocket_launch
Getting Started
docs
Documentation
api
API Reference
Resources
school
Tutorials
manage_search
Code Search
Get s&box
Sign in with Steam
Api
Common Structs
Curve
chevron_left
Common Structs
struct
Curve
Constructors
functions
Curve
Fields
crop_din
Frames
Properties
data_object
Item
data_object
Length
data_object
TimeRange
data_object
ValueRange
Methods
functions
AddOrReplacePoint
functions
AddPoint
functions
Evaluate
functions
EvaluateDelta
functions
Fix
functions
RemoveAtTime
functions
Reverse
functions
Sort
functions
UpdateTimeRange
functions
UpdateValueRange
functions
WithFrames
Static Fields
crop_din
Ease
crop_din
EaseIn
crop_din
EaseOut
crop_din
Linear
Curve
Describes a curve, which can have multiple key frames.
struct
Sandbox
.
sealed
Sandbox.System
build
Constructors
1
Curve
(
frames
)
crop_din
Fields
1
Frames
ImmutableArray`1
A list of keyframes or points on the curve.
data_object
Properties
4
Item
Frame
Length
int
Amount of key frames or points on the curve.
TimeRange
Vector2
The range of this curve. This affects looping.
ValueRange
Vector2
The value range. This should affect nothing but what it looks like in the editor.
functions
Methods
11
AddOrReplacePoint
(
keyframe
)
bool
Add given keyframe to this curve.
AddPoint
(
x
,
y
)
int
Add a new keyframe at given position to this curve.
Evaluate
(
time
,
angles
)
float
Returns the value on the curve at given time position.
EvaluateDelta
(
time
)
float
Like evaluate but takes a normalized time between 0 and 1 and returns a normalized value between 0 and 1
Fix
(
)
If the curve is broken in some way, we can fix it here. Ensures correct time and value ranges, and that the curve has at least one point.
RemoveAtTime
(
time
,
within
)
Remove all of the frames at the current time
Reverse
(
)
Curve
Make a copy of this curve that is reversed (If input eases from 0 to 1 then output will ease from 1 to 0)
Sort
(
)
Make sure we're all sorted by time
UpdateTimeRange
(
newRange
,
retainTimes
)
UpdateValueRange
(
newRange
,
retainValues
)
WithFrames
(
frames
)
Curve
crop_din
Static Fields
4
Ease
Curve
A curve that eases from 0 to 1
EaseIn
Curve
A curve that eases in from 0 to 1
EaseOut
Curve
A curve that eases out from 0 to 1
Linear
Curve
A curve that linearly interpolates from 0 to 1
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.