Skip to content

Commit

Permalink
shadows update
Browse files Browse the repository at this point in the history
  • Loading branch information
donsiamese committed Aug 28, 2023
1 parent a68882c commit cbd49f9
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 64 deletions.
2 changes: 1 addition & 1 deletion src/components/Balloon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const UpWithPlayer = 'up-with-player'
const CheckInText = 'Ready?'
const CheckOutText = 'Free ride!'

const Balloon = ({ yMax = 20, yMin = 0, waitingTime = 5000, ...props }) => {
const Balloon = ({ yMax = 20, yMin = 0.0, waitingTime = 5000, ...props }) => {
const collisionTimerRef = useRef()
const collisionStatusRef = useRef(false)
const intersectionStatusRef = useRef(false)
Expand Down
5 changes: 3 additions & 2 deletions src/components/Hero.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ const Hero = (props) => {
map: dressTexture,
roughness: 1,
metalness: 1,
toneMapped: true,
emissive: '#000000',
})

Expand Down Expand Up @@ -78,6 +77,7 @@ const Hero = (props) => {
skeleton={nodes.Mesh.skeleton}
castShadow
receiveShadow
toneMapped={true}
/>
<skinnedMesh
name="Mesh_1"
Expand All @@ -86,7 +86,7 @@ const Hero = (props) => {
skeleton={nodes.Mesh_1.skeleton}
castShadow
receiveShadow
toneMapped={false}
toneMapped={true}
/>
<skinnedMesh
name="Mesh_2"
Expand All @@ -95,6 +95,7 @@ const Hero = (props) => {
skeleton={nodes.Mesh_2.skeleton}
castShadow
receiveShadow
toneMapped={true}
/>
</group>
<primitive object={nodes.mixamorigHips} />
Expand Down
10 changes: 5 additions & 5 deletions src/components/Lights.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ const Dawn = 0xffe6b3
const Lights = ({ color = Dawn }) => {
const light = useRef()
useFrame((state) => {
light.current.position.z = state.camera.position.z
light.current.position.x = state.camera.position.x + 40
light.current.position.y = state.camera.position.y + 60
light.current.position.z = state.camera.position.z + 2
light.current.position.x = state.camera.position.x + 0
light.current.position.y = state.camera.position.y + 50
})
return (
<>
Expand All @@ -20,8 +20,8 @@ const Lights = ({ color = Dawn }) => {
color={color}
// position={[40, 10, 25]}
shadow-mapSize={[1024, 1024]}
shadow-camera-near={20}
shadow-camera-far={150}
shadow-camera-near={0}
shadow-camera-far={80}
shadow-camera-top={50}
shadow-camera-right={50}
shadow-camera-bottom={-50}
Expand Down
10 changes: 10 additions & 0 deletions src/components/Lumberjack.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,30 +37,40 @@ const Lumberjack = (props) => {
geometry={nodes.Cube001_Cube003.geometry}
material={materials['Material.001']}
skeleton={nodes.Cube001_Cube003.skeleton}
castShadow
receiveShadow
/>
<skinnedMesh
name="Cube002_Cube004"
geometry={nodes.Cube002_Cube004.geometry}
material={materials['Material.001']}
skeleton={nodes.Cube002_Cube004.skeleton}
castShadow
receiveShadow
/>
<skinnedMesh
name="Cube_Cube001"
geometry={nodes.Cube_Cube001.geometry}
material={materials['Material.001']}
skeleton={nodes.Cube_Cube001.skeleton}
castShadow
receiveShadow
/>
<skinnedMesh
name="Cylinder001_Cylinder004"
geometry={nodes.Cylinder001_Cylinder004.geometry}
material={materials['Material.001']}
skeleton={nodes.Cylinder001_Cylinder004.skeleton}
castShadow
receiveShadow
/>
<skinnedMesh
name="Cylinder_Cylinder002"
geometry={nodes.Cylinder_Cylinder002.geometry}
material={materials['Material.001']}
skeleton={nodes.Cylinder_Cylinder002.skeleton}
castShadow
receiveShadow
/>
</group>
</group>
Expand Down
6 changes: 3 additions & 3 deletions src/components/Prize.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ const Prize = ({
category = CategoryIntroduction,
// base position of the prize
position = [0, 0, 0],
radius = 0.7,
height = 1.5,
radius = 0.3,
height = 1,
yMin = 0,
yMax = 1,
scaleMin = 0.5,
scaleMax = 1.5,
scaleMax = 1.0,
transparent = true,
prizeOffsetPosition = [0, 0, 0],
}) => {
Expand Down
6 changes: 3 additions & 3 deletions src/components/World.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const World = ({
<Ocean scale={[12, 12, 12]} position={[0, -2.2, 0]} />
<Kite rotation={[0, 0, 0]} scale={[1, 1, 1]} position={[2.06, -3.16, -30.67]} />
<Flag rotation={[0, 2.7, 0]} scale={[0.21, 0.3, 0.21]} position={[60.04, 11.7, 72.7]} />
<Flag rotation={[0, 2.7, 0]} scale={[0.21, 0.3, 0.21]} position={[-75.3, 10.0, 2.2]} />
<Flag rotation={[0, 2.7, 0]} scale={[0.21, 0.3, 0.21]} position={[-75.3, 9.8, 2.2]} />
<Flag rotation={[0, 0, 0]} scale={[0.21, 0.21, 0.21]} position={[39.7, 13.1, -52.5]} />

{/* //Pick color - Media #fa953b, History - #306fc5, Hermeneutics - #9e43c8, Digital landscapes - #ed407d, Intro - #7c7c7c */}
Expand Down Expand Up @@ -336,7 +336,7 @@ const World = ({
position={[45.2, 12.8, 56.68]}
/>
{/*House - next to Beach*/}
<House rotation={[0, -2, 0]} scale={[5.5, 5.5, 5.5]} position={[-10, -0.8, 46]} />
<House rotation={[0, -2, 0]} scale={[5.5, 5.5, 5.5]} position={[-10, 0, 46]} />
{/*House - next to Theatre*/}
<House
rotation={[0, 0 - 2.2, 0]}
Expand Down Expand Up @@ -375,7 +375,7 @@ const World = ({
<Player isMobile={isMobile} debug={debug}></Player>

<Boundaries />
<Sensor position={[-60.51, 26.97, -48.47]} />
<Sensor height={20} width={20} position={[-60.51, 26.97, -48.47]} />
</Physics>
</Canvas>
</KeyboardControls>
Expand Down
50 changes: 0 additions & 50 deletions src/store/animations.js

This file was deleted.

0 comments on commit cbd49f9

Please sign in to comment.