Merge pull request #55 from Lapikud/development

Development
pull/56/head
Renkar 4 months ago committed by GitHub
commit d62a11b4e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 34
      src/app/[locale]/messiala/page.tsx
  2. 2
      src/components/Footer.tsx

@ -20,9 +20,9 @@ export default function Expo() {
const [mousePosition, setMousePosition] = useState({ x: 0, y: 0 });
const [showDividers, setShowDividers] = useState<boolean>(true);
const [currentView, setCurrentView] = useState<"tudengimaja" | "fuajee">(
"tudengimaja",
"fuajee",
);
const currentViewRef = useRef<"tudengimaja" | "fuajee">("tudengimaja");
const currentViewRef = useRef<"tudengimaja" | "fuajee">("fuajee");
const t = useTranslations();
// Define room names with translations
@ -103,9 +103,9 @@ export default function Expo() {
},
};
// Position camera for isometric view (default to tudengimaja)
camera.position.copy(cameraPositions.tudengimaja.position);
camera.lookAt(cameraPositions.tudengimaja.lookAt);
// Position camera for isometric view (default to fuajee)
camera.position.copy(cameraPositions.fuajee.position);
camera.lookAt(cameraPositions.fuajee.lookAt);
// Renderer
const renderer = new THREE.WebGLRenderer({ antialias: true });
@ -319,6 +319,9 @@ export default function Expo() {
// Store tudengimaja objects (rooms, ground, dividers)
tudengimajaObjects = [...rooms, ground, ground2, ...dividers];
// Set initial visibility for fuajee default view
tudengimajaObjects.forEach((obj) => (obj.visible = false));
// Load fuajee GLTF model
const loader = new GLTFLoader();
loader.load(
@ -327,7 +330,7 @@ export default function Expo() {
fuajeeMesh = gltf.scene;
fuajeeMesh.position.set(-1.5, 1, 0);
fuajeeMesh.scale.set(0.3, 0.3, 0.3);
fuajeeMesh.visible = false; // Initially hidden
fuajeeMesh.visible = true; // Initially visible for fuajee default
// Traverse the model to collect meshes
fuajeeMesh.traverse((child) => {
@ -342,6 +345,11 @@ export default function Expo() {
// Create example rooms for fuajee after the model loads
createfuajeeRooms();
// Set initial visibility for fuajee view
tudengimajaObjects.forEach((obj) => (obj.visible = false));
fuajeeMesh.visible = true;
fuajeeRooms.forEach((room) => (room.visible = true));
},
(progress) => {
console.log(
@ -457,7 +465,7 @@ export default function Expo() {
room.castShadow = true;
room.receiveShadow = true;
room.userData = { name: roomDef.name, originalColor: roomDef.color };
room.visible = false; // Initially hidden
room.visible = true; // Initially visible for fuajee default
scene.add(room);
fuajeeRooms.push(room);
@ -890,13 +898,14 @@ export default function Expo() {
{currentView === "fuajee" && (
<button
onClick={() => handleViewSwitch("tudengimaja")}
className="group absolute left-4 bottom-4 p-4 md:p-6 transition-all duration-300 hover:scale-110 z-20 touch-manipulation min-h-[48px] min-w-[48px] flex items-center justify-center"
className={`absolute bottom-2 left-1/2 transform -translate-x-1/2 px-3 py-2 bg-[#1F5673] text-white hover:bg-[#2A7A9B] ${vipnagorgialla.className} uppercase italic text-sm font-semibold flex items-center transition-colors shadow-lg z-10 cursor-pointer`}
title="Switch to Tudengimaja"
aria-label="Switch to Tudengimaja view"
>
<span className="material-symbols-outlined !text-[clamp(2.5rem,2rem+2vw,4rem)] !font-bold text-[#007CAB] dark:text-[#00A3E0] group-hover:-translate-x-2 dark:group-hover:text-[#EEE5E5] group-hover:text-[#EEE5E5] transition transform rotate-180">
<span className="material-symbols-outlined !text-2xl !font-bold text-white mr-2 transform rotate-180">
arrow_right_alt
</span>
{t("schedule.locations.studentHouse")}
</button>
)}
@ -904,11 +913,12 @@ export default function Expo() {
{currentView === "tudengimaja" && (
<button
onClick={() => handleViewSwitch("fuajee")}
className="group absolute right-4 bottom-4 p-4 md:p-6 transition-all duration-300 hover:scale-110 z-20 touch-manipulation min-h-[48px] min-w-[48px] flex items-center justify-center"
className={`absolute bottom-2 left-1/2 transform -translate-x-1/2 px-3 py-2 bg-[#1F5673] text-white hover:bg-[#2A7A9B] ${vipnagorgialla.className} uppercase italic text-sm font-semibold flex items-center transition-colors shadow-lg z-10 cursor-pointer`}
title="Switch to Fuajee"
aria-label="Switch to Fuajee view"
>
<span className="material-symbols-outlined !text-[clamp(2.5rem,2rem+2vw,4rem)] !font-bold text-[#007CAB] dark:text-[#00A3E0] group-hover:translate-x-2 dark:group-hover:text-[#EEE5E5] group-hover:text-[#EEE5E5] transition">
{t("schedule.locations.entranceHall")}
<span className="material-symbols-outlined !text-2xl !font-bold text-white ml-2">
arrow_right_alt
</span>
</button>
@ -917,7 +927,7 @@ export default function Expo() {
{currentView === "tudengimaja" && (
<button
onClick={() => setShowDividers(!showDividers)}
className={`absolute top-2 right-2 px-3 py-2 bg-[#1F5673] text-white hover:bg-[#2A7A9B] ${vipnagorgialla.className} uppercase italic text-sm font-semibold flex items-center transition-colors shadow-lg z-10`}
className={`absolute top-2 right-2 px-3 py-2 bg-[#1F5673] text-white hover:bg-[#2A7A9B] ${vipnagorgialla.className} uppercase italic text-sm font-semibold flex items-center transition-colors shadow-lg z-10 cursor-pointer`}
>
{showDividers ? (
<EyeClosed className="w-6 h-6 mr-2" />

@ -30,7 +30,7 @@ const Footer = () => {
{/* Social media */}
<div className="flex flex-row">
<a
href="https://discord.gg/eB7sVqgJ9b"
href="https://discord.gg/tipilan"
target="_blank"
className="mx-4 ml-0 md:ml-4"
rel="noopener noreferrer"

Loading…
Cancel
Save