JavaScript LMP (QPic) Canvas library
Posted: Sat Jul 02, 2011 6:21 am
Wrote a JS library yesterday.
It allows to load LMP files (QPic) from Quake and Half-Life in a web browser using HTML5 Canvas features.
To use it, link the library somewhere, create new canvas element and write
where:
It allows to load LMP files (QPic) from Quake and Half-Life in a web browser using HTML5 Canvas features.
To use it, link the library somewhere, create new canvas element and write
Code: Select all
<script type="text/javascript">LMPOpen(LMPFileName,LMPTarget,LMPX,LMPY,LMPPaletteFilename,LMPSubX,LMPSubY,LMPSubW,LMPSubH)</script>
- LMPFileName: file name (relative to HTML path, must be on the same domain).
- LMPTarget: id of target canvas.
- LMPX, LMPY: offset of LMP file (optional).
- LMPPaletteFilename: palette path (relative to HTML path, must be on the same domain, optional, palette.lmp by default).
- LMPSubX, LMPSubY, LMPSubW, LMPSubH: cropping (optional).