Installation
First of all, you need to install HitboxJS in your project.
In the browser
To import HitboxJS, simply place this tag before your script.
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/hitbox-js/dist/hitbox.dist.js"></script>
<!-- Then you can import your script -->
<script type="text/javascript" src="my.script.js"></script>
Once this is done, you can start using Hitbox.
Quickstart examplesWith a module bundler
If you are using a module bundler like Webpack or Parcel, you need to add Hitbox as a dependency of your project.
npm install --save hitbox-js
Then you need to import it in your JS file
import Hitbox from 'hitbox-js'
And your are ready to go !
Last updated
Was this helpful?