switched to glmatrix js library rather than porting my old matrix code. probably a good idea.