Update hotlink.js

pull/6/head
Andreas Gysin 2021-05-29 09:46:21 +02:00
rodzic 3ca9d7f533
commit 8f4b202122
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -7,8 +7,11 @@ The code for the Simplex Noise function is downloaded from GitHub
and evaluated trough new Function().
*/
fetch("https://raw.githubusercontent.com/blindman67/SimplexNoiseJS/master/simplexNoise.js").then(e => e.text()).then(t => {
const openSimplexNoise = new Function("return " + t)()
// Dont do this :)
fetch("https://raw.githubusercontent.com/blindman67/SimplexNoiseJS/master/simplexNoise.js")
.then(e => e.text())
.then(e => {
const openSimplexNoise = new Function("return " + e)()
noise3D = openSimplexNoise(Date.now()).noise3D
})