feat(vn): simple vn

This commit is contained in:
ktyl 2024-01-06 00:57:08 +00:00
parent 59d6131c5a
commit 850c9cf153
77 changed files with 98 additions and 0 deletions

16
src/vn/books.html Normal file
View File

@ -0,0 +1,16 @@
<head>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="styles.css" />
</head>
<html>
<body>
<div class="centre">
<img id="portrait" src="img/stargazer.png"></img>
<div id="text-box"></div>
<a id="button" href="#" onclick="advance()">start</a>
</div>
</body>
</html>
<script src="main.js"></script>

BIN
src/vn/img/angry0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

BIN
src/vn/img/angry1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 KiB

BIN
src/vn/img/angry2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
src/vn/img/angry3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 KiB

BIN
src/vn/img/apologetic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
src/vn/img/asleep.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 KiB

BIN
src/vn/img/blast.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

BIN
src/vn/img/books-colour.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

BIN
src/vn/img/books-messy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/vn/img/books-size.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
src/vn/img/bookworm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

BIN
src/vn/img/calm.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

BIN
src/vn/img/cat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

BIN
src/vn/img/chillin0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

BIN
src/vn/img/chillin1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
src/vn/img/chillin2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

BIN
src/vn/img/coffee.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

BIN
src/vn/img/confident.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

BIN
src/vn/img/dance.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

BIN
src/vn/img/derp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
src/vn/img/derp.png_ Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 KiB

BIN
src/vn/img/determined.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 KiB

BIN
src/vn/img/disappoint.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
src/vn/img/dreamer0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 132 KiB

BIN
src/vn/img/excited.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

BIN
src/vn/img/fixin-time.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

BIN
src/vn/img/foood.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

BIN
src/vn/img/frog.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

BIN
src/vn/img/gah.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

BIN
src/vn/img/gendo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 KiB

BIN
src/vn/img/goofy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 KiB

BIN
src/vn/img/grin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 173 KiB

BIN
src/vn/img/hii.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

BIN
src/vn/img/hmph.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

BIN
src/vn/img/hopeful.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

BIN
src/vn/img/huh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

BIN
src/vn/img/laugh0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 KiB

BIN
src/vn/img/laugh1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
src/vn/img/laugh2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 KiB

BIN
src/vn/img/laugh3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

BIN
src/vn/img/nonplussed.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

BIN
src/vn/img/noseup.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 KiB

BIN
src/vn/img/ohno.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 136 KiB

BIN
src/vn/img/oshit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

BIN
src/vn/img/pathetic.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 284 KiB

BIN
src/vn/img/peeved.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

BIN
src/vn/img/pizza.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

BIN
src/vn/img/ponder.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

BIN
src/vn/img/pose.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 KiB

BIN
src/vn/img/queasy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
src/vn/img/scared.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

BIN
src/vn/img/sleepy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

BIN
src/vn/img/sneaky.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/vn/img/some-guy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/vn/img/stargazer.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
src/vn/img/surprised0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
src/vn/img/surprised1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

BIN
src/vn/img/tantrum.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 164 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
src/vn/img/uh.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
src/vn/img/unsure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
src/vn/img/vr.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 KiB

BIN
src/vn/img/waow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

BIN
src/vn/img/well-you-see.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 KiB

BIN
src/vn/img/whaaaat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 410 KiB

BIN
src/vn/img/yay.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

62
src/vn/main.js Normal file
View File

@ -0,0 +1,62 @@
let idx = 0
let frames = [
"hello! you're just in time!", "img/yay.png", null,
"this was starting to get ridiculous.", "img/you-shouldnt-be-doing-that.png", null,
"there are books EVERYWWHERE", "img/scared.png", null,
"and more keep coming!", "img/oshit.png", null,
"we've got to do something about it before the deadline!", "img/determined.png", null,
"hey, could you sort the books for me?", "img/books-messy.png", "stack books by size",
"yes, i can you've finished STACKING them,", "img/books-size.png", null,
"but that's hardly FINISHED, is it?", "img/books-size.png", null,
"i mean sure, if you want to be a pedant about it they're sort of ordered by size,", "img/nonplussed.png", null,
"but they're still just piled up in the same place, what's that supposed to change?", "img/coffee.png", null,
"why don't you try again?", "img/books-size.png", "push stack over",
"", "img/books-messy.png", "order books by colour",
"", "img/books-colour.png", null,
"no, colours won't work either.", "img/dreamer0.png", null,
"why?", "img/blast.png", null,
"simple, i don't do colours.", "img/grin.png", null,
"it's nothing personal, they're just not for me, you know?", "img/glad-you-asked.png", "restart"
];
function setText(text) {
document.getElementById('text-box').innerHTML = text;
}
function setImage(path) {
document.getElementById('portrait').src = path;
}
function setButtonText(text) {
console.log(text);
if (text == null)
{
text = "next";
}
document.getElementById('button').innerHTML = text;
}
function advance() {
const stride = 3;
if (idx >= frames.length) {
idx = 0;
}
let text = frames[idx];
let img = frames[idx + 1];
let buttonText = frames[idx + 2];
setText(text);
setButtonText(buttonText);
setImage(img);
idx += stride;
}

20
src/vn/styles.css Normal file
View File

@ -0,0 +1,20 @@
img {
max-height: 70vh;
width: auto;
}
.centre {
margin: auto;
padding: 0;
width: 50%;
}
#button {
font-size: 2em;
}
#text-box {
width 100%;
height: 4em;
}