Improve preprender docs and format

This commit is contained in:
Kurt Hutten
2021-10-08 17:02:20 +11:00
parent 32d6ef27ad
commit 9f769d6a61
4 changed files with 18 additions and 4 deletions

View File

@@ -54,7 +54,9 @@ export const makeStlDownloadHandler =
extensions: ['.stl'],
})
}
toast("CadHub is a work in process and We're still working out kinks with the STL download.")
toast(
"CadHub is a work in process and We're still working out kinks with the STL download."
)
if (geometry) {
if (
type === 'geometry' &&

View File

@@ -15,6 +15,10 @@ class FatalErrorBoundary extends FatalErrorBoundaryBase {
```
$ git clone https://github.com/netlify/prerender.git
$ cd prerender
```
comment out the lines `server.use(require("./lib/plugins/basicAuth"));` and `server.use(require("./lib/plugins/s3HtmlCache"));` in `server.js`
then
```
$ npm install
$ npm start
```

View File

@@ -4,7 +4,7 @@ import { useLoader, useThree, useFrame } from '@react-three/fiber'
import { STLLoader } from 'three/examples/jsm/loaders/STLLoader'
import { useEdgeSplit } from 'src/helpers/hooks/useEdgeSplit'
import texture from 'src/components/IdeViewer/dullFrontLitMetal.png'
import { Glitch, EffectComposer } from "@react-three/postprocessing";
import { Glitch, EffectComposer } from '@react-three/postprocessing'
import { MeshDistortMaterial, Sphere, useTexture } from '@react-three/drei'
const thresholdAngle = 10

View File

@@ -281,7 +281,13 @@ function ModelSection({
const { ref, inView } = useInView()
return (
<div className="relative h-full">
<FatalErrorBoundary page={() => <div className="bg-gray-800 p-8 rounded-md text-ch-gray-300">something seams to have gone wrong here</div>}>
<FatalErrorBoundary
page={() => (
<div className="bg-gray-800 p-8 rounded-md text-ch-gray-300">
something seams to have gone wrong here
</div>
)}
>
<div className="absolute inset-0" ref={ref}>
<Canvas
linear
@@ -299,7 +305,9 @@ function ModelSection({
<pointLight position={[2, 1.5, 0]} color="#FF0000" intensity={2} />
<Suspense
fallback={<Html center className="loading" children="Loading..." />}
fallback={
<Html center className="loading" children="Loading..." />
}
>
<AssetWithGooey assetUrl={assetUrl} scale={scale} />
</Suspense>