update code to gl-matrix 2.2