3d render pipeline in JS