Skip to content
Snippets Groups Projects
Commit 6dc4680f authored by Robert Long's avatar Robert Long
Browse files

Re-implement avatar scaling for AR.

parent 759f1ebc
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ function registerNetworkSchemas() {
components: [
"position",
"rotation",
"scale",
{
selector: ".camera",
component: "position"
......
......@@ -121,9 +121,14 @@ window.App = {
playerRig.addEventListener(
"model-loaded",
() => {
console.log(playerRig);
const myNametag = playerRig.querySelector(".nametag");
myNametag.setAttribute("text", "value", username);
const avatarScale = parseInt(qs.avatarScale, 10);
if (avatarScale) {
playerRig.setAttribute("scale", { x: avatarScale, y: avatarScale, z: avatarScale });
}
},
{ once: true }
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment