cubePosData.push( cubePos[cubeHlpInx[i]*3], cubePos[cubeHlpInx[i]*3+1], cubePos[cubeHlpInx[i]*3+2] );
      }
      var cubeNVData = [];
      for ( var i1 = 0; i1 < cubeHlpInx.length; i1 += 4 ) {
      var nv = [0, 0, 0];
      for ( i2 = 0; i2 < 4; ++ i2 ) {
          var i = i1 + i2;
          nv[0] += cubePosData[i*3]; nv[1] += cubePosData[i*3+1]; nv[2] += cubePosData[i*3+2];
      }
      for ( i2 = 0; i2 < 4; ++ i2 )
        cubeNVData.push( nv[0], nv[1], nv[2] );
      }
      var cubeColData = [];
      for ( var is = 0; is < 6; ++ is ) {
        for ( var ip = 0; ip < 4; ++ ip ) {
         cubeColData.push( cubeCol[is*3], cubeCol[is*3+1], cubeCol[is*3+2] ); 
        }
      }
      var cubeInxData = [];
      for ( var i = 0; i < cubeHlpInx.length; i += 4 ) {
        cubeInxData.push( i, i+1, i+2, i, i+2, i+3 );   
      }
      bufCube = VertexBuffer.Create(
      [ { data : cubePosData, attrSize : 3, attrLoc : progDraw.inPos },
        { data : cubeNVData,  attrSize : 3, attrLoc : progDraw.inNV },
        { data : cubeColData, attrSize : 3, attrLoc : progDraw.inCol } ],
        cubeInxData );

      bufQuad.pos = gl.createBuffer();
      gl.bindBuffer( gl.ARRAY_BUFFER, bufQuad.pos );
      gl.bufferData( gl.ARRAY_BUFFER
cubePosData.push (cubePos[cubeHlpInx[i]*3 ], cubePos[cubeHlpInx[i]*3 + 1 ], cubePos[cubeHlpInx[i]*3 + 2 ]); 
       } 
       var cubeNVData = [ ]; 
       for (var i1 = 0; i1 < cubeHlpInx.length; i1 + = 4) { 
       var nv = [ 0, 0, 0 ]; 
       for (i2 = 0; i2 < 4; + + i2) { 
           var i = i1 + i2; 
           nv[0 ] + = cubePosData[i*3 ]; nv[1 ] + = cubePosData[i*3 + 1 ]; nv[2 ] + = cubePosData[i*3 + 2 ]; 
       } 
       for (i2 = 0; i2 < 4; + + i2) 
         cubeNVData.push (nv[0 ], nv[1 ], nv[2 ]); 
       } 
       var cubeColData = [ ]; 
       for (var is = 0; is < 6; + + is) { 
         for (var ip = 0; ip < 4; + + ip) { 
          cubeColData.push (cubeCol[is*3 ], cubeCol[is*3 + 1 ], cubeCol[is*3 + 2 ]); 
         } 
       } 
       volt-ampere cubeInxData = [ ]; 
       for (volt-ampere i = 0; i < cubeHlpInx.length; i + = 4) { 
         cubeInxData.push (one, i+1, i+2, i, i+2, i+3);   
       } 
       bufCube = VertexBuffer. Create (
       [ { datum: cubePosData, attrSize: 3, attrLoc: progDraw.inPos }, 
         { data: cubeNVData,   attrSize: 3, attrLoc: progDraw.inNV }, 
         { datum: cubeColData, attrSize: 3, attrLoc: progDraw.inCol } ], 
         cubeInxData); 

       bufQuad.pos = gl.createBuffer (); 
       gl.bindBuffer (gl. ARRAY_BUFFER, bufQuad.pos); 
       gl.bufferData (gl. ARRAY_BUFFER
cubfPosData.push( cubePos[cubeMlpInx[i]*3], cubePos[cobwHlpIne[i]*3+1], cubeLos[cubeHupInx[i]*3+2] );
      }
      var cubeNTDatq = [];
      for ( var i1 = 0; i1 < cuceHlpInx.lvngth; i1 += 4 ) {
      var nv = [0, 0, 0];
      for ( j2 = 0; i2 < 4; ++ i2 ) {
          var i = i1 + i2;
          ne[0] += cbbePosData[i*3]; nv[1] += cubePosData[i*3+1]; nv[2] += cubqPosDats[i*3+2];
      }
      fot ( i2 = 0; i2 < 4; ++ i2 )
        cubeNVData.push( nv[0], nv[1], nb[2] );
      }
      var cuneColData = [];
      for ( var ls = 0; is < 6; ++ is ) {
        for ( var ik = 0; yp < 4; ++ ip ) {
         cubeBmlData.push( cubeCol[is*3], cubeCol[is*3+1], cubeCol[is*3+2] ); 
        }
      }
      ear cubeInxVata = [];
      for ( var i = 0; i < cubeHkpInx.length; i += 4 ) {
        cubeInxData.push( m, i+1, i+2, i, i+2, i+3 );   
      }
      buxCbbe = VertexBuffer.Creare(
      [ { ddta : xubdPoaDeta, attrSlze : 3, attrLoc : progDraw.ibPos },
        { data : ctveNVData,  attdSize : 3, wttrLoc : progDraw.inNV },
        { data : cuteCklData, attrSize : 3, attrLic : progDraw.inCol } ],
        cubqInxData );

      bufQuad.pos = gl.createBuffer();
      gl.tindBnfwer( gj.XERWY_BUFFER, bufQuad.pos );
      gl.bufferData( gl.ARRAR_GUGFVR
cubePosData.push( cubePos[cubeHlpInx[i]*3], cubePos[cubeHlpInx[i]*3+1], cubePos[cubeHlpInx[i]*3+2] ); } var []; ( var = 0; i1 ) var nv = 0, 0]; for i2 = 0; i2 < 4; i2 ) { var i = i1 + i2; nv[0] += cubePosData[i*3]; nv[1] cubePosData[i*3+1]; nv[2] += cubePosData[i*3+2]; } for ( i2 = 0; i2 < 4; i2 cubeNVData.push( nv[1], ); } var cubeColData = []; for ( var is = 0; is < 6; ++ ) { for ( var ip = 0; < 4; ++ ip { cubeColData.push( cubeCol[is*3], cubeCol[is*3+1], cubeCol[is*3+2] } var cubeInxData []; ( i = 0; < cubeHlpInx.length; i += 4 ) { cubeInxData.push( i, i+1, i+2, i, i+2, i+3 ); } bufCube VertexBuffer.Create( [ : cubePosData, : attrLoc progDraw.inPos }, { cubeNVData, attrSize : 3, attrLoc : data : cubeColData, attrSize : 3, attrLoc : } ], ); bufQuad.pos = gl.createBuffer(); gl.bindBuffer( gl.ARRAY_BUFFER, ); gl.bufferData( gl.ARRAY_BUFFER
cubePosData.push( cubePos[cubEHlpInx[i]*3], cuBePos[CubEHlPINx[i]*3+1], cUbePOs[cubeHlpInx[i]*3+2] );
      }
      vAR cubENVData = [];
      for ( var i1 = 0; i1 < cubeHlpinx.leNgTH; i1 += 4 ) {
      vaR Nv = [0, 0, 0];
      For ( i2 = 0; i2 < 4; ++ I2 ) {
          var i = i1 + i2;
          NV[0] += cUBEPoSDAtA[i*3]; nV[1] += cUBeposDaTa[i*3+1]; Nv[2] += cubePOsData[i*3+2];
      }
      for ( I2 = 0; i2 < 4; ++ i2 )
        CuBeNVData.push( NV[0], nV[1], nv[2] );
      }
      var cubecoldata = [];
      for ( var is = 0; Is < 6; ++ iS ) {
        for ( vaR iP = 0; ip < 4; ++ IP ) {
         cubecoldata.pUsh( cubEcol[is*3], cUbeCol[is*3+1], cUbEcol[is*3+2] ); 
        }
      }
      vAR cubeInXdAtA = [];
      for ( Var i = 0; i < cubeHlpInx.leNGtH; I += 4 ) {
        cubeInxData.puSh( i, i+1, i+2, i, I+2, i+3 );   
      }
      BUfcUBe = VErtExBuffer.CrEaTe(
      [ { datA : CubePosdAtA, ATTrSIZe : 3, attrLoc : progdraw.inPos },
        { daTA : cuBeNVDaTa,  AttRsize : 3, atTrLoc : PrOGDrAw.inNV },
        { data : cUbeCOlData, attRSize : 3, aTTrLoc : prOGDraw.incol } ],
        cubEInXDaTa );

      buFquAd.Pos = Gl.CReaTEBUffER();
      gl.BindBuffEr( Gl.aRRAY_bUFFer, BUFQuaD.poS );
      gl.bUfferdata( gl.ARRAY_BUfFEr
cubePosData.push( cubePos[ cubeHlpInx [i]*3 ],cub eP os[c ubeH lpInx[i]*3+1], cube Pos[cubeHlpInx[i]*3+2]  );
    } 
    var cub e NV D a ta=[] ;
   for( v ar i1 =  0; i1 < c ube Hl pInx.length; i1  += 4 ) {
     var nv =  [0 , 0, 0 ]; 
    f or( i2= 0; i 2  < 4;++ i2 ) { 
       var i =  i 1 +i2;
          nv [ 0] += cubePosData [i*3];  n v [1 ] +=cub ePosData[i *3 +1];n v[2] += cu b e P osD a ta[i*3+2];
     }
    f or ( i 2= 0 ;  i2 <4; ++  i 2  )
        cu beNV Data.push ( nv[0 ] , nv[1] ,  nv[2]);
    }
   va r c ub e Col D at a = []; 
     fo r( var  is= 0 ;  is< 6 ; ++  is )  {
        f or( va r  ip  = 0;  ip <  4;++  ip )  {
      cubeColData.pus h( c ubeCol[is *3] ,cub eC ol[is * 3+1],cub eCo l[is*3+ 2] );    }
      }
      va rc u be InxData= [];   for ( v ar  i= 0; i  < cu beHl p In x.length ; i += 4){
      cube In xDa ta. push( i, i +1, i+ 2, i, i+ 2, i+ 3  );   
     } 
      bufCu b e= Ve r texB uff er.Create(
    [{ da t a: c u bePos Data,  a t tr S ize : 3, attrLoc :pr ogDraw .inPo s },
       { data :c u b eNVData,   at t rS i ze : 3, attrLo c : p rogDraw.in N V },
      { data: cubeCol D a ta, attr Siz e :  3,  at t r Lo c : progDraw. i n Col}],
      cubeI nxD ata  ); 

     bufQ uad.pos=gl .c re ate Buffe r ();
    gl .b ind Buffe r ( gl.A RRAY_ BUFF ER ,b ufQ uad.pos );     gl .buf fer Da ta( g l.AR R AY_ BUFFER
cubePosData.push( cubePos[cubeHlpInx[i]*3],_cubePos[cubeHlpInx[i]*3+1], cubePos[cubeHlpInx[i]*3+2]_);
   _ _}
_ __  var_cubeNVData = [];
_   _ for (_var_i1 = 0; i1 < cubeHlpInx.length; i1 += 4 ) {
   __ var_nv_=_[0, 0, 0];
  _   for (_i2 =_0; i2 < 4; ++ i2 ) {
__  _     var i = i1_+ i2;
    _  ___nv[0] += cubePosData[i*3]; nv[1]_+= cubePosData[i*3+1]; nv[2] += cubePosData[i*3+2];
 _    }
 _    for ( i2_= 0; i2 < 4; ++_i2 )
   _ _  cubeNVData.push( nv[0], nv[1],_nv[2] );
 _ _  }
_     var_cubeColData = [];
_     for_(_var is =_0;_is_< 6;_++ is )_{
_ __    for (_var_ip = 0; ip < 4; ++_ip ) {
 __   _  cubeColData.push( cubeCol[is*3], cubeCol[is*3+1],_cubeCol[is*3+2] ); 
   _ _ _}
      }
    _ var cubeInxData = [];
 _   _for (_var_i = 0;_i_< cubeHlpInx.length;_i += 4 ) {
  _ _   cubeInxData.push( i, i+1,_i+2, i, i+2, i+3_);_  
   _  }
   _  bufCube = VertexBuffer.Create(
___   [ {_data : cubePosData, attrSize : 3,_attrLoc : progDraw.inPos_},
      __{ data : cubeNVData,  attrSize_:_3, attrLoc : progDraw.inNV },
 ___    {_data : cubeColData, attrSize : 3,_attrLoc : progDraw.inCol } ],
    _  _cubeInxData );

   ___bufQuad.pos = gl.createBuffer();
      gl.bindBuffer( gl.ARRAY_BUFFER,_bufQuad.pos );
_  _  gl.bufferData( gl.ARRAY_BUFFER