1
0
mirror of https://github.com/lexogrine/cs2-react-hud.git synced 2026-05-04 12:13:11 +02:00

Updated setup to vite and moved to hooks instead of class

This commit is contained in:
Hubert Walczak
2023-11-02 12:11:03 +01:00
parent 44f173f23c
commit f88baa5fc9
90 changed files with 7411 additions and 2706 deletions
+5 -8
View File
@@ -6,17 +6,15 @@ import de_train from './de_train';
import de_overpass from './de_overpass';
import de_nuke from './de_nuke';
import de_vertigo from './de_vertigo';
import de_anubis from './de_anubis';
import de_ancient from './de_ancient';
import api from '../../../../api/api';
import { Player } from 'csgogsi-socket';
import api from '../../../../API';
import { Player } from 'csgogsi';
export type ZoomAreas = {
threshold: (players: Player[]) => boolean;
origin: number[],
zoom: number
}
export interface ScaleConfig {
origin: {
x:number,
@@ -29,7 +27,7 @@ export interface ScaleConfig {
interface SingleLayer {
config: ScaleConfig,
file: string,
file: string
zooms?: ZoomAreas[]
}
@@ -39,7 +37,7 @@ interface DoubleLayer {
config: ScaleConfig,
isVisible: (height: number) => boolean
}[],
file: string,
file: string
zooms?: ZoomAreas[]
}
@@ -54,8 +52,7 @@ const maps: { [key: string] : MapConfig} = {
de_overpass,
de_nuke,
de_vertigo,
de_ancient,
de_anubis
de_ancient
}
api.maps.get().then(fallbackMaps => {