public static JsonObject serialize(ScaleFeature feature) { JsonObject obj = new JsonObject(JsonObject.JsonType.OBJECT); JsonObject scale = feature.scale; obj["scale"] = scale; return(obj); }
public override ParticleFeature create(JsonObject initData) { Vector3 vec = new Vector3(); if (initData["scale"] != null) { JsonObject v = initData["scale"]; vec.X = (float)v["x"]; vec.Y = (float)v["y"]; vec.Z = (float)v["z"]; } ScaleFeature lf = new ScaleFeature(vec); return(lf); }