diff --git a/package.json b/package.json index 44e7057c9945881a821431410f45e82826f9e3c9..194d032caa2deaf6c26590c30defd791f76c61f0 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "main": "src/index.js", "license": "MPL-2.0", "scripts": { - "dev": "webpack-dev-server --open --config webpack.dev.js", + "dev": "webpack-dev-server --https --open --config webpack.dev.js", "build": "webpack --config webpack.prod.js", "prettier": "prettier --write src/**/*.js", "deploy": "npm run build && now deploy --static ./public/" diff --git a/public/index.html b/public/index.html index 5c5d46b4d292baf9145956bcc633c8c80f827155..3735df8bbc9105f2fd22bedd4c3fc1e015115b6a 100644 --- a/public/index.html +++ b/public/index.html @@ -55,7 +55,7 @@ </a-assets> <a-entity id="player-rig" networked wasd-controls snap-rotation="pivotSrc: #head"> - <a-sphere scale="0.1 0.1 0.1"></a-sphere> + <a-sphere scale="0.1 0.1 0.1" segments-height="6" segments-width="8"></a-sphere> <a-entity id="head" camera="userHeight: 1.6" personal-space-bubble look-controls networked="template:#head-template;showLocalTemplate:false;"></a-entity> <a-entity id="nametag" networked="template:#nametag-template;showLocalTemplate:false;"></a-entity> diff --git a/src/index.js b/src/index.js index 0c43229b2204e8958341bf67542ec51a4d5c2695..63b8c25614bc5751e653d836d6dee49979804d61 100644 --- a/src/index.js +++ b/src/index.js @@ -31,7 +31,14 @@ window.onSceneLoad = function() { scene.setAttribute("networked-scene", "room", parseInt(qs.room)); } - const username = promptForName(); // promptForName is blocking + if (!qs.stats || !/off|false|0/.test(qs.stats)) { + scene.setAttribute('stats', true); + } + + let username = qs.name; + if (!username) { + username = promptForName(username); // promptForName is blocking + } const myNametag = document.querySelector("#player-rig .nametag"); myNametag.setAttribute("text", "value", username);