Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
modify play page
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed Dec 31, 2020
1 parent 70ed23f commit 934a831
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions play/index.pug
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,18 @@ html
tr
td Loading...
script.
// Delay everything by 2 seconds
const end = Date.now() + 2000;
// Delay everything by .5 seconds
const end = Date.now() + 500;
while(Date.now() < end) {/*...*/}
script(src="script.js")
script(async="async").
// Delay everything by 2 seconds
const end = Date.now() + 2000;
script(async="defer").
// Delay everything by .5 seconds
const end = Date.now() + 500;
while(Date.now() < end) {/*...*/}

// After DOMInteractive
window.addEventListener('DOMContentLoaded', () => {
const wake = Date.now() + 500;
while (Date.now() < wake);
}, { once: true });
script(src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r118/three.min.js")

0 comments on commit 934a831

Please sign in to comment.