Quake3World.com Forums
     id legends
        JavaScript LMP (QPic) Canvas library


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: JavaScript LMP (QPic) Canvas library

Recruit
Recruit
Joined: 01 Jul 2011
Posts: 1
PostPosted: 07-01-2011 10:21 PM           Profile Send private message  E-mail  Edit post Reply with quote


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


Post new topic Reply to topic


cron
Quake3World.com
© ZeniMax. Zenimax, QUAKE III ARENA, Id Software and associated trademarks are trademarks of the ZeniMax group of companies. All rights reserved.
This is an unofficial fan website without any affiliation with or endorsement by ZeniMax.
All views and opinions expressed are those of the author.