Full rewrite
- Removed csflow, as its basically not getting used when high optimization is needed - Fully rewrote radarflow dma logic. - Speed increase from 20hz to over 130 hz over pcileech, thanks to scatter reads and improved caching - Removed docs, because those were for csflow, which is now removed
0
webradar/assets/image/cs_italy_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
0
webradar/assets/image/cs_office_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 186 KiB |
0
webradar/assets/image/de_ancient_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 152 KiB After Width: | Height: | Size: 152 KiB |
0
webradar/assets/image/de_anubis_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 212 KiB After Width: | Height: | Size: 212 KiB |
0
webradar/assets/image/de_dust2_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 156 KiB After Width: | Height: | Size: 156 KiB |
0
webradar/assets/image/de_inferno_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 126 KiB After Width: | Height: | Size: 126 KiB |
0
webradar/assets/image/de_mirage_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
0
webradar/assets/image/de_nuke_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 76 KiB After Width: | Height: | Size: 76 KiB |
0
webradar/assets/image/de_overpass_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 196 KiB After Width: | Height: | Size: 196 KiB |
0
webradar/assets/image/de_vertigo_radar_psd.png
Normal file → Executable file
|
Before Width: | Height: | Size: 97 KiB After Width: | Height: | Size: 97 KiB |
0
webradar/assets/json/cs_italy.json
Normal file → Executable file
0
webradar/assets/json/cs_office.json
Normal file → Executable file
0
webradar/assets/json/de_ancient.json
Normal file → Executable file
0
webradar/assets/json/de_anubis.json
Normal file → Executable file
0
webradar/assets/json/de_dust2.json
Normal file → Executable file
0
webradar/assets/json/de_inferno.json
Normal file → Executable file
0
webradar/assets/json/de_mirage.json
Normal file → Executable file
0
webradar/assets/json/de_nuke.json
Normal file → Executable file
0
webradar/assets/json/de_overpass.json
Normal file → Executable file
0
webradar/assets/json/de_vertigo.json
Normal file → Executable file
1
webradar/index.html
Normal file → Executable file
@@ -11,6 +11,7 @@
|
||||
<div id="settingsHolder">
|
||||
<div class="settings">
|
||||
<button onclick="toggleZoom()">Toggle Zoom</button>
|
||||
<button onclick="toggleStats()">Toggle Stats</button>
|
||||
</div>
|
||||
</div>
|
||||
<canvas id="canvas"></canvas>
|
||||
|
||||
21
webradar/script.js
Normal file → Executable file
@@ -5,14 +5,16 @@ const enemyColor = "#ec040b"
|
||||
const bombColor = "#eda338"
|
||||
const textColor = "#d1d1d1"
|
||||
|
||||
// Should zoom or not
|
||||
// Settings
|
||||
shouldZoom = true
|
||||
drawStats = true
|
||||
|
||||
// Common
|
||||
canvas = null
|
||||
ctx = null
|
||||
|
||||
// radarflow specific
|
||||
freq = 0
|
||||
image = null
|
||||
map = null
|
||||
mapName = null
|
||||
@@ -32,6 +34,7 @@ if (location.protocol == 'https:') {
|
||||
} else {
|
||||
websocketAddr = `ws://${window.location.host}/ws`
|
||||
}
|
||||
//websocketAddr = "ws://localhost:8001/ws"
|
||||
|
||||
// Util functions
|
||||
const clamp = (num, min, max) => Math.min(Math.max(num, min), max);
|
||||
@@ -186,6 +189,16 @@ function render() {
|
||||
ctx.fillText("Disconnected", 1024/2, 1024/2);
|
||||
}
|
||||
}
|
||||
|
||||
if (drawStats) {
|
||||
ctx.font = "16px Arial";
|
||||
ctx.textAlign = "left"
|
||||
ctx.fillStyle = textColor
|
||||
ctx.lineWidth = 2;
|
||||
ctx.strokeStyle = "black"
|
||||
ctx.strokeText(`${freq} Hz`, 2, 18)
|
||||
ctx.fillText(`${freq} Hz`, 2, 18)
|
||||
}
|
||||
}
|
||||
|
||||
if (websocket != null) {
|
||||
@@ -355,6 +368,8 @@ function connect() {
|
||||
} else {
|
||||
let data = JSON.parse(event.data);
|
||||
|
||||
freq = data.freq;
|
||||
|
||||
if (data.ingame == false) {
|
||||
mapName = null
|
||||
entityData = null
|
||||
@@ -417,4 +432,8 @@ addEventListener("DOMContentLoaded", (e) => {
|
||||
|
||||
function toggleZoom() {
|
||||
shouldZoom = !shouldZoom
|
||||
}
|
||||
|
||||
function toggleStats() {
|
||||
drawStats = !drawStats
|
||||
}
|
||||
1
webradar/styles.css
Normal file → Executable file
@@ -10,6 +10,7 @@ body {
|
||||
|
||||
#canvasContainer {
|
||||
aspect-ratio: 1 / 1;
|
||||
height: 100vh;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: width 0.5s ease; /* Smooth transition */
|
||||
|
||||