Apply translation/rotation/scale if present (and matrix is not).
Calculate geometricError on the transformed box, to handle scaling correctly.
Fix a couple of bugs in the handling of textures: textures[i].source does not necessarily point to images[i], and samplers were not being copied across to the glbm.