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

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
claustra01 committed Aug 11, 2024
1 parent 35adec0 commit a5d1d7e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/yatai/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ import type {
} from "three";
import { randFloat } from "three/src/math/MathUtils.js";
import { useSocketRefStore } from "../../store";
import { MessageType, type ActionSchema, type PointerSchema, type Target } from "../../type/shooting";
import {
type ActionSchema,
MessageType,
type PointerSchema,
type Target,
} from "../../type/shooting";
import styles from "./index.module.css";

function Yatai() {
Expand All @@ -37,8 +42,8 @@ function Yatai() {
// TODO: これらは一人用,いつかマルチプレイヤー対応する
const [aim, setAim] = useState<Target | undefined>(undefined);
const aimTarget = (data: PointerSchema) => {
let x = window.innerWidth / 2 * data.target.x - window.innerWidth / 2;
let y = window.innerHeight / 2 * data.target.y - window.innerHeight / 2;
const x = (window.innerWidth / 2) * data.target.x - window.innerWidth / 2;
const y = (window.innerHeight / 2) * data.target.y - window.innerHeight / 2;
setAim({ x, y });
};

Expand Down

0 comments on commit a5d1d7e

Please sign in to comment.