Class AnimationSerializing
java.lang.Object
dev.kosmx.playerAnim.core.data.gson.AnimationSerializing
Deprecated, for removal: This API element is subject to removal in a future version.
use AnimationCodecs instead
(De)Serialize
KeyframeAnimation
Can load emotecraft and basic gecko-lib animations
always create emotecraft animation
Use deserializeAnimation(Reader) to deserialize
or serializeAnimation(KeyframeAnimation) to serialize.
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic List<KeyframeAnimation> deserializeAnimation(InputStream stream) Deprecated, for removal: This API element is subject to removal in a future version.static List<KeyframeAnimation> deserializeAnimation(Reader stream) Deprecated, for removal: This API element is subject to removal in a future version.static StringserializeAnimation(KeyframeAnimation animation) Deprecated, for removal: This API element is subject to removal in a future version.Serialize animation into Emotecraft JSON formatstatic WriterwriteAnimation(KeyframeAnimation animation, Writer writer) Deprecated, for removal: This API element is subject to removal in a future version.Write the animation to output stream
-
Constructor Details
-
AnimationSerializing
public AnimationSerializing()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
deserializeAnimation
@Deprecated(forRemoval=true) public static List<KeyframeAnimation> deserializeAnimation(Reader stream) Deprecated, for removal: This API element is subject to removal in a future version.Deserialize animations from Emotecraft or GeckoLib InputStreamReader AnimatinCodecs#serialize()- Parameters:
stream- inputStreamReader- Returns:
- List of animations
-
deserializeAnimation
@Deprecated(forRemoval=true) public static List<KeyframeAnimation> deserializeAnimation(InputStream stream) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.Deserialize animations from Emotecraft or GeckoLib InputStream use AnimatinCodecs#serialize()- Parameters:
stream- inputStream- Returns:
- List of animations
- Throws:
IOException
-
serializeAnimation
Deprecated, for removal: This API element is subject to removal in a future version.Serialize animation into Emotecraft JSON format- Parameters:
animation- animation- Returns:
- string
-
writeAnimation
Deprecated, for removal: This API element is subject to removal in a future version.Write the animation to output stream- Parameters:
animation- animationwriter- writer- Returns:
- writer
- Throws:
IOException- writer errors
-