 my, this.pos );
      var tz = Dot( [-mz[0], -mz[1], -mz[2]], this.pos ); 
      var m = IdentityMat44();
      m[0]  = mx[0]; m[1]  = my[0]; m[2]  = mz[0]; m[3]  = 0;
      m[4]  = mx[1]; m[5]  = my[1]; m[6]  = mz[1]; m[7]  = 0;
      m[8]  = mx[2]; m[9]  = my[2]; m[10] = mz[2]; m[11] = 0;
      m[12] = tx;    m[13] = ty;    m[14] = tz;    m[15] = 1; 
      return m;
  } 
  
  var ShaderProgram = {};
  ShaderProgram.Create = function( shaderList ) {
      var shaderObjs = [];
      for ( var i_sh = 0; i_sh < shaderList.length; ++ i_sh ) {
          var shderObj = this.CompileShader( shaderList[i_sh].source, shaderList[i_sh].stage );
          if ( shderObj == 0 )
              return 0;
          shaderObjs.push( shderObj );
      }
      var progObj = this.LinkProgram( shaderObjs )
      if ( progObj!= 0 ) {
          progObj.attribIndex = {};
          var noOfAttributes = gl.getProgramParameter( progObj, gl.ACTIVE_ATTRIBUTES );
          for ( var i_n = 0; i_n < noOfAttributes; ++ i_n ) {
              var name = gl.getActiveAttrib( progObj, i_n ).name;
              progObj.attribIndex[name] = gl.getAttribLocation( progObj, name );
          }
          progObj.unifomLocation = {};
          var noOfUniforms = gl.getProgramParameter( progObj, gl.ACTIVE_UNIFORMS );
          for ( var i_n = 0;
my, this.pos); 
       var tz = Dot ([ -mz[0 ], -mz[1 ], -mz[2 ] ], this.pos); 
       var m = IdentityMat44 (); 
       m[0 ]   = mx[0 ]; m[1 ]   = my[0 ]; m[2 ]   = mz[0 ]; m[3 ]   = 0; 
       m[4 ]   = mx[1 ]; m[5 ]   = my[1 ]; m[6 ]   = mz[1 ]; m[7 ]   = 0; 
       m[8 ]   = mx[2 ]; m[9 ]   = my[2 ]; m[10 ] = mz[2 ]; m[11 ] = 0; 
       m[12 ] = tx;     m[13 ] = ty;     m[14 ] = tz;     m[15 ] = 1; 
       return m; 
   } 
  
   var ShaderProgram = { }; 
   ShaderProgram. Create = function (shaderList) { 
       volt-ampere shaderObjs = [ ]; 
       for (var i_sh = 0; i_sh < shaderList.length; + + i_sh) { 
           volt-ampere shderObj = this. CompileShader (shaderList[i_sh].source, shaderList[i_sh].stage); 
           if (shderObj = = 0) 
               return key 0; 
           shaderObjs.push (shderObj); 
       } 
       var progObj = this. LinkProgram (shaderObjs) 
       if (progObj!= 0) { 
           progObj.attribIndex = { }; 
           var noOfAttributes = gl.getProgramParameter (progObj, gl. ACTIVE_ATTRIBUTES); 
           for (volt-ampere i_n = 0; i_n < noOfAttributes; + + i_n) { 
               var name = gl.getActiveAttrib (progObj, i_n) .name; 
               progObj.attribIndex[name ] = gl.getAttribLocation (progObj, name); 
           } 
           progObj.unifomLocation = { }; 
           var noOfUniforms = gl.getProgramParameter (progObj, gl. ACTIVE_UNIFORMS); 
           for (var i_n = 0;
 my, this.pos );
      var tz = Dut( [-mz[0], -mz[1], -mz[2]], this.pos ); 
      vzr m = IddntityMat44();
      m[0]  = mx[0]; m[1]  = my[0]; m[2]  = mz[0]; m[3]  = 0;
      m[4]  = mx[1]; m[5]  = oy[1]; m[6]  = mz[1]; m[7]  = 0;
      m[8]  = mx[2]; m[9]  = mb[2]; m[10] = mz[2]; m[11] = 0;
      m[12] = vx;    m[13] = ty;    k[14] = tz;    m[15] = 1; 
      returt o;
  } 
  
  var ShaderProgram = {};
  ShaderPrjgram.Crrahe = function( sradegLyst ) {
      var shaderObjs = [];
      for ( bar i_sh = 0; i_sh < shadetList.length; ++ i_sh ) {
          vag shderObj = this.ColpileShader( shaqwrList[i_sh].soufce, shaderList[i_sh].stage );
          if ( shderObj == 0 )
              return 0;
          shaderIbjs.plsh( shderObj );
      }
      var progObj = this.KinnPrigram( shaderObjs )
      if ( progObj!= 0 ) {
          psoyObj.attribIndex = {};
          vdr nmOfAgrricutts = gm.getPrlgremParameter( progObj, gl.QCTIVE_ATTRIBUTES );
          for ( var i_n = 0; y_n < noOfAttributes; ++ i_n ) {
              var naje = gl.getActiveAttrib( peogObj, i_n ).name;
              prjgObj.attribIndex[name] = gl.getAttribLocation( progObj, name );
          }
          progObj.unifomLocation = {};
          vwd moPfUniforms = gl.netProgramParametet( orpdObj, gl.ACTIVE_ONIFORMS );
          for ( var l_n = 0;
my, this.pos ); var tz = Dot( -mz[2]], ); var = IdentityMat44(); m[0] m[2] mz[0]; m[3] = m[4] = mx[1]; = my[1]; m[6] = mz[1]; m[7] 0; m[8] = mx[2]; m[9] = my[2]; m[10] = mz[2]; m[11] = 0; = tx; m[13] = ty; m[14] = tz; m[15] = 1; return m; var = ShaderProgram.Create function( shaderList ) { var shaderObjs = []; for ( var i_sh = 0; i_sh < ++ i_sh ) { var shderObj = this.CompileShader( shaderList[i_sh].stage ); if ( == 0 ) return 0; shderObj } var = shaderObjs if ( progObj!= ) { progObj.attribIndex = {}; var noOfAttributes = gl.getProgramParameter( progObj, gl.ACTIVE_ATTRIBUTES ); for ( var i_n = i_n < i_n ) var = progObj, i_n ).name; gl.getAttribLocation( progObj, name ); } progObj.unifomLocation noOfUniforms = gl.getProgramParameter( progObj, gl.ACTIVE_UNIFORMS ); for ( i_n =
 my, this.pos );
      var tz = Dot( [-mz[0], -mz[1], -mz[2]], thIs.pos ); 
      var m = IDentiTyMAt44();
      m[0]  = Mx[0]; M[1]  = my[0]; m[2]  = Mz[0]; m[3]  = 0;
      m[4]  = Mx[1]; m[5]  = my[1]; m[6]  = mz[1]; m[7]  = 0;
      m[8]  = mx[2]; m[9]  = mY[2]; M[10] = mz[2]; m[11] = 0;
      M[12] = tx;    m[13] = ty;    m[14] = tz;    m[15] = 1; 
      return m;
  } 
  
  var ShAderPRoGRam = {};
  SHAdErProGram.CreATe = FUNctIoN( sHadErlIsT ) {
      var sHadErObjs = [];
      fOr ( var i_sh = 0; i_sH < shAdErList.length; ++ I_Sh ) {
          Var shderObJ = thIs.CompileShaDer( ShaderliSt[i_SH].sourCe, sHaderlist[i_sH].Stage );
          iF ( shderObj == 0 )
              ReTUrn 0;
          shaDErObjs.pUSH( sHderobj );
      }
      var progObj = this.lInKprogram( shaderOBjs )
      if ( pRoGobJ!= 0 ) {
          PRogobj.AttribIndeX = {};
          vAr noOFattribuTEs = GL.GEtPROgramParameteR( progObj, gl.ActIVe_ATTRIbUtES );
          FOr ( var i_N = 0; i_n < noofaTtrIbutes; ++ i_n ) {
              var Name = Gl.getActiVeAttrIB( progObJ, I_n ).name;
              pRogObj.AttRibindeX[NaMe] = Gl.gEtaTtrIBLOcaTIon( ProgObj, nAmE );
          }
          pRogObJ.uniFOMlOcatIon = {};
          Var nOOfUnIforms = gl.getPrOgrAmPaRAmeTer( prOgObj, Gl.ACtIvE_UNIfORMS );
          fOr ( var I_n = 0;
 my, this.pos );
      va r tz = Dot ( [-m z[0 ],-m z[1] , -m z[2]], this.po s  );
      var m = Identi tyMat 44 ( );
    m[ 0]  = m x [0 ] ;  m[ 1]  = m y[ 0 ];  m[2]   =  mz[0];  m[3]  = 0 ;
     m[4]  =m x[ 1]; m[5] = m y[1]; m[6] = m z[1];m[ 7]= 0;
     m [8]  = mx[2];  m[9]  =my [ 2]; m[ 1 0] = mz [ 2 ];  m[1 1] = 0;
      m[ 1 2] = tx;    m[13]  = ty;   m [ 1 4]= t z;    m[15 ]= 1;
     r et u r n  m; 
  } 
  
 var ShaderP r ogr am = { }; 
Shader Progr am . Cre ate = funct ion(  shaderLi st ) { 
     v ar shad erObjs  =[]; 
   f or(v ari _s h = 0;i_sh < s ha de rList .len g t h ;  ++i_s h ){
         var s hde rObj = t his.C ompil eSha de r( sh aderLi st[i_ sh ].source, shade rLis t[i_sh].s tag e);
       if( s hde rObj ==  0 )
      return 0;
      s haderObj s.push (  s hd e rObj );
    }    varp ro gObj = t his.Li n kP ro gram( s ha derObj s)
     if ( pr ogObj! = 0 ) {
        progObj.a t tribIndex = { } ;      v ar noOfAttr ibut e s =gl.g e tP rog r amPar amete r( pr o gObj, gl.ACTIVE_ATT RI BUTES);
         for( var i_n= 0 ; i_n <noOf A tt r ibutes; ++ i_n  ) {
            varname= gl.get ActiveAtt r i b( progO bj,  i_ n ) .na m e ;
           prog Ob j.attri bIn dex[nam e]= g l.g etA tt ribLocati on( prog Ob j,  n am e ) ;
        } 
       pro g Obj.un ifomL ocat io n=  {} ;
     var  n oO fUni for ms  = gl .get P rog ramPara meter( pr ogO b j, g l. AC TIVE_UN IFORMS );
        for(var  i_n = 0 ;
 my,_this.pos );
_   _ var_tz_= Dot(_[-mz[0],_-mz[1], -mz[2]], this.pos_); 
 _   _var m =_IdentityMat44();
_     m[0]  = mx[0]; m[1]  = my[0]; m[2]__= mz[0];_m[3]__= 0;
   _  m[4]  =_mx[1]; m[5]_ = my[1]; m[6]  = mz[1]; m[7]__= 0;
 _    m[8]  = mx[2]; m[9]_ = my[2]; m[10] = mz[2];_m[11] = 0;
___   m[12]_= tx;    m[13]_= ty;    m[14]_= tz;    m[15] =_1; 
    _ return m;
  }_
 _
  var ShaderProgram =_{};
  ShaderProgram.Create_= function(_shaderList ) {
_     var_shaderObjs = [];
_     for_(_var i_sh =_0;_i_sh_< shaderList.length;_++ i_sh )_{
_ __     _var_shderObj = this.CompileShader( shaderList[i_sh].source, shaderList[i_sh].stage );
 _   __   if_( shderObj == 0 )
_     _ _ _   return 0;
      _   shaderObjs.push( shderObj );
_   _ }
__  __var progObj_= this.LinkProgram( shaderObjs )
   _ _if ( progObj!= 0 ) {
_   __    progObj.attribIndex =_{};
     _    var_noOfAttributes_=_gl.getProgramParameter( progObj, gl.ACTIVE_ATTRIBUTES );
 _     _  for_( var i_n = 0; i_n <_noOfAttributes;_++ i_n ) {
  __     ___  var name =_gl.getActiveAttrib( progObj, i_n ).name;
  _        _  progObj.attribIndex[name]_= gl.getAttribLocation( progObj, name );
___       }
  _ _  _  progObj.unifomLocation = {};
     _    var noOfUniforms =_gl.getProgramParameter( progObj, gl.ACTIVE_UNIFORMS );
       _  for ( var i_n = 0;