-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsuper_momo_final_cutscene_5_oof.html
95 lines (88 loc) · 2.85 KB
/
super_momo_final_cutscene_5_oof.html
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Momo's Adventure!</title>
<style>
* {
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
overflow: hidden;
display: flex;
flex-direction: column;
height: 100vh;
position: relative; /* to allow positioning of children relative to the body */
}
#textSpace {
background-color: white;
color: black;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
padding: 20px;
position: absolute; /* take it out of normal flow and position it */
top: 100px; /* position from the top */
left: 80%; /* position from the left */
border-radius: 15px; /* rounded corners */
border: 2px solid black;
width: 300px; /* set a specific width */
max-width: 300px; /* ensure it doesn't exceed this width */
max-height: 60vh; /* set a max height */
/*overflow: auto; /* allow scrolling if there's too much content */
}
#textSpace:after {
content: '';
position: absolute;
bottom: -15px; /* adjust as needed */
right: 30px; /* position the tip towards the left */
width: 0;
height: 0;
border-left: 15px solid transparent;
border-right: 15px solid transparent;
border-top: 15px solid white; /* same color as the bubble */
border-bottom: none;
}
#scene {
flex-grow: 1;
background: url('graphics/final_cutscene_5_oof.png') no-repeat center center;
background-size: cover;
}
</style>
</head>
<body>
<div id="textSpace"></div>
<div id="scene"></div>
<script>
const textSpace = document.getElementById('textSpace');
const message = [
"Hi Mom!",
"(click)"
];
let lineIndex = 0;
let charIndex = 0;
function revealText() {
if (lineIndex < message.length) {
if (charIndex < message[lineIndex].length) {
textSpace.innerHTML += message[lineIndex][charIndex];
charIndex++;
} else {
textSpace.innerHTML += "<br>";
lineIndex++;
charIndex = 0;
}
setTimeout(revealText, 100);
}
}
revealText();
document.body.addEventListener('click', function() {
window.location.href = 'super_momo_final_cutscene_6_end.html';
});
</script>
</body>
</html>