Hello there,
I am having a hard time with json serialization in java.
I am trying to serialize the skeleton data that is inside a component (I am using Artemis-odb).
I am using the basic skeletal load:
skeletalAnimationComponent.atlas = new TextureAtlas(Gdx.files.local("..."));
SkeletonJson json = new SkeletonJson(skeletalAnimationComponent.atlas);
SkeletonData skeletonData = json.readSkeletonData(Gdx.files.local("..."));
skeletalAnimationComponent.skeleton = new Skeleton(skeletonData);
And to save:
OutputStream writer = null;
try {
writer = new FileOutputStream("test.json");
IntBag toSave = new IntBag();
toSave.add(entityId);
worldSerializationManager.save(writer, new SaveFileFormat(toSave));
}
Of course it could be both something wrong in my setup, something in the Libgdx library or something else.
The animation is actually a sprite sheet based animation, thus creating meshes on an atlas and showing a mesh for each keyframe.
It contains 6 animations and around 50 keyframes total.
The file is...48+ mb.
Thanks a lot!