model tree
Build and Push Docker Image / build (push) Successful in 13s

This commit is contained in:
jason
2026-04-23 13:46:54 -05:00
parent a262d4f018
commit ea1c7f6e7f
4 changed files with 162 additions and 5 deletions
+31 -2
View File
@@ -3,8 +3,10 @@
<style>
body { overflow: hidden; }
#viewer-canvas { display: block; width: 100vw; height: 100vh; }
#pdf-panel { transition: transform 0.3s ease; }
#pdf-panel.closed { transform: translateX(100%); }
#pdf-panel { transition: transform 0.3s ease; }
#pdf-panel.closed { transform: translateX(100%); }
#tree-panel { transition: transform 0.3s ease; }
#tree-panel.closed { transform: translateX(-100%); }
</style>
<!-- 3D Canvas -->
@@ -32,6 +34,16 @@
<!-- Top-right controls -->
<div class="fixed top-5 right-5 flex items-center gap-2 z-20">
<!-- Model tree toggle (STEP/STP only) -->
<% if (model.file_type === 'step' || model.file_type === 'stp') { %>
<button id="tree-toggle-btn" title="Toggle model tree"
class="flex items-center justify-center w-10 h-10 md:w-8 md:h-8 bg-surface-900/90 backdrop-blur-sm border border-gray-700 hover:border-gray-600 text-gray-400 hover:text-white rounded-xl transition-all">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="1.75">
<path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zM3.75 12h.007v.008H3.75V12zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0zm-.375 5.25h.007v.008H3.75v-.008zm.375 0a.375.375 0 11-.75 0 .375.375 0 01.75 0z"/>
</svg>
</button>
<% } %>
<!-- Fog toggle -->
<button id="fog-btn" title="Toggle atmosphere fog"
class="flex items-center justify-center w-10 h-10 md:w-8 md:h-8 bg-surface-900/90 backdrop-blur-sm border border-gray-700 hover:border-gray-600 text-gray-400 hover:text-white rounded-xl transition-all">
@@ -98,6 +110,23 @@
<p class="text-xs text-gray-700 md:hidden">1 finger — rotate &nbsp;·&nbsp; 2 fingers — pan/zoom</p>
</div>
<!-- Model tree panel (left side, STEP/STP only) -->
<% if (model.file_type === 'step' || model.file_type === 'stp') { %>
<div id="tree-panel" class="fixed top-0 left-0 h-full w-64 bg-surface-900/95 backdrop-blur-sm border-r border-gray-800 z-20 closed flex flex-col">
<div class="flex items-center justify-between px-4 py-4 border-b border-gray-800 shrink-0">
<h2 class="text-sm font-semibold text-white">Model Tree</h2>
<button id="tree-close-btn" class="p-1.5 rounded-lg text-gray-500 hover:text-white hover:bg-surface-800 transition-colors">
<svg class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M6 18L18 6M6 6l12 12"/>
</svg>
</button>
</div>
<div id="tree-content" class="flex-1 overflow-y-auto py-2">
<p class="text-xs text-gray-600 px-4 py-2">Awaiting model load…</p>
</div>
</div>
<% } %>
<!-- PDF slide-in panel -->
<% if (pdfs.length > 0) { %>
<div id="pdf-panel" class="fixed top-0 right-0 h-full w-full max-w-md bg-surface-900 border-l border-gray-800 z-20 closed flex flex-col">