Difference between revisions of "User:Kerik Rau"

From Second Life Wiki
Jump to: navigation, search
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
==SLURL Raster Image Generator==
+
For all intentions this is a dumping ground of information that might be useful.  All the information found here is free to use however you wish with no limitations.
<pre>
+
//SLURL Tile URL Generator - By Kerik Rau
+
  
//Based on the javascript from SLURL.com, mearly an adaptation in LSL
 
//It should only take a minute or 2 to export this into PHP or other languages
 
  
//SLURL uses WMS, I still want to look at incorperating it into something like Mapguide
+
{| width="90%"  style="background: #B8E2FF; border: 1px solid #0090FF;"
//I will need to look at the implementation to see if this would be easy or a pain
+
|- align="center"
 +
| width="150px" | Projects
 +
| Description
 +
|-
 +
| [[ User:Kerik_Rau/Apoc | Apocalypse HUD ]]
 +
| A modular tool designed to reduce code reproduction and provide the shortest path available for a given task.  Thus it is fast and highly scalable by design.
 +
|-
 +
| [[ User:Kerik_Rau/n2k.AppSpot | n2k.AppSpot ]]
 +
| A project aiming to make a name2key and key2name service via Google's App Engine that utilizes the Second Life Search rather than storing keys within a database.
 +
|}
  
vector genTileVec(vector RegPos)
 
{
 
    //tiles are in a grid based on the regions, so 256m = 1 tile
 
    RegPos /= 256.0;
 
   
 
    //offset provided in the javascript, really 1278 + 1 (probably 0 -> 1 index difference?)
 
    RegPos.y = 1279.0 - RegPos.y;
 
  
    return RegPos;
 
}
 
  
string genMapURL()
+
{| width="90%" style="background: #FFEC80; border: 1px solid #E3AD35;"
{  
+
|- align="center"
    vector TilePos = genTileVec(llGetRegionCorner());
+
| width="150px" | Scripts
   
+
| Description
    //should look like http://secondlife.com/apps/mapapi/grid/map_image/x-y-zoom-0
+
|-
    string mapURL = "http://secondlife.com/apps/mapapi/grid/map_image/";
+
| [[ User:Kerik_Rau/Simple Slide Show | Simple Slide Show ]]
    mapURL += (string) llFloor(TilePos.x);
+
| Throw in the textures and it will automatically rotate through them.
    mapURL += "-";
+
|-
    mapURL += (string) llFloor(TilePos.y);
+
| [[ User:Kerik_Rau/MapTileURL | Map Tile URL ]]
   
+
| An LSL function that returns a string containing the current regions tile URL
    //the 3rd value is something to do with zoom, but only 1 seems to work with this
+
|-
    //the 4th value is undefined, omitting it works but I leave it in to match SLURL
+
| [[ User:Kerik_Rau/XY2URL | XY to URL ]]
    mapURL += "-1-0";
+
| A simple script that adds multiple links to a single prim
    return mapURL;
+
|}
}
+
 
+
 
+
default
+
{
+
    state_entry()
+
    {
+
        llSetText("SLURL Raster Image URL Generator\nOpens the image of the current sim\n(in a browser)", <1,1,1>, 1);
+
    }
+
   
+
    touch_start(integer numdet)
+
    {
+
        integer i;
+
        for(i = 0; i < numdet; ++i)
+
            llLoadURL(llDetectedKey(i), "load this page to see the sim image", genMapURL());
+
       
+
    }
+
}
+
 
+
</pre>
+

Latest revision as of 21:01, 26 January 2009

For all intentions this is a dumping ground of information that might be useful. All the information found here is free to use however you wish with no limitations.


Projects Description
Apocalypse HUD A modular tool designed to reduce code reproduction and provide the shortest path available for a given task. Thus it is fast and highly scalable by design.
n2k.AppSpot A project aiming to make a name2key and key2name service via Google's App Engine that utilizes the Second Life Search rather than storing keys within a database.


Scripts Description
Simple Slide Show Throw in the textures and it will automatically rotate through them.
Map Tile URL An LSL function that returns a string containing the current regions tile URL
XY to URL A simple script that adds multiple links to a single prim