update nextjs config for three fiber

This commit is contained in:
DefectingCat
2023-08-17 16:10:42 +08:00
parent d4da01515b
commit 7d082f8129
5 changed files with 570 additions and 52 deletions

View File

@ -1,14 +1,14 @@
'use client';
import { Canvas, useFrame, useLoader, useThree } from '@react-three/fiber';
import clsx from 'clsx';
import Loading from 'components/rua/loading/rua-loading';
import { getMousePosition } from 'lib/utils';
import { useEffect, useRef } from 'react';
import useStore from 'store';
import * as THREE from 'three';
import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader';
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader';
import Loading from 'components/rua/loading/rua-loading';
import clsx from 'clsx';
import { getMousePosition } from 'lib/utils';
const rotationY = 0.4;
const rotationX = 0.18;
@ -37,7 +37,6 @@ const Model = () => {
camera.position.y = 0.3;
camera.position.z = 1.3;
toggleLoading(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
const halfWidth = Math.floor(window.innerWidth / 2);
const halfHeight = Math.floor(window.innerHeight / 2);