Comments (2)
Hello, yes it's possible, see the relevant section in the documentation:
https://github.com/networked-aframe/networked-aframe#connecting
You need to write your own ui with a button where you call AFRAME.scenes[0].emit('connect');
on click.
from networked-aframe.
There was an old example showing it https://glitch.com/edit/#!/naf-nametags with a crude prompt. Slightly modified code here:
function onSceneLoad() {
let username = 'user-' + Math.round(Math.random() * 10000);
username = prompt('Choose a username', username);
const player = document.getElementById('player');
const myNametag = player.querySelector('.nametag');
myNametag.setAttribute('text', 'value', username);
AFRAME.scenes[0].emit('connect');
}
document.addEventListener('DOMContentLoaded', () => {
const scene = document.querySelector('a-scene');
if (scene.hasLoaded) {
onSceneLoad();
} else {
scene.addEventListener('loaded', onSceneLoad);
}
});
replace the prompt by your own UI with your favorite js and css frameworks.
from networked-aframe.
Related Issues (20)
- Stun servers at 80 or 443 HOT 6
- networked-hand-controls.js should inherit or respect MODEL_BASE from AFrame HOT 22
- User names? HOT 4
- Is it possible to display mirror image of the video in `networked-video-source` HOT 2
- Adjusting the Inactivy user? HOT 5
- charnging ports? HOT 4
- NPM install errors. HOT 9
- Disconnecting when going to a new browser Tab after some time. HOT 13
- Be in networked aframe but not be there? HOT 4
- didn't manage to get hand tracking working HOT 5
- User in new position with each refresh?
- Add ability to add networked entity to non-networked parent HOT 7
- Share Screen Issue HOT 1
- stuck with npm i on a RPi Zero HOT 5
- Write a "how it works" documentation HOT 12
- Not a issue but really need some help. Trying to add pre-text pharses above the character. HOT 1
- networked-video-source should respect the video aspect ratio HOT 1
- Create a web component to show connected users HOT 10
- [networked-audio-zone] Private audio zone HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from networked-aframe.