add rotate buttons

This commit is contained in:
Stewart Allen 2020-06-15 09:47:12 -04:00
commit 10f92b83ea
3 changed files with 38 additions and 4 deletions

View file

@ -1915,6 +1915,14 @@
$('mode-cam').onclick = () => { API.mode.set('CAM') };
$('mode-laser').onclick = () => { API.mode.set('LASER') };
$('unrotate').onclick = () => { API.widgets.for(w => w.unrotate()) };
// rotation buttons
let d = (Math.PI / 180) * 5;
$('rot_x_lt').onclick = () => { API.selection.rotate(-d,0,0) };
$('rot_x_gt').onclick = () => { API.selection.rotate( d,0,0) };
$('rot_y_lt').onclick = () => { API.selection.rotate(0,-d,0) };
$('rot_y_gt').onclick = () => { API.selection.rotate(0, d,0) };
$('rot_z_lt').onclick = () => { API.selection.rotate(0,0,-d) };
$('rot_z_gt').onclick = () => { API.selection.rotate(0,0, d) };
// add app name hover info
$('app-info').innerText = KIRI.version;