Class AnimationSerializing

java.lang.Object
dev.kosmx.playerAnim.core.data.gson.AnimationSerializing

@Deprecated(forRemoval=true) public class AnimationSerializing extends Object
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 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

      public static String serializeAnimation(KeyframeAnimation animation)
      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

      public static Writer writeAnimation(KeyframeAnimation animation, Writer writer) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Write the animation to output stream
      Parameters:
      animation - animation
      writer - writer
      Returns:
      writer
      Throws:
      IOException - writer errors