leaderboard tweaks

This commit is contained in:
Diego F. Goberna
2018-11-19 21:35:38 +01:00
committed by Kevin Ngo
parent fdd625c4ab
commit a2288eaee1
4 changed files with 48 additions and 29 deletions

View File

@@ -135,7 +135,7 @@ AFRAME.registerComponent('leaderboard-title', {
update: function () {
const value = this.data.leaderboardQualified
? 'NEW HIGH SCORE'
? 'NEW HIGH SCORE!'
: 'LEADERBOARD';
this.el.setAttribute('text', 'value', value);
}

View File

@@ -76,6 +76,8 @@ AFRAME.registerComponent('super-keyboard', {
font: this.data.font,
baseline: 'bottom',
lineHeight: 40,
shader: 'msdf',
negate: true,
value: this.data.label,
color: this.data.labelColor,
width: this.data.width,
@@ -161,7 +163,7 @@ AFRAME.registerComponent('super-keyboard', {
this.data.width !== oldData.width) {
this.label.setAttribute('text', {
value: this.data.label, color: this.data.labelColor, width: this.data.width});
this.label.object3D.position.set(0, 0.3 * w, -0.02);
this.label.object3D.position.set(0, 0.35 * w, -0.02);
}
if (this.data.width !== oldData.width ||