optimize reordering in o3dgc.js