mirror of
https://github.com/darksaid98/Flashback.git
synced 2026-12-01 14:38:50 +00:00
Stuff
This commit is contained in:
1 parent
9c4a30d224
commit
666398e480
174 files changed
+8694
-2942
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package com.moulberry.flashback;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.moulberry.flashback.keyframe.Keyframe;
|
||||
import com.moulberry.flashback.keyframe.impl.CameraKeyframe;
|
||||
import com.moulberry.flashback.keyframe.impl.FOVKeyframe;
|
||||
import com.moulberry.flashback.keyframe.impl.TickrateKeyframe;
|
||||
import com.moulberry.flashback.keyframe.impl.TimeOfDayKeyframe;
|
||||
import com.moulberry.flashback.serialization.QuaternionTypeAdapater;
|
||||
import com.moulberry.flashback.serialization.Vector3fTypeAdapater;
|
||||
import org.joml.Quaternionf;
|
||||
import org.joml.Vector3f;
|
||||
|
||||
public class FlashbackGson {
|
||||
|
||||
public static Gson PRETTY = build().setPrettyPrinting().create();
|
||||
public static Gson COMPRESSED = build().create();
|
||||
|
||||
private static GsonBuilder build() {
|
||||
return new GsonBuilder()
|
||||
.registerTypeAdapter(Vector3f.class, new Vector3fTypeAdapater())
|
||||
.registerTypeAdapter(Quaternionf.class, new QuaternionTypeAdapater())
|
||||
.registerTypeAdapter(CameraKeyframe.class, new CameraKeyframe.TypeAdapter())
|
||||
.registerTypeAdapter(FOVKeyframe.class, new FOVKeyframe.TypeAdapter())
|
||||
.registerTypeAdapter(TickrateKeyframe.class, new TickrateKeyframe.TypeAdapter())
|
||||
.registerTypeAdapter(TimeOfDayKeyframe.class, new TimeOfDayKeyframe.TypeAdapter())
|
||||
.registerTypeAdapter(Keyframe.class, new Keyframe.TypeAdapter());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user