This repo provides two web components for displaying public achievement leaderboards and scoreboard scores from the Vements API.
- Copy the
vements-web.jsfile into your project. - Add the following script tag to your HTML file:
<script src="vements-web.js"></script>Adjust the src attribute to point to the location of the vements-web.js file in your project.
- Add one or more instances of the web components to your HTML file. Examples of each are provided below.
<scoreboard-scores scoreboard-id="01HEDQVWKN00000738M1TQTB50">
</scoreboard-scores>And for achievement leaderboards:
<achievement-leaderboard achievement-id="01HEDQVTQ70000002FFHVXZAJ3">
</achievement-leaderboard>