Skip to content

Commit

Permalink
remove all ridudent rigid bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
donsiamese committed Jan 8, 2024
1 parent f83a8f7 commit bbf4e2b
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 90 deletions.
29 changes: 0 additions & 29 deletions src/components/Balloon.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,35 +225,6 @@ const Balloon = ({ yMax = 20, yMin = 0.0, waitingTime = 5000, ...props }) => {
</mesh>
</RigidBody>

{/* <Suspense fallback={null}>
<group {...props} dispose={null}>
<Text
position={[1, 0.5, 0]}
ref={textRef}
scale={[0.1, 0.1, 0.1]}
color="black" // default
anchorX="center" // default
anchorY="middle" // default
>
{CheckOutText}
</Text>
</group>
</Suspense> */}
{/* platform */}
{/* <mesh
position={[props.position[0], props.position[1] - 0.03, props.position[2]]}
receiveShadow
castShadow
>
<cylinderGeometry receiveShadow args={[1.5, 0.5, 0.1, 32]} />
<meshBasicMaterial receiveShadow>
<GradientTexture
stops={[0, 1]} // As many stops as you want
colors={['aquamarine', 'hotpink']} // Colors need to match the number of stops
size={1024} // Size is optional, default = 1024
/>
</meshBasicMaterial>
</mesh> */}
<group {...props} dispose={null} ref={balloonRef}>
<mesh
castShadow
Expand Down
8 changes: 0 additions & 8 deletions src/components/House.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ const House = (props, transparent = true, geometryPosition = [0, 0, 0]) => {

return (
<RigidBody colliders={'hull'} type={'fixed'}>
<mesh position={geometryPosition}>
<cylinderGeometry />
<meshStandardMaterial
color="green"
transparent={transparent}
opacity={transparent ? 0 : 0.7}
/>
</mesh>
<group {...props} dispose={null}>
<mesh
castShadow
Expand Down
8 changes: 0 additions & 8 deletions src/components/IcescreamTruck.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ const IcescreamTruck = (props, transparent = true, geometryPosition = [0, 0, 0])
}, [])
return (
<RigidBody colliders={'hull'} type={'fixed'}>
<mesh position={geometryPosition}>
<cylinderGeometry />
<meshStandardMaterial
color="green"
transparent={transparent}
opacity={transparent ? 0 : 0.7}
/>
</mesh>
<group {...props} dispose={null}>
<mesh
castShadow
Expand Down
52 changes: 24 additions & 28 deletions src/components/Lighttower.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,35 +7,31 @@ const Lighttower = ({ debug = true, ...props }) => {
return (
<group {...props} dispose={null}>
<RigidBody type={'fixed'} colliders={'hull'}>
<mesh position={[0, 0, 0]} rotation={[0, 0, 0]}>
<cylinderGeometry args={[0.3, 0.7, 5, 8]} />
<meshStandardMaterial color="green" transparent={!debug} opacity={debug ? 1 : 0} />
</mesh>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse.geometry}
material={getFrontSideMaterial(materials.Walls)}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_1.geometry}
material={getFrontSideMaterial(materials.Red)}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_2.geometry}
material={materials.Blue}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_3.geometry}
material={getFrontSideMaterial(materials.Base)}
/>
</RigidBody>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse.geometry}
material={getFrontSideMaterial(materials.Walls)}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_1.geometry}
material={getFrontSideMaterial(materials.Red)}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_2.geometry}
material={materials.Blue}
/>
<mesh
castShadow
receiveShadow
geometry={nodes.Lighthouse_3.geometry}
material={getFrontSideMaterial(materials.Base)}
/>
</group>
)
}
Expand Down
8 changes: 0 additions & 8 deletions src/components/ObservationTower.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ const ObservationTower = (props, transparent = true, geometryPosition = [0, 0, 0

return (
<RigidBody colliders={'hull'} type={'fixed'}>
<mesh position={geometryPosition}>
<cylinderGeometry />
<meshStandardMaterial
color="green"
transparent={transparent}
opacity={transparent ? 0 : 0.7}
/>
</mesh>
<group {...props} dispose={null}>
<mesh
castShadow
Expand Down
9 changes: 0 additions & 9 deletions src/components/StoneBig.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@ const StoneBig = (props, transparent = true, geometryPosition = [0, 0, 0]) => {
return (
<>
<RigidBody colliders={'hull'} type={'fixed'} castShadow receiveShadow>
<mesh position={geometryPosition}>
<cylinderGeometry />
<meshStandardMaterial
color="green"
transparent={transparent}
opacity={transparent ? 0 : 0.7}
/>
</mesh>

<group {...props} dispose={null}>
<mesh
castShadow
Expand Down

0 comments on commit bbf4e2b

Please sign in to comment.