forked from maxibenner/teeshot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6af3090
commit 902e5de
Showing
10 changed files
with
122 additions
and
13 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from "react" | ||
import PlainBg from "./sets/PlainBg" | ||
import Lights from "./Lights" | ||
import ShapesBg from "./sets/ShapesBg" | ||
import useStore from "../../states/modelState" | ||
|
||
const Scenes = () => { | ||
const { backgroundColor, set } = useStore() | ||
return ( | ||
<> | ||
{set == "PlainBg" && <group> | ||
<PlainBg backgroundColor={backgroundColor} /> | ||
<Lights /> | ||
</group>} | ||
{set == "ShapesBg" && <group> | ||
<ShapesBg backgroundColor={backgroundColor} /> | ||
<Lights /> | ||
</group>} | ||
</> | ||
) | ||
} | ||
|
||
export default Scenes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const PlainBg = ({backgroundColor}) => { | ||
return ( | ||
<mesh position={[0, 0, -.5]} receiveShadow> | ||
<planeBufferGeometry args={[100, 100]} /> | ||
<meshStandardMaterial color={backgroundColor} /> | ||
</mesh> | ||
); | ||
}; | ||
|
||
export default PlainBg; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
const ShapesBg = ({backgroundColor}) => { | ||
|
||
return ( | ||
<group> | ||
<mesh position={[0, 0, -0.5]} receiveShadow> | ||
<planeBufferGeometry args={[10, 10]} /> | ||
<meshStandardMaterial | ||
attach="material" | ||
color={backgroundColor} | ||
/> | ||
</mesh> | ||
<mesh position={[0.5, 0, 0.5]} rotation={[4, 0, 0]} receiveShadow> | ||
<boxBufferGeometry args={[0.06, 0.06, 0.06]} /> | ||
<meshStandardMaterial | ||
attach="material" | ||
color={backgroundColor} | ||
/> | ||
</mesh> | ||
<mesh position={[-0.5, -0.2, 0.5]} receiveShadow> | ||
<sphereBufferGeometry args={[0.05, 20, 20]} /> | ||
<meshStandardMaterial | ||
attach="material" | ||
color={backgroundColor} | ||
/> | ||
</mesh> | ||
<mesh | ||
position={[-0.5, 0.6, 0]} | ||
rotation={[3, 5.5, 0]} | ||
receiveShadow | ||
> | ||
<torusBufferGeometry args={[0.07, 0.03, 10, 30]} /> | ||
<meshStandardMaterial | ||
attach="material" | ||
color={backgroundColor} | ||
/> | ||
</mesh> | ||
<mesh | ||
position={[0.15, -0.45, 0.3]} | ||
rotation={[2.2, 3.5, 2]} | ||
receiveShadow | ||
> | ||
<torusBufferGeometry args={[0.05, 0.02, 10, 30]} /> | ||
<meshStandardMaterial | ||
attach="material" | ||
color={backgroundColor} | ||
/> | ||
</mesh> | ||
</group> | ||
) | ||
} | ||
|
||
export default ShapesBg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters