Skip to content

Commit 22178b2

Browse files
committed
[DELETE] 필요없는 파일 삭제
1 parent 0b93f49 commit 22178b2

13 files changed

+14
-868
lines changed

src/App.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import MainPage from "./game/MainPage.jsx";
21
import HomePage from "./membership/HomePage.jsx";
32
import FirstPage from "./navigation/Home.jsx";
43
import LobbyPage from "./navigation/Lobby.jsx";
@@ -35,7 +34,6 @@ function App() {
3534
<Route path="/word-tracing/play" element={<GamePage />} />
3635
<Route path="/2p-word-tracing/play/:code" element={<GamePageForTwo />} />
3736

38-
<Route path="/main" element={<MainPage />} />
3937
<Route path="/selection" element={<SelectionPage />} />
4038
<Route path="/decorative" element={<DecorativeGamePage />} />
4139
<Route path="/decorative/game" element={<DecorationGamePage />} />

src/game/MainPage.css

-49
This file was deleted.

src/game/MainPage.jsx

-80
This file was deleted.

src/game/TwoDecorativeGame.jsx

+13-16
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ function TwoDecorativeGame() {
5858
console.log(otherNumber);
5959
}
6060

61-
const onClickedBack = ()=> {
61+
const onClickedBack = () => {
6262
deleteRoom(code);
6363
setIsBackButton(!isBackButton)
6464
}
65-
65+
6666
const otherShapes = useRef([]);
6767

6868
useEffect(() => {
@@ -126,17 +126,17 @@ function TwoDecorativeGame() {
126126
<div className="body-container-of-left-decoration-game-two">
127127
<div className="screen-admin-decoration-game-two">
128128
<div style={{ width: (window.innerHeight * constants.TWO_DECORATIVE_GAME_HEIGHT_RATIO * (4.0 / 3.0)), height: windowHeight, margin: "auto" }}>
129-
<TwoGameScreen
130-
getOtherData={setOtherNumber}
131-
getData={setNumber}
132-
getWord={setWord}
133-
ref={gameScreenRef}
134-
roomid={code}
135-
sender={Math.random().toString(36).substring(2, 11)}
136-
anotherVideoRef={anotherVideoRef}
137-
otherDrawingRef={otherDrawingRef}
138-
otherEmojiRef={otherEmojiRef}
139-
isBackButton = {isBackButton} />
129+
<TwoGameScreen
130+
getOtherData={setOtherNumber}
131+
getData={setNumber}
132+
getWord={setWord}
133+
ref={gameScreenRef}
134+
roomid={code}
135+
sender={Math.random().toString(36).substring(2, 11)}
136+
anotherVideoRef={anotherVideoRef}
137+
otherDrawingRef={otherDrawingRef}
138+
otherEmojiRef={otherEmojiRef}
139+
isBackButton={isBackButton} />
140140

141141
</div>
142142
</div>
@@ -179,10 +179,7 @@ function TwoDecorativeGame() {
179179
className="canvas"
180180
ref={otherDrawingRef}
181181
mirrored={true}
182-
// tabIndex={0}s
183-
//onKeyDown={f1Down}
184182
style={{
185-
// background: "red",
186183
position: "absolute",
187184
marginLeft: "auto",
188185
marginRight: "auto",

src/game/TwoGameLobby.jsx

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import SimpleBarReact from "simplebar-react";
77
import 'simplebar-react/dist/simplebar.min.css';
88
import axios from 'axios';
99
import * as constants from "../utils/Constants"
10-
import { type } from "@testing-library/user-event/dist/type";
1110
import Modal from 'react-modal';
1211
import Select from "react-select";
1312
import { AiTwotoneCheckCircle, AiTwotoneCloseCircle} from "react-icons/ai";

src/game/component/DrawRectangle.jsx

-91
This file was deleted.

src/game/component/GameScreen.jsx

+1-24
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import Webcam from "react-webcam";
33
import { Hands, HAND_CONNECTIONS } from "@mediapipe/hands/hands";
44
import { drawConnectors, drawLandmarks } from "@mediapipe/drawing_utils/drawing_utils";
55
import { Camera } from "@mediapipe/camera_utils/camera_utils";
6-
import "./MediapipeHands.css"
76
import { detectHandGesture } from "./HandGesture";
87
import { preprocessImage } from "./PreprocessImage";
98
import frame from "./frame.png";
@@ -25,7 +24,6 @@ const GameScreen = forwardRef((props, ref) => {
2524
}))
2625

2726

28-
2927
// 웹캡 변수
3028
const webcamRef = useRef(null);
3129
const canvasRef = useRef(null);
@@ -259,10 +257,6 @@ const GameScreen = forwardRef((props, ref) => {
259257
function rect(r) {
260258
const image = new Image();
261259
image.src = r.fill;
262-
// canvasRef4.current.getContext('2d').fillStyle = image;
263-
// canvasRef4.current.getContext('2d').fillRect(r.x, r.y, r.width, r.height);
264-
// const image = new Image();
265-
// image.src = r.fill;
266260
image.onload = function () {
267261
canvasRef4.current.getContext('2d').drawImage(image, r.x, r.y, r.width, r.height);
268262
}
@@ -353,14 +347,9 @@ const GameScreen = forwardRef((props, ref) => {
353347
const mx = parseInt(nativeEvent.clientX - canvasOffSetX.current);
354348
const my = parseInt(nativeEvent.clientY - canvasOffSetY.current);
355349

356-
// calculate the distance the mouse has moved
357-
// since the last mousemove
358350
const dx = mx - startX;
359351
const dy = my - startY;
360352

361-
// move each rect that isDragging
362-
// by the distance the mouse has moved
363-
// since the last mousemove
364353
for (let i = 0; i < shapes.current.length; i++) {
365354
const s = shapes.current[i];
366355
if (s.isDragging) {
@@ -482,17 +471,6 @@ const GameScreen = forwardRef((props, ref) => {
482471
// img.crossOrigin = "anonymous";
483472
img.src = canvas.toDataURL('image/png');
484473

485-
486-
// var blobBin = atob(img.src.split(',')[1]); // base64 데이터 디코딩
487-
// var array = [];
488-
// for (var i = 0; i < blobBin.length; i++) {
489-
// array.push(blobBin.charCodeAt(i));
490-
// }
491-
492-
// var file = new Blob([new Uint8Array(array)], { type: 'image/png' }); // Blob 생성
493-
// const image = URL.createObjectURL(file);
494-
495-
496474
//a태그를 만들고 다운로드한뒤 갖다 버린다
497475
let link = document.createElement('a');
498476
link.download = "my_image.png";
@@ -501,7 +479,7 @@ const GameScreen = forwardRef((props, ref) => {
501479
link.click();
502480
document.body.removeChild(link);
503481
canvasRef5.current.getContext('2d').clearRect(0, 0, windowSize.width, windowSize.height); // 저장 후 지우기
504-
// canvasRef2.current.focus();
482+
canvasRef2.current.focus();
505483
}
506484

507485
return (
@@ -547,7 +525,6 @@ const GameScreen = forwardRef((props, ref) => {
547525
ref={canvasRef2}
548526
mirrored={true}
549527
tabIndex={0}
550-
//onKeyDown={f1Down}
551528
onKeyDown={spaceDown}
552529
style={{
553530
position: "absolute",

0 commit comments

Comments
 (0)