set(grid, true);
MakeGridFace(front,0,0,2);
MakeGridFace(left,-90,0,3);
MakeGridFace(right,90,0,4);
MakeGridFace(back,180,0,5);
MakeGridFace(up,0,-90,1);
MakeGridFace(down,0,90,1);
MakeGridLines(front);
MakeGridLines(left);
MakeGridLines(right);
MakeGridLines(back);
MakeGridLines(up);
MakeGridLines(down);
set(_gfn, calc:'%1face');
addhotspot(get(_gfn));
copy(_hgf, hotspot[get(_gfn)]);
_hgf.loadstyle(cubeface);
set(_hgf,ath=%2,atv=%3,zorder=%4,bgcolor=calc('0x'+gv.%1_col));
set(_gft, calc:'%1facetit');
addlayer(get(_gft));
copy(_gt, layer[get(_gft)]);
_gt.loadstyle(gridtit);
set(_upper, %1);
toupper(_upper);
set(_gt,parent=calc('hotspot[%1face]'), html=calc(_upper),css=calc('font-family:Helvetica;font-weight:bold;font-size:100px;color:#' + gv.%1_col + ';'));
ifnot(%1 == 'up' || %1 == 'down',
set(_glc, calc:gv.grid_count);
set(_glc2, calc:gv.grid_count-1);
for(set(i,0), i LE _glc, inc(i),
set(_gln, calc:'%1lines_' + i);
set(_gly, calc:i*(1000/gv.grid_count)-(gv.line_thickness/2));
MakeGridHor(%1);
);
for(set(j,1), j LE _glc2, inc(j),
set(_glnv, calc:'%1lines_v_' + j);
set(_glx, calc:j*(1000/gv.grid_count)-(gv.line_thickness/2));
MakeGridVer(%1);
);
,
for(set(i,1), i LE _glc2, inc(i),
set(_gln, calc:'%1lines_' + i);
set(_glnv, calc:'%1lines_v_' + i);
set(_gly, calc:i*(1000/gv.grid_count)-(gv.line_thickness/2));
set(_glx, calc:i*(1000/gv.grid_count)-(gv.line_thickness/2));
MakeGridHor(%1);
MakeGridVer(%1);
);
);
ifnot(%1 == 'up' || %1 == 'down',
set(_glcc, calc:'%1cline');
addlayer(get(_glcc));
copy(_glccl, layer[get(_glcc)]);
_glccl.loadstyle(gridc);
set(_glccl.parent, calc:'hotspot[%1face]');
set(_glccl, x=0,y=0,zorder=20);
set(_glccl.bgcolor, calc:'0x'+gv.corner_col);
);
addlayer(get(_gln));
copy(_glnl, layer[get(_gln)]);
_glnl.loadstyle(gridh);
set(_glnl,parent=calc('hotspot[%1face]'),bgcolor=calc('0x'+gv.%1_col), x=0,y=calc(_gly));
addlayer(get(_glnv));
copy(_glnvl, layer[get(_glnv)]);
_glnvl.loadstyle(gridv);
set(_glnvl,parent=calc('hotspot[%1face]'), x=calc(_glx),y=0,bgcolor=calc('0x'+gv.%1_col));
for(sub(i,hotspot.count,1), i GE 0, dec(i),
if(hotspot[get(i)].gtag == 'grid',
removehotspot(get(hotspot[get(i)].name));
);
);
for(sub(i,layer.count,1), i GE 0, dec(i),
if(layer[get(i)].gtag == 'grid',
removelayer(get(layer[get(i)].name));
);
);
set(grid, false);