Skip to content

Commit 809e1f5

Browse files
committed
Going through stars.
1 parent a7a1f86 commit 809e1f5

File tree

6 files changed

+375
-38
lines changed

6 files changed

+375
-38
lines changed

index.html

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,7 @@
66
<title>:] I'm bugcaptor probably...</title>
77
</head>
88
<body>
9-
<img src="/me.jpg" alt="me" width="100px" />
10-
<div id="main-markdown-content">
11-
bugcaptor
12-
---
13-
14-
- 요즘 노동요
15-
- 편안한 중세 음악 https://youtu.be/XirDtoI4X7o
16-
- 요즘 사이드 프로젝트
17-
- https://github.com/bugcaptor/MonthlyExperiment
18-
- https://github.com/bugcaptor/NatriumStory (source code)
19-
- https://bugcaptor.github.io/NatriumStory/ (web page)
20-
- 이 페이지 아이디어
21-
- 약간의 미니 게임을 넣으면 어떨까.
22-
- 내가 좋아하는 게임 형식으로 넣자.
23-
</div>
9+
<canvas id="game"></canvas>
2410
<script type="module" src="/src/main.ts"></script>
2511
</body>
2612
</html>

package-lock.json

Lines changed: 0 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,5 @@
1111
"devDependencies": {
1212
"typescript": "^5.2.2",
1313
"vite": "^5.2.0"
14-
},
15-
"dependencies": {
16-
"marked": "^12.0.1"
1714
}
1815
}

src/main.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
import './style.css';
2-
import { marked } from 'marked';
2+
import { Space } from './space';
33

44
function startApp() {
55
console.log('App started');
6-
const mainMarkdownContent_e = document.getElementById('main-markdown-content') as HTMLDivElement;
7-
const mainMarkdownContent = mainMarkdownContent_e.innerHTML;
8-
console.log(mainMarkdownContent);
9-
const markdownContent = marked(mainMarkdownContent) as string;
10-
mainMarkdownContent_e.innerHTML = markdownContent;
6+
7+
const canvas = document.getElementById('game') as HTMLCanvasElement;
8+
const space = new Space(canvas);
9+
10+
space.start();
11+
// loop to render the game
12+
function gameLoop() {
13+
space.render();
14+
requestAnimationFrame(gameLoop);
15+
}
16+
17+
gameLoop();
1118
}
1219

1320
// when the page is loaded, the script will be executed

0 commit comments

Comments
 (0)