From e69ad01e700e80fa959dfee08cd556ca0d777ffd Mon Sep 17 00:00:00 2001 From: skylar Date: Sun, 1 Nov 2026 05:43:24 -0800 Subject: Yesod: self-hosted WebXR rooms Start a room in a world and hang out in VR from the headset's browser: A-Frame + Networked-A-Frame over EasyRTC, with a coturn relay that can hide everyone's IP address. Ships with the Campfire, Temple, Cabin, Balcony and Test room worlds. Co-Authored-By: Claude Opus 5.5 --- public/js/components/player-info.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 public/js/components/player-info.js (limited to 'public/js/components/player-info.js') diff --git a/public/js/components/player-info.js b/public/js/components/player-info.js new file mode 100644 index 0000000..6110756 --- /dev/null +++ b/public/js/components/player-info.js @@ -0,0 +1,16 @@ +/* global AFRAME */ +// Who someone is. Lives on each person's rig and is synced by Networked-A-Frame, +// so remote copies fire 'player-info-changed' whenever the owner updates it. +AFRAME.registerComponent('player-info', { + schema: { + name: { default: '' }, + color: { type: 'color', default: '#ffb36b' }, + avatar: { default: '' }, + muted: { default: false }, + seat: { type: 'int', default: -1 }, // index into the campsite's seats, or -1 standing + }, + + update() { + this.el.emit('player-info-changed', this.data, false); + }, +}); -- cgit v1.2.3