Guide

Quick start

#include "ayatsuri.h"

ay2d_model *m = ay2d_load(bytes, len);           /* an .aom or a .moc3 */
if (!m) { puts(ay2d_last_error()); return; }

uint32_t yaw = (uint32_t)ay2d_parameter_index(m, "ParamAngleX");  /* once */

/* every frame */
float value = head_yaw;
ay2d_set_parameters(m, &yaw, &value, 1);
ay2d_update(m, dt);

uint32_t n = ay2d_drawables(m, NULL, 0);          /* how many */
ay2d_drawables(m, list, n);                       /* then draw list[0..n) in order */

ay2d_free(m);

That is the whole loop: set, update, draw. Everything else in this guide is detail around those three calls.