Difference between revisions of "LlScaleTexture"

From Second Life Wiki
Jump to navigation Jump to search
Line 12: Line 12:
|caveats
|caveats
|constants
|constants
|examples=<pre>
|examples=<lsl>
//Scales the textures on 6 sides
//Scales the textures on 6 sides
float scale;
float scale;
Line 28: Line 28:
     }
     }
}
}
</pre>
</lsl>
|helpers
|helpers
|also_functions={{LSL DefineRow||[[llGetTextureScale]]}}
|also_functions={{LSL DefineRow||[[llGetTextureScale]]}}

Revision as of 08:23, 23 February 2008

Summary

Function: llScaleTexture( float u, float v, integer face );

Sets the texture u & v scales for the chosen face.

• float u
• float v
• integer face face number or ALL_SIDES

If face is ALL_SIDES then the function works on all sides.

Specification

In the default texture mapping mode the scale units are in texture repeats per face. In the planar texture mapping mode the scale units are in texture repeats per half meter. This is in contrast to the in-world editing tool, in which the planar texture scaling units are repeats per meter.

Caveats

  • This function causes the script to sleep for 0.2 seconds.
  • The function silently fails if its face value indicates a face that does not exist.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl> //Scales the textures on 6 sides float scale; default {

   state_entry()
   {
       integer i;
       
       for( i = 1; i < 7; i++ )
       {
           scale = scale + .1;
           llScaleTexture( (float)scale, (float)scale, i);
       }
   }

}

</lsl>

See Also

Functions

•  llGetTextureScale

Deep Notes

Search JIRA for related Issues

Signature

function void llScaleTexture( float u, float v, integer face );