cyclecad 3.10.0 → 3.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/index.html +75 -1
- package/app/js/fusion-help.json +373 -96
- package/app/js/killer-features.js +18 -6
- package/app/js/modules/ai-copilot.js +548 -41
- package/app/js/vendor/three-bvh-csg.js +3891 -0
- package/app/tests/ai-copilot-tests.html +230 -0
- package/docs/AI-COPILOT-TUTORIAL.md +150 -0
- package/docs/AI-COPILOT.md +99 -0
- package/docs/API-REFERENCE.md +17 -0
- package/package.json +1 -1
|
@@ -57,11 +57,11 @@ export const KillerFeatures = {
|
|
|
57
57
|
registerKeyboardShortcuts() {
|
|
58
58
|
document.addEventListener('keydown', (e) => {
|
|
59
59
|
if (e.ctrlKey || e.metaKey) {
|
|
60
|
-
if (e.key === 'k') { e.preventDefault(); this.features.aiCopilot?.show(); }
|
|
61
|
-
if (e.key === 'p') { e.preventDefault(); this.features.physics?.toggle(); }
|
|
62
|
-
if (e.key === 'g') { e.preventDefault(); this.features.generative?.show(); }
|
|
63
|
-
if (e.key === 'c') { e.preventDefault(); this.features.costEstimator?.
|
|
64
|
-
if (e.key === 't') { e.preventDefault(); this.features.parameterTable?.show(); }
|
|
60
|
+
if (e.key === 'k' && e.shiftKey) { e.preventDefault(); this.features.aiCopilot?.show(); }
|
|
61
|
+
if (e.key === 'p' && e.shiftKey) { e.preventDefault(); this.features.physics?.toggle(); }
|
|
62
|
+
if (e.key === 'g' && e.shiftKey) { e.preventDefault(); this.features.generative?.show(); }
|
|
63
|
+
if (e.key === 'c' && e.shiftKey) { e.preventDefault(); this.features.costEstimator?.toggle(); }
|
|
64
|
+
if (e.key === 't' && e.shiftKey) { e.preventDefault(); this.features.parameterTable?.show(); }
|
|
65
65
|
}
|
|
66
66
|
});
|
|
67
67
|
},
|
|
@@ -609,6 +609,17 @@ export const KillerFeatures = {
|
|
|
609
609
|
const estimator = {
|
|
610
610
|
show() {
|
|
611
611
|
this.createPanel();
|
|
612
|
+
const p = document.getElementById('kf-cost-panel');
|
|
613
|
+
if (p) p.style.display = 'block';
|
|
614
|
+
},
|
|
615
|
+
hide() {
|
|
616
|
+
const p = document.getElementById('kf-cost-panel');
|
|
617
|
+
if (p) p.style.display = 'none';
|
|
618
|
+
},
|
|
619
|
+
toggle() {
|
|
620
|
+
const p = document.getElementById('kf-cost-panel');
|
|
621
|
+
if (p && p.style.display !== 'none') this.hide();
|
|
622
|
+
else this.show();
|
|
612
623
|
},
|
|
613
624
|
|
|
614
625
|
createPanel() {
|
|
@@ -624,7 +635,7 @@ export const KillerFeatures = {
|
|
|
624
635
|
`;
|
|
625
636
|
|
|
626
637
|
panel.innerHTML = `
|
|
627
|
-
<h3 style="margin: 0
|
|
638
|
+
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:16px"><h3 style="margin: 0; font-size: 16px;">Manufacturing Cost</h3><button id="kf-cost-close" style="background:rgba(0,0,0,0.2);border:0;color:#fff;width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:18px;line-height:1">x</button></div>
|
|
628
639
|
|
|
629
640
|
<div style="display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px;">
|
|
630
641
|
<div style="background: rgba(0,0,0,0.15); padding: 12px; border-radius: 8px; text-align: center;">
|
|
@@ -658,6 +669,7 @@ export const KillerFeatures = {
|
|
|
658
669
|
`;
|
|
659
670
|
|
|
660
671
|
document.body.appendChild(panel);
|
|
672
|
+
document.getElementById('kf-cost-close')?.addEventListener('click', () => estimator.hide());
|
|
661
673
|
this.updateCosts();
|
|
662
674
|
|
|
663
675
|
// Listen to scene changes
|