Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
claustra01 committed Aug 11, 2024
1 parent 160cd07 commit f874da8
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/pages/yatai/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,21 @@ const YataiStage = memo(() => {
useEffect(() => {
if (!target) return;
if (
target.x * 2 > (props.position as [number, number, number])[0] - args[0]/2 &&
target.x * 2 < (props.position as [number, number, number])[0] + args[0]/2 &&
target.y * 2 > (props.position as [number, number, number])[1] - args[1]/2 - 2 &&
target.y * 2 < (props.position as [number, number, number])[1] + args[1]/2 - 2
target.x * 2 >
(props.position as [number, number, number])[0] - args[0] / 2 &&
target.x * 2 <
(props.position as [number, number, number])[0] + args[0] / 2 &&
target.y * 2 >
(props.position as [number, number, number])[1] - args[1] / 2 - 2 &&
target.y * 2 <
(props.position as [number, number, number])[1] + args[1] / 2 - 2
) {
api.applyImpulse(
[randFloat(-2, 2), 4, 8],
[randFloat(-1, 1), randFloat(-1, 1), randFloat(-1, 1)],
);
}
}, [target]);
}, [target, props.position, api]);

return (
<mesh
Expand Down

0 comments on commit f874da8

Please sign in to comment.