Skip to main content

Performance monitoring

This plug-in is implemented using stat.js and will display performance information at the specified location image.png image.png image.png

Install

With NPM

npm i @eva/plugin-stats

In Browser

<script src="https://unpkg.com/@eva/plugin-stats@1.2.x/dist/EVA.plugin.stats.min.js"></script>

Usage

import {StatsSystem} from '@eva/plugin-stats'

const game = new Game({
autoStart: true, // optional
frameRate: 60,
})

game.addSystem(new StatsSystem({
show: true // Whether to display or not is set here, it will not run if set to false.
style: {// The values here are all width to percentage vw units
x: 0,
y: 50,
width: 20,
height: 12
}
}))
If you have any questions or need our help with development, please scan the code to contact us.
X