add tool position to animation. bump rev 2.4.d9
This commit is contained in:
parent
5b96d7de97
commit
5fd4683e41
7 changed files with 46 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "grid-apps",
|
"name": "grid-apps",
|
||||||
"version": "2.4.8D",
|
"version": "2.4.9D",
|
||||||
"description": "grid.space 3d slice & modeling tools",
|
"description": "grid.space 3d slice & modeling tools",
|
||||||
"author": "Stewart Allen <sa@grid.space>",
|
"author": "Stewart Allen <sa@grid.space>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
|
||||||
|
|
@ -1637,7 +1637,7 @@
|
||||||
], {modes:CAM, class:"ext-buttons f-row"}),
|
], {modes:CAM, class:"ext-buttons f-row"}),
|
||||||
|
|
||||||
camSep1: UC.newGroup(null, null, {modes:CAM, class:"set-sep"}),
|
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}),
|
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}),
|
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}),
|
camStockZ: UC.newInput(LANG.cs_hght_s, {title:LANG.cs_hght_l, convert:UC.toFloat, bound:UC.bound(0,9999), modes:CAM, units:true}),
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
let terms = {
|
let terms = {
|
||||||
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
COPYRIGHT: "Copyright (C) Stewart Allen <sa@grid.space> - All Rights Reserved",
|
||||||
LICENSE: "See the license.md file included with the source distribution",
|
LICENSE: "See the license.md file included with the source distribution",
|
||||||
VERSION: "2.4.D8"
|
VERSION: "2.4.D9"
|
||||||
};
|
};
|
||||||
|
|
||||||
if (typeof(module) === 'object') {
|
if (typeof(module) === 'object') {
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ self.kiri.loader.push(function() {
|
||||||
CAM = KIRI.driver.CAM,
|
CAM = KIRI.driver.CAM,
|
||||||
API, WORLD, SPACE,
|
API, WORLD, SPACE,
|
||||||
meshes = {},
|
meshes = {},
|
||||||
|
toolPosX, toolPosY, toolPosZ,
|
||||||
speedValues = [ 25, 12, 6, 3 ],
|
speedValues = [ 25, 12, 6, 3 ],
|
||||||
speedNames = [ "1x", "2x", "4x", "8x" ],
|
speedNames = [ "1x", "2x", "4x", "8x" ],
|
||||||
speedIndex = 0,
|
speedIndex = 0,
|
||||||
|
|
@ -22,6 +23,7 @@ self.kiri.loader.push(function() {
|
||||||
SPACE = (API = api).const.SPACE;
|
SPACE = (API = api).const.SPACE;
|
||||||
WORLD = SPACE.platform.world;
|
WORLD = SPACE.platform.world;
|
||||||
$('layer-animate').innerHTML = '';
|
$('layer-animate').innerHTML = '';
|
||||||
|
$('layer-toolpos').innerHTML = '';
|
||||||
Object.keys(meshes).forEach(id => deleteMesh(id));
|
Object.keys(meshes).forEach(id => deleteMesh(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,6 +52,12 @@ self.kiri.loader.push(function() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
play({steps: 1});
|
play({steps: 1});
|
||||||
}, delay || 0);
|
}, 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.y = pos.y;
|
||||||
mesh.position.z = pos.z;
|
mesh.position.z = pos.z;
|
||||||
SPACE.update();
|
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) {
|
if (data.mesh_update) {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@
|
||||||
api.ui.camContour.marker.style.display =
|
api.ui.camContour.marker.style.display =
|
||||||
proc.camContourXOn || proc.camContourYOn ? 'flex' : 'none';
|
proc.camContourXOn || proc.camContourYOn ? 'flex' : 'none';
|
||||||
api.ui.camTracing.marker.style.display = proc.camTraceOn ? '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');
|
updateStock(settings, 'settings.saved.internal');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -899,11 +899,38 @@ th, tr, td, label {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #aaa;
|
border: 1px solid #aaa;
|
||||||
margin: 1px 2px 2px 4px;
|
margin: 1px 2px 2px 4px;
|
||||||
|
padding: 2px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background-color: #ddd;
|
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 {
|
#slider {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -385,13 +385,14 @@
|
||||||
<div id="alert-text">alerts<br>alerts<br>alerts</div>
|
<div id="alert-text">alerts<br>alerts<br>alerts</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="layer-animate" class="f-col a-center"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="gdpr" class="noshow">
|
<div id="gdpr" class="noshow">
|
||||||
<p>this site uses cookies to preserve application preferences</p>
|
<p>this site uses cookies to preserve application preferences</p>
|
||||||
<button id="gotit" class="f-col j-center">got it</button>
|
<button id="gotit" class="f-col j-center">got it</button>
|
||||||
</div>
|
</div>
|
||||||
<div id="fps" class="noshow"></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 id="winfo" class="noshow"></div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue