public void render() { AnimationFrame tempFrame = frames.get(curFrame); if (tempFrame.render()) { curFrame++; curFrame %= frames.size(); } }
private static JSONObject animationFrameToJSONObject(AnimationFrame frame) { JSONObject json = new JSONObject(); json.put("time", frame.getTime()); json.put("translate", JSONHelper.vector3fToJSONArray(frame.getTranslateValue())); json.put("rotate", JSONHelper.vector3fToJSONArray(frame.getRotValue())); json.put("scale", JSONHelper.vector3fToJSONArray(frame.getScaleValue())); json.put("offset", JSONHelper.vector3fToJSONArray(frame.getOffsetValue())); return (json); }