0.8.2 • Published 10 months ago
hlviewer.js v0.8.2
hlviewer.js
HLViewer is a simple to use javascript library for viewing maps
and playing replays of GoldSrc engine based games entirely in browser.
Demo
You can check out the live demo here
Screenshot
Example Usage
Download the library from dist directory and include it in your html.
<link rel="stylesheet" src="your/path/to/hlviewer.style">
<script src="your/path/to/hlviewer.min.js"></script>
or use a CDN
<link rel="stylesheet" src="https://unpkg.com/hlviewer.js@0.8.0/dist/hlviewer.css">
<script src="https://unpkg.com/hlviewer.js@0.8.0/dist/hlviewer.min.js"></script>
Create a target element where viewer will later be created.
Width and height MUST be set.
<div id="hlv-target" style="width:800px; height:600px"></div>
This code will initialize the state.
var hlv = HLViewer.init('#hlv-target', {
// paths where files are stored on your server
paths: {
base: '/',
replays: 'res/replays',
maps: 'res/maps',
wads: 'res/wads',
skies: 'res/skies',
sounds: 'res/sounds'
}
})
This will load both the replay and the map of that replay (and wad files).
hlv.load('some_file.dem')
This will only load the map (and wad files).
hlv.load('some_file.bsp')
0.8.0-rc1
10 months ago
0.8.1
10 months ago
0.8.0
10 months ago
0.8.2
10 months ago
0.7.5
4 years ago
0.7.4
6 years ago
0.7.3
6 years ago
0.7.2
6 years ago
0.7.1
6 years ago
0.7.0
6 years ago
0.6.0
7 years ago
0.5.0
7 years ago
0.4.1
7 years ago
0.3.0
8 years ago
0.2.0
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago
0.1.0
8 years ago