Skip to content

Commit 34caad6

Browse files
author
takuma-hmng8
committed
微修正
1 parent 606fe52 commit 34caad6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/domSyncer/DomSyncer.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import * as THREE from "three";
2-
import { useLayoutEffect, useRef } from "react";
2+
import { useEffect, useLayoutEffect, useRef } from "react";
33
import { useFrame, extend, useThree, useLoader } from "@react-three/fiber";
44
import { FxMaterial, FxMaterialProps } from "@/utils/fxMaterial";
55
import {
@@ -28,6 +28,10 @@ const CONFIG: {
2828
};
2929

3030
export const DomSyncer = ({ state }: { state: number }) => {
31+
useEffect(() => {
32+
document.documentElement.style.overflow = "auto";
33+
});
34+
3135
const mainShaderRef = useRef<FxMaterialProps>();
3236
const resolutionRef = useRef(new THREE.Vector2(0, 0));
3337
const textureRef = useRef(new THREE.Texture());

0 commit comments

Comments
 (0)