diff --git a/package.json b/package.json index efecd3d5701bab90f076beb039b995beb1be3cc6..1b0e87daa003040077505b1403c365ecc97c5c36 100644 --- a/package.json +++ b/package.json @@ -23,8 +23,9 @@ "aframe-input-mapping-component": "https://github.com/johnshaughnessy/aframe-input-mapping-component#feature/map-to-array", "aframe-physics-extras": "https://github.com/infinitelee/aframe-physics-extras#fix/physics-collider-crash", "aframe-physics-system": "https://github.com/donmccurdy/aframe-physics-system", - "aframe-teleport-controls": "^0.3.1", "aframe-rounded": "^1.0.3", + "aframe-slice9-component": "^1.0.0", + "aframe-teleport-controls": "^0.3.1", "aframe-xr": "github:brianpeiris/aframe-xr#3162aed", "classnames": "^2.2.5", "detect-browser": "^2.1.0", diff --git a/src/assets/hud/button_block.png b/src/assets/hud/button_block.png deleted file mode 100755 index 71c81c10b5d740bc3e9afd45f2237c0ed7fa442d..0000000000000000000000000000000000000000 Binary files a/src/assets/hud/button_block.png and /dev/null differ diff --git a/src/assets/hud/tooltip.png b/src/assets/hud/tooltip.png new file mode 100755 index 0000000000000000000000000000000000000000..8f01466f1551e8cc8bb046e4e434c0b99b721a9b Binary files /dev/null and b/src/assets/hud/tooltip.png differ diff --git a/src/hub.html b/src/hub.html index 24e07f7a2f989304bebe33b8d3260bb91b292ef3..293fa12ea82ba46d485e3f0c9b4a38ff8856c754 100644 --- a/src/hub.html +++ b/src/hub.html @@ -30,7 +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" > + <img id="tooltip" src="./assets/hud/tooltip.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> @@ -83,7 +83,9 @@ <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 slice9="width: 0.45; height: 0.2; left: 53; top: 53; right: 10; bottom: 10; opacity: 1.3; src: #tooltip" position="0 0 .35"> + <a-entity text="value:Block;width:3;align:center;" position="0 0 0.01"></a-entity> + </a-entity> </a-entity> </a-entity> </template> diff --git a/src/hub.js b/src/hub.js index d3bb848459f3e8db5efe557653284908c3a41163..1db136698165309ced35534b3b735f96e61169e0 100644 --- a/src/hub.js +++ b/src/hub.js @@ -13,6 +13,7 @@ import "aframe-input-mapping-component"; import "aframe-billboard-component"; import "aframe-rounded"; import "webrtc-adapter"; +import "aframe-slice9-component"; import { vive_trackpad_dpad4 } from "./behaviours/vive-trackpad-dpad4"; import { oculus_touch_joystick_dpad4 } from "./behaviours/oculus-touch-joystick-dpad4"; diff --git a/yarn.lock b/yarn.lock index 86fb13e790cda023e78086f2454a06d5263d4ef0..97096cfc4ee0f9850dfba4d5e359d96c115c78d3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -194,6 +194,10 @@ aframe-rounded@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/aframe-rounded/-/aframe-rounded-1.0.3.tgz#72c7d9c0ff02e94ee138bf217c284e187efa3cfb" +aframe-slice9-component@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/aframe-slice9-component/-/aframe-slice9-component-1.0.0.tgz#fb0f8441dadd1e8b11cc24512ba7aa692d622be1" + aframe-teleport-controls@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/aframe-teleport-controls/-/aframe-teleport-controls-0.3.1.tgz#7d7ef206f483ea92425a6333b0f8fb26c9596d1c"