|
|
|
@ -98,11 +98,12 @@ function manualAnimate(selector="#biggu"){ |
|
|
|
|
) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
let sessionId = self.crypto.randomUUID() |
|
|
|
|
|
|
|
|
|
// see https://biggu-backend-collab.glitch.me/ to insure steps are done correctly |
|
|
|
|
function shareLiveEvent(eventName, eventData, server='https://biggu-backend-collab.glitch.me/'){ |
|
|
|
|
if (!eventName) return |
|
|
|
|
let data = {} |
|
|
|
|
data.eventName = eventName |
|
|
|
|
let data = { eventName, sessionId } |
|
|
|
|
if (eventData) data.eventData = eventData |
|
|
|
|
let playername = AFRAME.utils.getUrlParameter('playername') |
|
|
|
|
if (playername) data.playername = playername |
|
|
|
@ -197,6 +198,7 @@ AFRAME.registerComponent('start-with-supervision', { |
|
|
|
|
const server='https://biggu-backend-collab.glitch.me' |
|
|
|
|
// CORS enabled needed |
|
|
|
|
const source = new EventSource(server+'/events'); |
|
|
|
|
shareLiveEvent('connected') |
|
|
|
|
|
|
|
|
|
source.addEventListener('message', message => { |
|
|
|
|
console.log('Got', message); |
|
|
|
|