Compare commits
No commits in common. "master" and "v1.2.1" have entirely different histories.
70
README.md
@ -1,40 +1,47 @@
|
|||||||
### **Dota 2 React HUD for [LHM.gg](http://LHM.gg)**
|
|
||||||
|
|
||||||
Dota2 React HUD for [LHM.gg](http://LHM.gg), created by Lexogrine, is an open source Dota 2 HUD that you can use and modify to your needs. It’s the core element of building customized Dota 2 HUDs and spectator overlays for the [LHM.gg](http://LHM.gg) platform.
|
<p align="center">
|
||||||
|
<p align="center" style="font-weight:600; letter-spacing:1pt; font-size:20pt;">LEXOGRINE HUD</p>
|
||||||
|
<p align="center"><img src="icon.png" alt="Logo" width="80" height="80"></p>
|
||||||
|
<p align="center" style="font-weight:400;">Powered by <a href='https://github.com/lexogrine/hud-manager'><strong>« Lexogrine HUD Manager »</strong></a></p>
|
||||||
|
</p>
|
||||||
|
|
||||||
It comes with a set of default options and features that you can use for creating your unique esport experience.
|
# Lexogrine HUD
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Fullfledged example of the React HUD made for HUD Manager.
|
||||||
|
|
||||||
|
## Preview
|
||||||
|
|
||||||
**Preview**
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
**Download**
|
## Setting up
|
||||||
To download it, simply click here: [**DOWNLOAD Dota 2 React HUD for LHM.gg**](https://lhm.gg/download?target=dota2)
|
Fork this repo, clone it, and then run `npm install` and `npm start`. HUD should start on the 3500 port. For this to work have HUD Manager opened so it will pass CS:GO data to the HUD.
|
||||||
|
|
||||||
**Setting up**
|
## Identifying HUD
|
||||||
Fork this repo, clone it, and then run `npm install` and `npm start`. HUD should start on the `3500` port. For this to work, have [LHM.gg](http://LHM.gg) open so it will pass Dota 2 data to the HUD.
|
In `/public` directory edit hud.json so it fits you - fill HUD's name, author, version, specify the radar and killfeed functionalities. At the end replace the thumb.png with your icon :)
|
||||||
|
|
||||||
**Building & distributing**
|
## Building & distributing
|
||||||
To build a version to distribute and move around, in the root directory, run `npm run pack`. It will create the zip file for distribution. Now you can just drag and drop this file into the LHM.gg upload area.
|
To build version to distribute and move around, in the root directory run `npm run pack`. It will create the zip file for distribution. Now you can just drag and drop this file into the HUD Managers upload area.
|
||||||
|
|
||||||
##### **Signing**
|
## Signing
|
||||||
|
|
||||||
To create Signed CS2 HUD for [LHM.gg](http://LHM.gg) to prevent at least from modifying compiled JavaScript files, run `npm run sign`. It's the same as `npm run pack` command but with an additional step of signing `.js` and `.css` files and `hud.json`.
|
To create Signed HUD to prevent at least from modyfing compiled Javascript files run `npm run sign`. It's the same as `npm run pack` command but with additional step of signing .js and .css files and hud.json.
|
||||||
|
|
||||||
**`panel.json` API**
|
## `panel.json` API
|
||||||
To get the incoming data from the HUD Manager, let's take a look at the `src/HUD/SideBoxes/SideBox.tsx` `componentDidMount()` method:
|
To get the incoming data from the HUD Manager, let's take a look at the `src/HUD/SideBoxes/SideBox.tsx` `componentDidMount()` method:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import {configs} from './../../App';
|
import {configs} from './../../App';
|
||||||
...
|
...
|
||||||
configs.onChange((data:any) => {
|
configs.onChange((data:any) => {
|
||||||
if(!data) return;
|
if(!data) return;
|
||||||
|
|
||||||
const display = data.display_settings;
|
const display = data.display_settings;
|
||||||
|
|
||||||
if(!display) return;
|
if(!display) return;
|
||||||
|
|
||||||
if(display[`${this.props.side}_title`]){
|
if(display[`${this.props.side}_title`]){
|
||||||
this.setState({title:display[`${this.props.side}_title`]})
|
this.setState({title:display[`${this.props.side}_title`]})
|
||||||
}
|
}
|
||||||
@ -46,9 +53,8 @@ configs.onChange((data:any) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
To retrieve incoming data, you should just import `configs` object and then listen for the changes with `onChange` method. Usually you want to check for the specific data, as in the callback it will always serve the full form from the Manager.
|
||||||
To retrieve incoming data, you should just import `configs` object and then listen for the changes with `onChange` method. Usually you want to check for the specific data, as in the callback it will always serve the full form from the Manager. However it looks different in the case of action input. In this case, let's look at the `src/HUD/Trivia/Trivia.tsx`:
|
However it looks different in the case of action input. In this case, let's look at the `src/HUD/Trivia/Trivia.tsx`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import {configs, actions} from './../../App';
|
import {configs, actions} from './../../App';
|
||||||
...
|
...
|
||||||
@ -56,13 +62,9 @@ actions.on("triviaState", (state: any) => {
|
|||||||
this.setState({show: state === "show"})
|
this.setState({show: state === "show"})
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
For the action input we need to import the `actions` object and create listener with the parameter on it.
|
For the action input we need to import the `actions` object and create listener with the parameter on it.
|
||||||
|
|
||||||
## `keybinds.json` API
|
## `keybinds.json` API
|
||||||
|
|
||||||
Keybinds API works in very similiar to `panel.json` action API. One more time the example will be from `src/HUD/Trivia/Trivia.tsx`:
|
Keybinds API works in very similiar to `panel.json` action API. One more time the example will be from `src/HUD/Trivia/Trivia.tsx`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
import {configs, actions} from './../../App';
|
import {configs, actions} from './../../App';
|
||||||
...
|
...
|
||||||
@ -70,25 +72,9 @@ actions.on("toggleTrivia", () => {
|
|||||||
this.setState({show: !this.state.show})
|
this.setState({show: !this.state.show})
|
||||||
});
|
});
|
||||||
```
|
```
|
||||||
|
|
||||||
For the action input we need to import the `actions` object and create listener with the parameter on it.
|
|
||||||
|
|
||||||
**`keybinds.json` API**
|
|
||||||
Keybinds API works in very similiar to `panel.json` action API. One more time the example will be from `src/HUD/Trivia/Trivia.tsx`:
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
import {configs, actions} from './../../App';
|
|
||||||
...
|
|
||||||
actions.on("toggleTrivia", () => {
|
|
||||||
this.setState({show: !this.state.show})
|
|
||||||
});
|
|
||||||
```
|
|
||||||
|
|
||||||
Keybinds listener works on the same object as action input, in this case however there are no parameter to retrieve.
|
Keybinds listener works on the same object as action input, in this case however there are no parameter to retrieve.
|
||||||
|
|
||||||
**About Lexogrine**
|
|
||||||
[Lexogrine](http://lexogrine.com) is an AI software development company, offering top-tier AI, web, and mobile design and development services for international companies. Alongside that, Lexogrine offers a set of web and mobile applications \- including [LHM.gg](http://LHM.gg) \- that revolutionize the way experts and specialists from different industries work together on a daily basis.
|
|
||||||
|
|
||||||
[Lexogrine](http://lexogrine.com) specializes in AI development, alongside web, mobile, and cloud development with technologies like TypeScript, Python, LLM, React, React Native, Node.js, Prisma, Medusa, Pytorch, AWS, and Google Cloud Platform.
|
# Download
|
||||||
|
|
||||||
With over 5 years of experience, Lexogrine delivered hundreds of projects, supporting companies and enterprises from all over the world.
|
To download it just click here: [DOWNLOAD HUD](https://github.com/lexogrine/dota2-react-hud/releases/latest)
|
||||||
|
|||||||
40074
package-lock.json
generated
19
package.json
@ -1,23 +1,22 @@
|
|||||||
{
|
{
|
||||||
"name": "lexogrine_dota2_hud",
|
"name": "lexogrine_dota2_hud",
|
||||||
"version": "1.3.1",
|
"version": "1.2.1",
|
||||||
"homepage": "./",
|
"homepage": "./",
|
||||||
"private": true,
|
"private": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@craco/craco": "^5.7.0",
|
"@craco/craco": "^5.7.0",
|
||||||
"@types/jest": "24.0.19",
|
"@types/jest": "24.0.19",
|
||||||
"@types/node": "18.15.11",
|
"@types/node": "12.11.1",
|
||||||
"@types/react": "18.0.35",
|
"@types/react": "16.9.9",
|
||||||
"@types/react-dom": "18.0.11",
|
"@types/react-dom": "16.9.2",
|
||||||
"buffer": "^6.0.3",
|
"dotagsi": "^1.1.3",
|
||||||
"dotagsi": "^1.5.0",
|
|
||||||
"query-string": "^6.12.1",
|
"query-string": "^6.12.1",
|
||||||
"react": "^18.2.0",
|
"react": "^16.13.1",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^16.13.1",
|
||||||
"react-scripts": "5.0.1",
|
"react-scripts": "4.0.0",
|
||||||
"simple-peer": "^9.11.0",
|
"simple-peer": "^9.11.0",
|
||||||
"socket.io-client": "^4.1.3",
|
"socket.io-client": "^4.1.3",
|
||||||
"typescript": "^4.9.5",
|
"typescript": "3.6.4",
|
||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0",
|
"license": "GPL-3.0",
|
||||||
|
|||||||
BIN
public/abilities/abaddon_aphotic_shield.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/abaddon_borrowed_time.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/abaddon_death_coil.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/abaddon_frostmourne.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/ability_default.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/abyssal_underlord_atrophy_aura.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
public/abilities/abyssal_underlord_cancel_dark_rift.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/abyssal_underlord_dark_rift.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/abilities/abyssal_underlord_firestorm.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/abyssal_underlord_pit_of_malice.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/alchemist_acid_spray.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/alchemist_berserk_potion.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/alchemist_chemical_rage.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/alchemist_goblins_greed.png
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
public/abilities/alchemist_unstable_concoction.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/alchemist_unstable_concoction_throw.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/alpha_wolf_command_aura.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/alpha_wolf_critical_strike.png
Normal file
|
After Width: | Height: | Size: 9.1 KiB |
BIN
public/abilities/ancient_apparition_chilling_touch.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/ancient_apparition_cold_feet.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/ancient_apparition_ice_blast.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/abilities/ancient_apparition_ice_blast_release.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
BIN
public/abilities/ancient_apparition_ice_vortex.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/antimage_blink.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/antimage_counterspell.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/antimage_mana_break.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/antimage_mana_overload.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/antimage_mana_void.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/antimage_spell_shield.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/arc_warden_flux.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
public/abilities/arc_warden_magnetic_field.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
public/abilities/arc_warden_scepter.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/abilities/arc_warden_spark_wraith.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/abilities/arc_warden_tempest_double.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
public/abilities/axe_battle_hunger.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/axe_berserkers_call.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/axe_counter_helix.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/axe_culling_blade.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/bane_brain_sap.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/bane_enfeeble.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/bane_fiends_grip.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/bane_nightmare.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/abilities/bane_nightmare_end.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
BIN
public/abilities/batrider_firefly.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/batrider_flamebreak.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/batrider_flaming_lasso.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/batrider_sticky_napalm.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/abilities/beastmaster_boar_poison.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/beastmaster_call_of_the_wild.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/beastmaster_call_of_the_wild_boar.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/beastmaster_call_of_the_wild_hawk.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/beastmaster_greater_boar_poison.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/beastmaster_hawk_invisibility.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/beastmaster_inner_beast.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/beastmaster_primal_roar.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/beastmaster_wild_axes.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/bloodseeker_blood_bath.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/bloodseeker_bloodrage.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/bloodseeker_rupture.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
public/abilities/bloodseeker_thirst.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/abilities/bounty_hunter_jinada.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/bounty_hunter_shuriken_toss.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/bounty_hunter_track.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/bounty_hunter_wind_walk.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/brewmaster_cinder_brew.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/brewmaster_drunken_brawler.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/brewmaster_drunken_haze.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/brewmaster_earth_hurl_boulder.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/brewmaster_earth_pulverize.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/abilities/brewmaster_earth_spell_immunity.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/brewmaster_fire_permanent_immolation.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/brewmaster_primal_split.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/brewmaster_storm_cyclone.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/brewmaster_storm_dispel_magic.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/brewmaster_storm_wind_walk.png
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
public/abilities/brewmaster_thunder_clap.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/bristleback_bristleback.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/bristleback_hairball.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/bristleback_quill_spray.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/bristleback_viscous_nasal_goo.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
public/abilities/bristleback_warpath.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
public/abilities/broodmother_incapacitating_bite.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/broodmother_insatiable_hunger.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
public/abilities/broodmother_silken_bola.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
public/abilities/broodmother_spawn_spiderlings.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/broodmother_spin_web.png
Normal file
|
After Width: | Height: | Size: 36 KiB |
BIN
public/abilities/centaur_double_edge.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/centaur_hoof_stomp.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
public/abilities/centaur_khan_endurance_aura.png
Normal file
|
After Width: | Height: | Size: 30 KiB |
BIN
public/abilities/centaur_khan_war_stomp.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/centaur_return.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
public/abilities/centaur_stampede.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/chaos_knight_chaos_bolt.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
public/abilities/chaos_knight_chaos_strike.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
BIN
public/abilities/chaos_knight_phantasm.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
public/abilities/chaos_knight_reality_rift.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
public/abilities/chen_divine_favor.png
Normal file
|
After Width: | Height: | Size: 28 KiB |