Mystical draft

This commit is contained in:
Madison Scott-Clary
2019-08-25 19:00:50 -07:00
parent c1af275a1e
commit 66ac1a5c10
2 changed files with 49 additions and 6 deletions

View File

@ -18,7 +18,7 @@ audio {
</style> </style>
<div class="vis"></div> <div class="vis"></div>
<audio autoplay loop controls src="/confusion.mp3"></audio> <!--<audio autoplay loop controls src="/confusion.mp3"></audio>-->
<script type="text/javascript"> <script type="text/javascript">
document.body.style.transition = '0.5s all linear'; document.body.style.transition = '0.5s all linear';
@ -112,15 +112,18 @@ let corruptionsC = [
] ]
const el = document.querySelector('.vis'); const el = document.querySelector('.vis');
let phraseIdx = 0, let phraseIdx = 0,
characterIdx = 0, characterIdx = 0,
characterID = null, characterID = null,
i = 0; corruptID = null;
const spans = [] const spans = []
function eachPhrase() { function eachPhrase() {
if (phraseIdx >= induction.length) { if (phraseIdx >= induction.length) {
return; return;
} }
if (corruptID) {
window.clearInterval(corruptID)
}
characterIdx = 0; characterIdx = 0;
const phrase = induction[phraseIdx++]; const phrase = induction[phraseIdx++];
document.body.style['background-color'] = phrase.bg; document.body.style['background-color'] = phrase.bg;
@ -130,6 +133,9 @@ function eachPhrase() {
phrase.speed, phrase.speed,
phrase.text, phrase.text,
phrase.speed); phrase.speed);
corruptID = window.setInterval(
corrupt,
150 - phraseIdx * 10);
} }
function eachCharacter(text, finalDelay) { function eachCharacter(text, finalDelay) {
@ -137,9 +143,15 @@ function eachCharacter(text, finalDelay) {
window.clearInterval(characterID) window.clearInterval(characterID)
window.setTimeout(eachPhrase, finalDelay); window.setTimeout(eachPhrase, finalDelay);
} }
let inner = el.textContent + text[characterIdx++]; el.textContent += text[characterIdx++];
el.scrollTop = el.scrollTopMax;
}
function corrupt() {
let inner = el.textContent;
const chance = Math.floor(Math.random() * 100); const chance = Math.floor(Math.random() * 100);
const affected = Math.floor(Math.random() * inner.length) const affected = Math.floor(Math.random() * inner.length)
if (phraseIdx > 1 && Math.floor(Math.random() * induction.length) <= phraseIdx) { if (phraseIdx > 1 && Math.floor(Math.random() * induction.length) <= phraseIdx) {
if (chance % 3 === 0) { if (chance % 3 === 0) {
inner = inner.substring(0, affected) + corruptionsA[Math.floor(Math.random() * corruptionsA.length)] + inner.substring(affected); inner = inner.substring(0, affected) + corruptionsA[Math.floor(Math.random() * corruptionsA.length)] + inner.substring(affected);
@ -150,7 +162,6 @@ function eachCharacter(text, finalDelay) {
} }
} }
el.textContent = inner; el.textContent = inner;
el.scrollTop = el.scrollTopMax;
} }
eachPhrase(); eachPhrase();

32
content/core/046.md Normal file
View File

@ -0,0 +1,32 @@
---
date: 2019-08-25
weight: 46
---
> You're not very focused.
How does one approach what one can't describe?
> Swing the flashlight rapidly across the room. Piece together what you can from the sweep of the beam across the walls, the furniture.
How does one hunt down what leaves no tracks?
> Unwind the maze by keeping your right hand on the wall. Pray that the walls do not move.
How does one call down the gods to commune?
> Speak thrice, and enter.
I'm tired. I'm so tired. I'm tired and I'm upset and I'm lost.
> I know.
I want to shout and to whisper. I want to talk about how I feel when I read Stevens or Esch or Rilke. I want to put words to the feeling of falling to the ground and taking root.
I want to tell how it feels when I step outside myself.
> You tried.
I guess that's all I can do.
> It's not, but it's important that you have tried.