-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
70 lines (55 loc) · 2.38 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
// import SnakeGame from './games/snake/snake.js'
// import setup2048Input from './games/2048/2048.js'
import lorenzViewer from './games/lorenz/lorenz.js'
import rosslerViewer from './games/rossler/rossler.js'
// ================ Home ========================
const backgroundDiv = document.querySelector('.contact-card')
const homeTab = document.getElementById("home-tab")
homeTab.addEventListener('shown.bs.tab', () => backgroundDiv.style.backgroundImage = "url(../images/background-image.jpg)")
homeTab.addEventListener('hidden.bs.tab', () => backgroundDiv.style.backgroundImage = "none")
// ================= Snake ========================
// let snakeGame = new SnakeGame()
// window.addEventListener('resize', () => snakeGame.reset());
// const snakeTab = document.getElementById("snake-tab")
// snakeTab.addEventListener('shown.bs.tab', () => {
// SnakeGame.resizeCanvas()
// snakeGame.start()
// })
// snakeTab.addEventListener('hidden.bs.tab', () => snakeGame.stop())
// ================= 2048 =========================
// const game2048Tab = document.getElementById("game-2048-tab")
// game2048Tab.addEventListener('shown.bs.tab', () => setup2048Input())
// ================ Lorenz =======================
const lorenzTab = document.getElementById("lorenz-tab")
let lorenzP5 = new p5(lorenzViewer, 'lorenz-wrapper')
lorenzP5.noLoop()
lorenzTab.addEventListener('shown.bs.tab', () => lorenzP5.loop())
lorenzTab.addEventListener('hidden.bs.tab', () => lorenzP5.noLoop())
// ============== Rossler ===========================
const rosslerTab = document.getElementById("rossler-tab")
let rosslerP5 = new p5(rosslerViewer, 'rossler-wrapper')
rosslerP5.noLoop()
rosslerTab.addEventListener('shown.bs.tab', () => rosslerP5.loop())
rosslerTab.addEventListener('hidden.bs.tab', () => rosslerP5.noLoop())
console.log(`
|--__
|
X
|-___ / \\ |--__
| ===== |
X | .:| X
/ \\ | O | / \\
===== |: . | =====
|.: |__| . : |__| :.|
| :|. : ... : |. |
_ __W| . . ||| . :|W__ -
__ W WWWW______"""______WWWW W -
___ --- ____ ____----
_ -- --__ -___ __-
Welcome to my site!
If you can see this, good for you!
Want to collaborate on a project? Reach out!
https://www.linkedin.com/in/autumn-loveless/
Enjoy the site,
Autumn
`)