Package net.thewinnt.cutscenes.easing
Interface Easing
- All Known Implementing Classes:
ChainEasing,ClampEasing,ColorEasing,CompoundEasing,ConstantEasing,DoubleArgumentEasing,LerpEasing,SimpleEasing,SingleArgumentEasing,SplineEasing
public interface Easing
An easing smoothly transitions from value 0 to value 1. At least, in places it's meant to be an easing.
In other cases, it can be treated as a math function that takes in an argument in range [0, 1] and returns something
else from it. To get an idea what an easing (in its intended usage) is, as well as the visual representations of
simple (or legacy) easings, check out easings.net- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.slf4j.Logger -
Method Summary
Modifier and TypeMethodDescriptionstatic EasingfromJSON(@NotNull com.google.gson.JsonElement json) static EasingfromJSON(@NotNull com.google.gson.JsonElement json, LoadResolver<Easing> context) static Easingstatic EasingfromJSONPrimitive(com.google.gson.JsonPrimitive json) static EasingfromJSONPrimitive(com.google.gson.JsonPrimitive json, LoadResolver<Easing> context) static EasingfromNetwork(net.minecraft.network.FriendlyByteBuf buf) doubleget(double t) Returns the eased value from given tvoidtoNetwork(net.minecraft.network.FriendlyByteBuf buf) Deprecated.static void
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
EASING_MACROS
-
-
Method Details
-
get
double get(double t) Returns the eased value from given t- Parameters:
t- the initial progress (linear)- Returns:
- the eased value
-
getSerializer
EasingSerializer<?> getSerializer()- Returns:
- a serializer that creates easings of this type
-
toNetwork
Deprecated.use statictoNetwork(Easing, FriendlyByteBuf)instead -
toNetwork
-
fromJSON
-
fromJSON
static Easing fromJSON(@NotNull @NotNull com.google.gson.JsonElement json, LoadResolver<Easing> context) -
fromJSON
-
fromJSONPrimitive
-
fromJSONPrimitive
-
fromNetwork
-
toNetwork(Easing, FriendlyByteBuf)instead