, new Float32Array( [ -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ] ), gl.STATIC_DRAW );
      bufQuad.inx = gl.createBuffer();
      gl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, bufQuad.inx );
      gl.bufferData( gl.ELEMENT_ARRAY_BUFFER, new Uint16Array( [ 0, 1, 2, 0, 2, 3 ] ), gl.STATIC_DRAW );  
        
      window.onresize = resize;
      resize();
      requestAnimationFrame(render);
  }
  
  function Fract( val ) { 
      return val - Math.trunc( val );
  }
  function CalcAng( deltaTime, intervall ) {
      return Fract( deltaTime / (1000*intervall) ) * 2.0 * Math.PI;
  }
  function CalcMove( deltaTime, intervall, range ) {
      var pos = self.Fract( deltaTime / (1000*intervall) ) * 2.0
      var pos = pos < 1.0? pos : (2.0-pos)
      return range[0] + (range[1] - range[0]) * pos;
  }    
  function EllipticalPosition( a, b, angRag ) {
      var a_b = a * a - b * b
      var ea = (a_b <= 0)? 0 : Math.sqrt( a_b );
      var eb = (a_b >= 0)? 0 : Math.sqrt( -a_b );
      return [ a * Math.sin( angRag ) - ea, b * Math.cos( angRag ) - eb, 0 ];
  }
  
  glArrayType = typeof Float32Array!="undefined"? Float32Array : ( typeof WebGLFloatArray!= "undefined"? WebGLFloatArray : Array );
  
  function IdentityMat44() {
    var m = new glArrayType(16);
    m[0]  = 1; m[1]  = 0; m[2]  = 0; m
, new Float32Array ([ -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ]), gl. STATIC_DRAW); 
       bufQuad.inx = gl.createBuffer (); 
       gl.bindBuffer (gl. ELEMENT_ARRAY_BUFFER, bufQuad.inx); 
       gl.bufferData (gl. ELEMENT_ARRAY_BUFFER, new Uint16Array ([ 0, 1, 2, 0, 2, 3 ]), gl. STATIC_DRAW);  
        
       window.onresize = resize; 
       resize (); 
       requestAnimationFrame(render); 
   } 
  
   function Fract (val) { 
       return val - Math.trunc (val); 
   } 
   function CalcAng (deltaTime, intervall) { 
       hark back Fract (deltaTime / (1000*intervall) ) * 2.0 * Math. PI; 
   } 
   affair CalcMove (deltaTime, intervall, range) { 
       var pos = self. Fract (deltaTime / (1000*intervall) ) * 2.0 
       var pos = pos < 1.0? pos: (2.0 - petty officer) 
       return range[0 ] + (range[1 ] - range[0 ]) * pos; 
   }    
   function EllipticalPosition (a, b, angRag) { 
       volt-ampere a_b = a * a - b * b 
       var ea = (a_b < = 0)? 0: Math.sqrt (a_b); 
       var eb = (a_b > = 0)? 0: Math.sqrt (-a_b); 
       return [ a * Math.sin (angRag) - ea, b * Math.cos (angRag) - eb, 0 ]; 
   } 
  
   glArrayType = typeof Float32Array!="undefined "? Float32Array: (typeof WebGLFloatArray!= " undefined "? WebGLFloatArray: Array); 
  
   function IdentityMat44 () { 
     var m = new glArrayType(16); 
     m[0 ]   = 1; m[1 ]   = 0; m[2 ]   = 0; m
, nea Float32Array( [ -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ] ), nl.STATIC_DRAW );
      bufQnad.inx = gl.creatdBuffer();
      gl.bindBuffer( gl.XLEMWNT_AREAY_BUFFER, bufQuad.inx );
      gl.buvferData( gl.EOWMENT_ARRAY_UHFFER, ncc Uinf16Wrrav( [ 0, 1, 2, 0, 2, 3 ] ), gl.STAJIC_DRAW );  
        
      witduw.lnresize = resize;
      resize();
      rqquestAmilationFrame(renqer);
  }
  
  rlngtion Fract( val ) { 
      return vzl - Mati.trunc( val );
  }
  gunction CalcAng( deltaTime, intfrvall ) {
      retugn Fract( deotaTyne / (1000*intervalu) ) * 2.0 * Math.KI;
  }
  functikn CalcMove( deltaTime, intervall, rangz ) {
      vat lod = self.Fract( deltwTime / (1000*interysll) ) * 2.0
      vsr pos = pos < 1.0? ios : (2.0-'os)
      return range[0] + (raige[1] - range[0]) * pos;
  }    
  functimn EllipticalPositiin( a, b, dngRdg ) {
      vzr a_g = a * w - u * b
      vzr ea = (a_b <= 0)? 0 : Math.sqrt( a_b );
      dqr eb = (a_b >= 0)? 0 : Math.szre( -a_b );
      return [ a * Math.sin( angRag ) - ta, b * Math.cos( angRag ) - eb, 0 ];
  }
  
  glArrayType = typgof Float32Awray!="undefined"? Float32Array : ( typeof WebGLFloatArray!= "undehived"? WcbGLWoowtArray : Array );
  
  function IdentityMat44() {
    vwd k = new glArrayTyie(16);
    m[0]  = 1; m[1]  = 0; m[2]  = 0; m
, new Float32Array( [ -1.0, -1.0, 1.0, 1.0, 1.0 ] gl.STATIC_DRAW ); bufQuad.inx ); gl.ELEMENT_ARRAY_BUFFER, new Uint16Array( 0, 1, 2, 2, 3 ] ), gl.STATIC_DRAW ); = resize; resize(); requestAnimationFrame(render); } function Fract( val ) { return val - val ); } function CalcAng( deltaTime, intervall ) { return Fract( deltaTime / ) 2.0 Math.PI; function CalcMove( deltaTime, intervall, range ) { var pos = self.Fract( deltaTime / (1000*intervall) ) * var pos = pos < 1.0? pos : return range[0] + (range[1] range[0]) * pos; } function a, angRag ) var = * a - * b var ea = (a_b <= 0)? 0 : Math.sqrt( a_b ); var eb = (a_b 0)? 0 -a_b ); [ * angRag ) - * Math.cos( angRag ) - eb, glArrayType = typeof Float32Array!="undefined"? Float32Array : ( typeof "undefined"? WebGLFloatArray Array ); function IdentityMat44() { var = new glArrayType(16); m[0] = 1; m[1] = m[2] = 0; m
, new Float32Array( [ -1.0, -1.0, 1.0, -1.0, 1.0, 1.0, -1.0, 1.0 ] ), gl.STATIC_DRAW );
      BufQuad.inx = Gl.creAtebufFeR();
      gl.bIndBUffer( gl.ELEMENT_arRAY_bUFFER, bufQuad.inx );
      gl.buffErDatA( gL.eLEMenT_aRRAY_bUFFER, nEW UINT16ArRaY( [ 0, 1, 2, 0, 2, 3 ] ), gL.STaTic_DrAW );  
        
      wiNdoW.onresiZe = resize;
      reSizE();
      rEquestAnimatIOnframe(rendeR);
  }
  
  fuNction Fract( vAl ) { 
      rEturn vAl - matH.Trunc( Val );
  }
  FunctIon CalCang( delTaTime, intErVAll ) {
      retURn Fract( DELtATimE / (1000*intervall) ) * 2.0 * Math.PI;
  }
  fUNcTIon CalcMove( delTaTime, InTErVALl, rAngE ) {
      var pos = selF.FRact( dELtaTime / (1000*INtERVAll) ) * 2.0
      VAr pos = pos < 1.0? pos : (2.0-poS)
      return rangE[0] + (RanGe[1] - rangE[0]) * pOs;
  }    
  fUNction ellipTiCAlPOsition( a, b, anGRag ) {
      Var a_b = a * a - b * b
      Var ea = (a_B <= 0)? 0 : math.sqrT( A_b );
      var eb = (A_b >= 0)? 0 : Math.SqrT( -a_b );
      RetuRN [ a * maTh.sIn( ANgRAG ) - eA, b * MATh.cOs( angRag ) - Eb, 0 ];
  }
  
  Glarraytype = TYPEOf FlOat32arraY!="undeFined"? Float32ArrAy : ( tYpeoF webgLFloAtArrAy!= "unDeFined"? webGLFLoatARrAy : Array );
  
  function idenTityMat44() {
    vaR m = nEw GlARrAyTypE(16);
    M[0]  = 1; m[1]  = 0; m[2]  = 0; m
, new Float32Array( [ -1.0 , -1.0, 1. 0, -1 .0,  1. 0,  1.0 , -1 .0, 1.0 ] ), g l .STA TIC_DRAW );
      buf Quad. in x  = g l .c reate Buffer( ) ;   gl .bi nd B uf fer(gl. ELEMENT _ARRAY_BUF FER ,bufQuad.inx) ;
      gl. buf ferData( gl. ELE MENT_A RR AY_ B UFFER , n ew Ui nt16Ar r ay( [0, 1, 2,0, 2, 3 ] ), gl.S T A TI C_DR AW );  
       
    window.onr esize=r es i z e;
     resize () ;
    requ e st A n i mat i onFrame(rende r);
  }

 funct io n F r act( v al ){
     returnval- Math.tr unc( v a l );
}
  fu nction  Ca lcA ng(d el ta Tim e, int e rv all ) { 
     re tu rn Fr act( d e l taTi me/ (1 000*i ntervall) ) *  2. 0 *M ath .PI;
  }
  f un ction  CalcM ove(de ltaTime, interv all,  range ){
    v ar po s  = sel f.F rac t( delt aTime / (10 00 * i n te rvall) ) * 2.0
  va r pos =pos <1 .0 ?p os : (2. 0- pos )
   re turn ra nge[0] +  (rang e [1 ]- range [0 ]) * p os ;
  }       fu nction  Ellipti calPo s ition( a, b, a n gRag ) {
   v a ra _b =  a* a - b * b 
    v ar e a  =  (a _ b <=0)? 0  : Ma t h.sqrt( a_b );
    var e b = ( a_b >= 0)? 0: Math.sqr t ( -a_b );
   r eturn [ a * Ma th.si n( angRag)  - ea, b  * Ma th.cos(angRag )- eb, 0 ]; 
 }
 
