Last active
April 9, 2022 10:15
-
-
Save Utopiah/2492d95a9b8f1ea7c4829b30d896982a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for hubs, see https://twitter.com/utopiah/status/1495713341133791242 | |
const owndomain = 'your-vartiste-glitch-remix.glitch.me' | |
const source = new EventSource('https://'+owndomain+'/sse'); | |
source.onmessage = message => { | |
// hubs_utils from https://gist.github.com/Utopiah/1cfc123239fa2994569fc7c5c60b2928/ | |
hubs_utils.getFirstElementFromPartialURL(owndomain+"/data/upload.glb") | |
.setAttribute("media-loader", "src", "https://"+owndomain+"/data/upload.glb#"+Date.now()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment