moved VertexAttributes's calculateOffsets as static method in VertexAttribute