Skip to content

Commit

Permalink
moved bg image to local
Browse files Browse the repository at this point in the history
  • Loading branch information
maxibenner committed Aug 6, 2021
1 parent af7118c commit 34fc9c4
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 4 deletions.
11 changes: 11 additions & 0 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 @@ -8,6 +8,7 @@
"@testing-library/jest-dom": "^5.11.10",
"@testing-library/react": "^11.2.6",
"@testing-library/user-event": "^12.8.3",
"ccapture.js": "^1.1.0",
"ray-tracing-renderer": "^0.10.15",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
Binary file added public/env.hdr
Binary file not shown.
Binary file added public/envBg.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed public/envBg4.jpg
Binary file not shown.
Binary file removed src/assets/images/envBg.jpg
Binary file not shown.
5 changes: 3 additions & 2 deletions src/components/three/Viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@ import DecalHelper from "./DecalHelper"
import Model from "./Model"
import Scenes from "./Scenes"
import CanvasBackground from "./CanvasBackground"
//import {CCapture} from "ccapture.js"

softShadows({
near: 0.04,
samples: 20,
})

const Viewer = () => {
//var capturer = new CCapture( { format: 'webm' } );
const [modelFlipped, setModelFlipped] = useState(false)
const [modelRayData, setModelRayData] = useState(null)
const [gl, setGl] = useState(null)
Expand Down Expand Up @@ -56,7 +58,7 @@ const Viewer = () => {
<CanvasBackground>
<Canvas
style={decalPath && { cursor: "none" }}
gl={{ preserveDrawingBuffer: true }}
gl={{ preserveDrawingBuffer: true /*, antialias: false*/ }}
camera={{ position: [0, 0, 2.2], fov: 50 }}
frameloop="demand"
shadows
Expand All @@ -72,7 +74,6 @@ const Viewer = () => {
</Suspense>
<Scenes />
</Canvas>
<div />
</CanvasBackground>
<PhotoButton gl={gl} />
<ControlPanel />
Expand Down
4 changes: 2 additions & 2 deletions src/components/three/sets/EnvironmentBg.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Environment, useTexture } from "@react-three/drei"

const EnvironmentBg = () => {
const texture = useTexture("/envBg4.jpg")
const texture = useTexture("/envBg.jpg")
return (
<>
<Environment preset="dawn" background={false} />
<Environment background={false} path="/" files="env.hdr" />
<mesh position={[0, 0, -0.5]}>
<planeBufferGeometry args={[5, 3]} />
<meshBasicMaterial map={texture} />
Expand Down

0 comments on commit 34fc9c4

Please sign in to comment.