Improve preprender docs and format
This commit is contained in:
@@ -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' &&
|
||||
|
||||
@@ -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
|
||||
```
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user