start tools module
This commit is contained in:
parent
ff298e8300
commit
3cdb739566
6 changed files with 12 additions and 3 deletions
|
|
@ -5,10 +5,11 @@
|
|||
(function () {
|
||||
|
||||
if (!self.kiri) {
|
||||
self.kiri = {
|
||||
let kiri = self.kiri = {
|
||||
beta: 3029,
|
||||
driver: {}, // driver modules
|
||||
loader: [] // module loading: array of functions
|
||||
loader: [], // module loading: array of functions
|
||||
load: (fn) => kiri.loader.push(fn)
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2604,6 +2604,7 @@
|
|||
$('mode-cam').onclick = () => { API.mode.set('CAM') };
|
||||
$('mode-laser').onclick = () => { API.mode.set('LASER') };
|
||||
$('unrotate').onclick = () => { API.widgets.for(w => w.unrotate()) };
|
||||
$('lay-flat').onclick = () => { API.event.emit("tool.mesh.lay-flat") };
|
||||
// rotation buttons
|
||||
let d = (Math.PI / 180) * 5;
|
||||
$('rot_x_lt').onclick = () => { API.selection.rotate(-d,0,0) };
|
||||
|
|
|
|||
|
|
@ -3202,6 +3202,7 @@
|
|||
|
||||
// new module loading
|
||||
kiri.loader.forEach(mod => { mod(kiri.api)} );
|
||||
kiri.load = (mod) => { mod(kiri.api) };
|
||||
|
||||
// upon restore, seed presets
|
||||
API.event.emit('preset', API.conf.dbo());
|
||||
|
|
|
|||
5
src/kiri/tools.js
Normal file
5
src/kiri/tools.js
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
kiri.load(function(api) {
|
||||
api.event.on('tool.mesh.lay-flat', () => {
|
||||
// console.log('initiate lay-flat');
|
||||
});
|
||||
});
|
||||
Loading…
Reference in a new issue