Quake3World.com Forums
id legends
JavaScript LMP (QPic) Canvas library
Login
|
Profile
|
|
FAQ
|
Search
|
IRC
Print view
Previous topic
|
Next topic
Topic Starter
Topic: JavaScript LMP (QPic) Canvas library
SiPlus
Recruit
Joined: 01 Jul 2011
Posts: 1
Posted: 07-01-2011 10:21 PM
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
Code:
<script type="text/javascript">LMPOpen(LMPFileName,LMPTarget,LMPX,LMPY,LMPPaletteFilename,LMPSubX,LMPSubY,LMPSubW,LMPSubH)</script>
where:
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).
Download:
https://skydrive.live.com/#!/?cid=65b4d ... =documents
Top
Quake3World.com
|
Forum Index
|
id legends