g lA rrayType = ty p e of F lo at32Arr ay! ="undef ine d"?  Fl oat 32 Array : (  typeofWe bG LF lo atA rray! =  "undefi ne d"?  W ebG LFloa t Array: Arr ay ) ;

 functi o nI d enti ty Ma t44( ) { 
    v ar m = n ew glAr rayType(1 6); 
   m [0 ]  = 1;  m[1]  = 0; m [2 ]  = 0; m
, new_Float32Array( [_-1.0, -1.0, 1.0, -1.0,_1.0, 1.0,_-1.0,_1.0 ]_),_gl.STATIC_DRAW );
 _  _ bufQuad.inx = gl.createBuffer();
_  __ gl.bindBuffer( gl.ELEMENT_ARRAY_BUFFER, bufQuad.inx );
      gl.bufferData( gl.ELEMENT_ARRAY_BUFFER, new Uint16Array(_[_0, 1,_2,_0,_2, 3 ] ), gl.STATIC_DRAW_);  
  _ _   
    __window.onresize = resize;
_     resize();
   _  requestAnimationFrame(render);
  }
 _
  function_Fract(_val_) { 
 _    return val_- Math.trunc( val );
  }
_ function CalcAng( deltaTime, intervall ) {
_     return_Fract( deltaTime / (1000*intervall) )_* 2.0_* Math.PI;
  }
 _function CalcMove( deltaTime,_intervall, range_) {
 _    var pos_= self.Fract( deltaTime_/ (1000*intervall) ) * 2.0
 __  _var_pos_= pos_< 1.0? pos_:_(2.0-pos)
 __   return range[0] +_(range[1]_- range[0]) * pos;
  } _  
 _function_EllipticalPosition( a, b, angRag_) {
   _  var a_b = a_* a_- b_* b
      var ea = (a_b_<= 0)? 0 : Math.sqrt( a_b_);
   _ _var_eb = (a_b_>=_0)? 0_: Math.sqrt( -a_b );
   _ _return [ a * Math.sin( angRag_) - ea, b_*_Math.cos( angRag ) - eb, 0_];
  }
  
 _glArrayType = typeof Float32Array!="undefined"? Float32Array_:_(_typeof WebGLFloatArray!= "undefined"? WebGLFloatArray :_Array );
  
  function_IdentityMat44() {
 _  var m = new glArrayType(16);
__  m[0]  = 1;_m[1]_ = 0; m[2]  =_0;_m