mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-24 09:26:43 +01:00
Modified tool bar for 3d mode
This commit is contained in:
parent
e2a9225e59
commit
d2a885d838
5 changed files with 10 additions and 8 deletions
|
|
@ -2,7 +2,7 @@ import * as math from '../math/math'
|
|||
|
||||
export const CUT = {
|
||||
icon: 'img/3d/cut',
|
||||
label: 'Cut',
|
||||
label: 'Cut',
|
||||
info: (p) => '(' + r(math.norm2(p.target)) + ')'
|
||||
};
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ export const PAD = {
|
|||
};
|
||||
|
||||
export const REVOLVE = {
|
||||
icon: 'img/3d/shell',
|
||||
icon: 'img/3d/revolve',
|
||||
label: 'Revolve',
|
||||
info: (p) => '(' + p.angle + ')'
|
||||
};
|
||||
|
|
@ -68,4 +68,4 @@ export const IMPORT_STL = {
|
|||
|
||||
function r(value) {
|
||||
return value.toPrecision(4).replace(/\.0$/, '');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,12 +60,14 @@ function UI(app) {
|
|||
|
||||
UI.prototype.createCraftToolBar = function (vertPos) {
|
||||
var toolBar = new ToolBar(this.app);
|
||||
toolBar.add(this.app.actionManager.actions['EditFace']);
|
||||
toolBar.add(this.app.actionManager.actions['CUT']);
|
||||
toolBar.add(this.app.actionManager.actions['PAD']);
|
||||
toolBar.add(this.app.actionManager.actions['PLANE']);
|
||||
toolBar.add(this.app.actionManager.actions['BOX']);
|
||||
toolBar.add(this.app.actionManager.actions['SPHERE']);
|
||||
toolBar.add(this.app.actionManager.actions['EditFace']);
|
||||
toolBar.add(this.app.actionManager.actions['PAD']);
|
||||
toolBar.add(this.app.actionManager.actions['CUT']);
|
||||
toolBar.add(this.app.actionManager.actions['REVOLVE']);
|
||||
|
||||
|
||||
|
||||
$('#viewer-container').append(toolBar.node);
|
||||
toolBar.node.css({left: '10px',top : vertPos + 'px'});
|
||||
return toolBar;
|
||||
|
|
|
|||
BIN
web/img/3d/revolve23.png
Normal file
BIN
web/img/3d/revolve23.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1,014 B |
BIN
web/img/3d/revolve96.png
Normal file
BIN
web/img/3d/revolve96.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.5 KiB |
Loading…
Reference in a new issue