diff --git a/src/assets/hud/button_block.png b/src/assets/hud/button_block.png new file mode 100755 index 0000000000000000000000000000000000000000..71c81c10b5d740bc3e9afd45f2237c0ed7fa442d Binary files /dev/null and b/src/assets/hud/button_block.png differ diff --git a/src/components/gltf-model-plus.js b/src/components/gltf-model-plus.js index d9ff8d8ff722388d3b0a63f4731d5541e91bde5e..41b6b50200ad273fdc5729866a9809245c3c23ff 100644 --- a/src/components/gltf-model-plus.js +++ b/src/components/gltf-model-plus.js @@ -154,8 +154,8 @@ function attachTemplate(root, { selector, templateRoot }) { } // Append all child elements - for (const child of root.children) { - el.appendChild(child); + while (root.children.length > 0) { + el.appendChild(root.children[0]); } } } diff --git a/src/hub.html b/src/hub.html index d06deef8e3249b8cf447e78375613f814858e052..24e07f7a2f989304bebe33b8d3260bb91b292ef3 100644 --- a/src/hub.html +++ b/src/hub.html @@ -30,6 +30,7 @@ <img id="unmuted" src="./assets/hud/unmuted.png" > <img id="muted" src="./assets/hud/muted.png" > <img id="avatar" src="./assets/hud/avatar.png" > + <img id="block" src="./assets/hud/button_block.png" > <a-asset-item id="botdefault" response-type="arraybuffer" src="https://asset-bundles-prod.reticulum.io/bots/BotDefault_Avatar-9f71f8ff22.gltf"></a-asset-item> <a-asset-item id="botbobo" response-type="arraybuffer" src="https://asset-bundles-prod.reticulum.io/bots/BotBobo_Avatar-f9740a010b.gltf"></a-asset-item> @@ -79,7 +80,12 @@ </template> <template data-selector=".Chest"> - <a-entity personal-space-invader="radius: 0.2; useMaterial: true;" bone-visibility></a-entity> + <a-entity> + <a-entity personal-space-invader="radius: 0.2; useMaterial: true;" bone-visibility> </a-entity> + <a-entity billboard> + <a-image src="#block" scale="0.56 0.22 0.1" position="0 0 0.35" material="alphaTest:0.5;"></a-image> + </a-entity> + </a-entity> </template> <template data-selector=".Head">