HARRRRRRD HOT FIX: Remove all error and warning

This commit is contained in:
iMax 2024-12-06 06:08:00 +01:00
parent d685e00bc3
commit f8ffe3e16f
9 changed files with 4 additions and 15 deletions

View file

@ -1,6 +1,4 @@
import React from 'react'
import { LineBasicMaterial, Line, Group } from 'three' import { LineBasicMaterial, Line, Group } from 'three'
import { useFrame } from '@react-three/fiber'
import * as THREE from 'three' import * as THREE from 'three'
export default function Axes() { export default function Axes() {

View file

@ -1,11 +1,10 @@
import { Group, Mesh, MeshStandardMaterial, BufferGeometry } from 'three'
import { useGLTF } from '@react-three/drei' import { useGLTF } from '@react-three/drei'
export default function Character() { export default function Character() {
// import glb file // import glb file
// load the glb file in "/models/BASEmodel.glb" // load the glb file in "/models/BASEmodel.glb"
const { nodes, materials, scene } = useGLTF('/models/man.glb') const { scene } = useGLTF('/models/man.glb')
// rotate the character // rotate the character
scene.rotation.x = -Math.PI / 2 scene.rotation.x = -Math.PI / 2

View file

@ -1,5 +1,3 @@
import React from 'react'
import { Group } from 'three' import { Group } from 'three'
import * as THREE from 'three' import * as THREE from 'three'

View file

@ -1,5 +1,4 @@
import React from 'react' import React from 'react'
import { Group } from 'three'
import * as THREE from 'three' import * as THREE from 'three'
interface MarkerProps { interface MarkerProps {
@ -15,7 +14,7 @@ export default function Marker({ position, color, onClick }: MarkerProps) {
// Return the marker object // Return the marker object
// return <primitive object={marker} /> // return <primitive object={marker} />
return ( return (
<mesh position={positionState} rotation={[Math.PI,0,0]} onClick={onClick} onPointerOver={(e) => setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={(e) => setPositionState(new THREE.Vector3(...position))}> <mesh position={positionState} rotation={[Math.PI,0,0]} onClick={onClick} onPointerOver={() => setPositionState(positionState.clone().setZ(positionState.z + 0.1))} onPointerOut={() => setPositionState(new THREE.Vector3(...position))}>
<coneGeometry args={[0.15, 0.6, 6]} /> <coneGeometry args={[0.15, 0.6, 6]} />
<meshStandardMaterial color={color} side={THREE.DoubleSide} /> <meshStandardMaterial color={color} side={THREE.DoubleSide} />
</mesh> </mesh>

View file

@ -2,7 +2,6 @@
import React, { useEffect, useRef } from 'react'; import React, { useEffect, useRef } from 'react';
import * as THREE from 'three'; import * as THREE from 'three';
import { Water, WaterOptions } from 'three/examples/jsm/objects/Water.js'; import { Water, WaterOptions } from 'three/examples/jsm/objects/Water.js';
import { WaterMesh, WaterMeshOptions } from 'three/examples/jsm/objects/Water2Mesh.js';
const Ocean: React.FC = () => { const Ocean: React.FC = () => {

View file

@ -1,4 +1,4 @@
import { ReactNode, MouseEventHandler } from 'react'; import { ReactNode } from 'react';
interface ButtonProps { interface ButtonProps {
color: 'primary' | 'secondary'; color: 'primary' | 'secondary';

View file

@ -1,5 +1,4 @@
import Button from "./Button"; import Button from "./Button";
import ButtonLink from "./ButtonLink";
import NavBar from "./NavBar"; import NavBar from "./NavBar";
export default function FstSection () { export default function FstSection () {

View file

@ -1,4 +1,3 @@
import LogoButton from '../components/LogoButton.tsx'
import ClickableLink from './ClickableLink.tsx'; import ClickableLink from './ClickableLink.tsx';
import RoundButton from './RoundButton.tsx'; import RoundButton from './RoundButton.tsx';

View file

@ -1,9 +1,7 @@
import { Canvas } from "@react-three/fiber"; import { Canvas } from "@react-three/fiber";
import { OrbitControls, PerspectiveCamera, Sky } from "@react-three/drei"; import { OrbitControls, PerspectiveCamera, Sky } from "@react-three/drei";
import * as THREE from "three"; import { useEffect, useState } from "react";
import React, { useEffect, useRef, useState } from "react";
import Ocean from "../components/3d/Ocean"; import Ocean from "../components/3d/Ocean";
import Axes from "../components/3d/Axes";
import Character from "../components/3d/Character"; import Character from "../components/3d/Character";
import Floor from "../components/3d/Floor"; import Floor from "../components/3d/Floor";
import Marker from "../components/3d/Marker"; import Marker from "../components/3d/Marker";