diff --git a/docker-compose.yml b/docker-compose.yml index f689f10..9bcaab9 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,22 +3,10 @@ services: build: context: . dockerfile: dockerfile - network: host - container_name: nuitdelinfo + container_name: web restart: always + ports: + - 8080:2486 volumes: - ./back/data:/app/data - networks: - - traefik - labels: - - "traefik.enable=true" - - "traefik.http.routers.nuitdelinfo.rule=Host(`nuitdelinfo.leizour.fr`)" - - "traefik.http.routers.nuitdelinfo.entrypoints=websecure" - - "traefik.http.routers.nuitdelinfo.tls=true" - - "traefik.http.routers.nuitdelinfo.tls.certresolver=myresolver" - - "traefik.http.services.nuitdelinfo.loadbalancer.server.port=2486" - -networks: - traefik: - external: true diff --git a/front/src/components/3d/Axes.tsx b/front/src/components/3d/Axes.tsx index 29e489a..195e266 100644 --- a/front/src/components/3d/Axes.tsx +++ b/front/src/components/3d/Axes.tsx @@ -1,4 +1,6 @@ +import React from 'react' import { LineBasicMaterial, Line, Group } from 'three' +import { useFrame } from '@react-three/fiber' import * as THREE from 'three' export default function Axes() { diff --git a/front/src/components/3d/Character.tsx b/front/src/components/3d/Character.tsx index 272f3c3..f6d7d66 100644 --- a/front/src/components/3d/Character.tsx +++ b/front/src/components/3d/Character.tsx @@ -1,10 +1,11 @@ +import { Group, Mesh, MeshStandardMaterial, BufferGeometry } from 'three' import { useGLTF } from '@react-three/drei' export default function Character() { // import glb file // load the glb file in "/models/BASEmodel.glb" - const { scene } = useGLTF('/models/man.glb') + const { nodes, materials, scene } = useGLTF('/models/man.glb') // rotate the character scene.rotation.x = -Math.PI / 2 diff --git a/front/src/components/3d/Floor.tsx b/front/src/components/3d/Floor.tsx index 7a24e3f..dbb054b 100644 --- a/front/src/components/3d/Floor.tsx +++ b/front/src/components/3d/Floor.tsx @@ -1,3 +1,5 @@ + +import React from 'react' import { Group } from 'three' import * as THREE from 'three' diff --git a/front/src/components/3d/Marker.tsx b/front/src/components/3d/Marker.tsx index 61419d9..e38fe3e 100644 --- a/front/src/components/3d/Marker.tsx +++ b/front/src/components/3d/Marker.tsx @@ -1,4 +1,5 @@ import React from 'react' +import { Group } from 'three' import * as THREE from 'three' interface MarkerProps { @@ -14,7 +15,7 @@ export default function Marker({ position, color, onClick }: MarkerProps) { // Return the marker object // return return ( - setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={() => setPositionState(new THREE.Vector3(...position))}> + setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={(e) => setPositionState(new THREE.Vector3(...position))}> diff --git a/front/src/components/3d/Ocean.tsx b/front/src/components/3d/Ocean.tsx index 0808e50..6b9d8cf 100644 --- a/front/src/components/3d/Ocean.tsx +++ b/front/src/components/3d/Ocean.tsx @@ -2,6 +2,7 @@ import React, { useEffect, useRef } from 'react'; import * as THREE from 'three'; import { Water, WaterOptions } from 'three/examples/jsm/objects/Water.js'; +import { WaterMesh, WaterMeshOptions } from 'three/examples/jsm/objects/Water2Mesh.js'; const Ocean: React.FC = () => { diff --git a/front/src/components/Button.tsx b/front/src/components/Button.tsx index db4b4ad..3f548fd 100644 --- a/front/src/components/Button.tsx +++ b/front/src/components/Button.tsx @@ -1,4 +1,4 @@ -import { ReactNode } from 'react'; +import { ReactNode, MouseEventHandler } from 'react'; interface ButtonProps { color: 'primary' | 'secondary'; diff --git a/front/src/components/FstSection.tsx b/front/src/components/FstSection.tsx index 40afbcc..67bec8f 100644 --- a/front/src/components/FstSection.tsx +++ b/front/src/components/FstSection.tsx @@ -1,4 +1,5 @@ import Button from "./Button"; +import ButtonLink from "./ButtonLink"; import NavBar from "./NavBar"; export default function FstSection () { diff --git a/front/src/components/NavBar.tsx b/front/src/components/NavBar.tsx index a2a3fab..cf2b130 100644 --- a/front/src/components/NavBar.tsx +++ b/front/src/components/NavBar.tsx @@ -1,3 +1,4 @@ +import LogoButton from '../components/LogoButton.tsx' import ClickableLink from './ClickableLink.tsx'; import RoundButton from './RoundButton.tsx'; diff --git a/front/src/pages/GamePage.tsx b/front/src/pages/GamePage.tsx index 4ebcb50..94e2221 100644 --- a/front/src/pages/GamePage.tsx +++ b/front/src/pages/GamePage.tsx @@ -1,7 +1,9 @@ import { Canvas } from "@react-three/fiber"; import { OrbitControls, PerspectiveCamera, Sky } from "@react-three/drei"; -import { useEffect, useState } from "react"; +import * as THREE from "three"; +import React, { useEffect, useRef, useState } from "react"; import Ocean from "../components/3d/Ocean"; +import Axes from "../components/3d/Axes"; import Character from "../components/3d/Character"; import Floor from "../components/3d/Floor"; import Marker from "../components/3d/Marker";