Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
stl uploads, huge preview improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
colinhartigan committed Oct 30, 2023
1 parent d32b61b commit 3a3d50f
Show file tree
Hide file tree
Showing 15 changed files with 596 additions and 371 deletions.
7 changes: 7 additions & 0 deletions cors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[
{
"origin": ["*"],
"method": ["GET"],
"maxAgeSeconds": 3600
}
]
34 changes: 32 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"eslint-config-next": "13.4.9",
"firebase": "^10.1.0",
"firebase-admin": "^11.11.0",
"formidable": "^3.5.1",
"formik": "^2.4.5",
"image-js": "^0.35.4",
"js-sha256": "^0.10.1",
Expand Down
22 changes: 22 additions & 0 deletions src/components/STLViewer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { chakra } from '@chakra-ui/react';

import { StlViewer } from 'react-stl-viewer';

const ChakraSTL = chakra(StlViewer);

export function STLViewer({ ...props }) {
// i think this is a pretty good color that looks good on both light and dark backgrounds while maintaining shadow visibility for part recognizability
const modelColor = '#746D69';

return (
<ChakraSTL
{...props}
modelProps={{
color: modelColor,
scale: 1
}}
shadows
orbitControls
/>
);
}
283 changes: 0 additions & 283 deletions src/components/printing/PrintPreview.js

This file was deleted.

Loading

0 comments on commit 3a3d50f

Please sign in to comment.