frameModel static method
A view of data from above and to the front-left, far enough back to
see all of it, size pixels square.
Implementation
static RenderView frameModel(ModelData data, int size) {
final box = Aabb3();
data.bounds.transformInto(gltfToEngine, box);
if (box.isEmpty) {
box.setValues(-0.5, -0.5, -0.5, 0.5, 0.5, 0.5);
}
// Up is -Y: the eye is above (negative y) and in front (negative z).
return frameBounds(box, size, size, toward: Vector3(-0.55, -0.5, -0.67));
}