function expandAlign(alignStr) {
  const on = alignStr.startsWith('on');
  const index = parseInt(alignStr.substr(on? 2:3));
  return { on, index }
}
Expand the alignment string to a object.
@param { string } alignStr The alignment string, usually in the format 
`(on|off)\d+`, where the `on/off` indicates whether it is an on-point or an 
off-point, and the digits are the indices of the on-points array or the off
points array
@returns { {on: boolean, index: number} }