Remove react-stl-viewer

This commit is contained in:
ochafik 2024-12-23 12:06:38 +00:00 committed by Olivier Chafik
commit a01a7df0a0
2 changed files with 1 additions and 29 deletions

View file

@ -22,8 +22,7 @@
"primeicons": "^6.0.1",
"primereact": "9.3.x",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-stl-viewer": "^2.2.5"
"react-dom": "^18.2.0"
},
"scripts": {
"test:e2e": "jest",

View file

@ -48,33 +48,6 @@ export default function ViewerPanel({className, style}: {className?: string, sty
}}
/>
)}
{state.output?.outFile && state.output.outFile.name.endsWith('.stl') && state.output?.outFileURL && (
<>
<StlViewer
style={{
width: '100%',
height: '100%',
}}
showAxes={state.view.showAxes}
orbitControls
shadows={state.view.showShadows}
modelProps={{
color: model.state.view.color,
}}
url={state.output?.outFileURL ?? ''}
/>
<ColorPicker
className={`opacity-animated ${!model.isComponentFullyVisible('viewer') ? 'opacity-0' : ''}`}
value={model.state.view.color}
style={{
position: 'absolute',
top: '12px',
left: '12px',
}}
onChange={(e) => model.mutate(s => s.view.color = `#${e.value ?? defaultModelColor}`)}
/>
</>
)}
</div>
)
}