add tool position to animation. bump rev 2.4.d9

This commit is contained in:
Stewart Allen 2020-11-30 10:59:24 -05:00
commit 5fd4683e41
7 changed files with 46 additions and 4 deletions

View file

@ -1,6 +1,6 @@
{
"name": "grid-apps",
"version": "2.4.8D",
"version": "2.4.9D",
"description": "grid.space 3d slice & modeling tools",
"author": "Stewart Allen <sa@grid.space>",
"license": "MIT",

View file

@ -1637,7 +1637,7 @@
], {modes:CAM, class:"ext-buttons f-row"}),
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM}),
camStock: UC.newGroup(LANG.cs_menu, null, {modes:CAM, marker: true}),
camStockX: UC.newInput(LANG.cs_wdth_s, {title:LANG.cs_wdth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
camStockY: UC.newInput(LANG.cs_dpth_s, {title:LANG.cs_dpth_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),

View file

@ -3,7 +3,7 @@
let terms = {
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
LICENSE: "See the license.md file included with the source distribution",
VERSION: "2.4.D8"
VERSION: "2.4.D9"
};
if (typeof(module) === 'object') {

View file

@ -8,6 +8,7 @@ self.kiri.loader.push(function() {
CAM = KIRI.driver.CAM,
API, WORLD, SPACE,
meshes = {},
toolPosX, toolPosY, toolPosZ,
speedValues = [ 25, 12, 6, 3 ],
speedNames = [ "1x", "2x", "4x", "8x" ],
speedIndex = 0,
@ -22,6 +23,7 @@ self.kiri.loader.push(function() {
SPACE = (API = api).const.SPACE;
WORLD = SPACE.platform.world;
$('layer-animate').innerHTML = '';
$('layer-toolpos').innerHTML = '';
Object.keys(meshes).forEach(id => deleteMesh(id));
}
@ -50,6 +52,12 @@ self.kiri.loader.push(function() {
setTimeout(() => {
play({steps: 1});
}, delay || 0);
const toolpos = $('layer-toolpos');
toolpos.innerHTML = '';
UC.setGroup(toolpos);
toolPosX = UC.newInput('x', {disabled: true, size: 7});
toolPosY = UC.newInput('y', {disabled: true, size: 7});
toolPosZ = UC.newInput('z', {disabled: true, size: 7});
});
};
@ -87,6 +95,11 @@ self.kiri.loader.push(function() {
mesh.position.y = pos.y;
mesh.position.z = pos.z;
SPACE.update();
if (id !== 0) {
toolPosX.value = pos.x.toFixed(2);
toolPosY.value = pos.y.toFixed(2);
toolPosZ.value = pos.z.toFixed(2);
}
}
}
if (data.mesh_update) {

View file

@ -56,6 +56,7 @@
api.ui.camContour.marker.style.display =
proc.camContourXOn || proc.camContourYOn ? 'flex' : 'none';
api.ui.camTracing.marker.style.display = proc.camTraceOn ? 'flex' : 'none';
api.ui.camStock.marker.style.display = proc.camStockOn ? 'flex' : 'none';
updateStock(settings, 'settings.saved.internal');
});

View file

@ -899,11 +899,38 @@ th, tr, td, label {
border-radius: 3px;
border: 1px solid #aaa;
margin: 1px 2px 2px 4px;
padding: 2px;
justify-content: center;
align-items: center;
font-weight: bold;
background-color: #ddd;
}
#layer-toolpos {
position: absolute;
right: 3px;
bottom: 3px;
}
#layer-toolpos label, #layer-toolpos input {
display: inline-flex;
height: 30px;
border-radius: 3px;
border: 1px solid #ccc;
justify-content: center;
align-items: center;
font-weight: bold;
background-color: #ddd;
}
#layer-toolpos label {
width: 30px;
padding: 1px 1px 1px 1px;
margin: 1px 1px 2px 6px;
}
#layer-toolpos input {
background-color: #eee;
font-family: monospace;
padding: 1px 4px 1px 4px;
margin: 1px 1px 2px 1px;
}
#slider {
display: none;

View file

@ -385,13 +385,14 @@
<div id="alert-text">alerts<br>alerts<br>alerts</div>
</div>
</div>
<div id="layer-animate" class="f-col a-center"></div>
</div>
<div id="gdpr" class="noshow">
<p>this site uses cookies to preserve application preferences</p>
<button id="gotit" class="f-col j-center">got it</button>
</div>
<div id="fps" class="noshow"></div>
<div id="layer-animate" class="f-col a-center"></div>
<div id="layer-toolpos" class="f-row a-center"></div>
<div id="winfo" class="noshow"></div>
</div>
</body>