llScaleTexture
function
Function syntax
llScaleTexture(float u,// Horizontal (U) texture repeats scale value, in the interval [-100.0, 100.0].float v,// Vertical (V) texture repeats scale value, in the interval [-100.0, 100.0].integer face// Face number orALL_SIDES. Values: Faces
);- Delay
- 0.2 s
- Energy
- 10
Sets the diffuse texture horizontal u and vertical v scales (repeats) on the specified face of the prim. Setting face to ALL_SIDES updates all sides. Negative scale values flip the texture.
Sets the texture u & v scales for the chosen face.
llScaleTexture(0.0, 0.0, 0);Specification
Section titled “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.
Examples
Section titled “Examples”Example 1
// WARNING:// llScaleTexture has a delay of 200 miliseconds// that means every time the function is called within a script it'll take 0.2 seconds// for example the script below would take about 1.2 seconds....that's REALLY SLOW !!!21 collapsed lines
//// To work around that delay use the following instead:////// llSetLinkPrimitiveParamsFast(integer link,// [PRIM_TEXTURE, integer face, string texture, vector repeats, vector offsets, float rotation_in_radians]);
// *******************************************************************************************************************
//Scales the textures on 6 sidesfloat scale;
default{ state_entry() { integer index; while (index < 7) { scale += 0.1; llScaleTexture((float)scale, (float)scale, index);
++index;12 collapsed lines
} }}
// output:// face 0 >> 0.1// face 1 >> 0.2// face 2 >> 0.3// face 3 >> 0.4// face 4 >> 0.5// face 5 >> 0.6// face 6 >> 0.7See also
Section titled “See also”Functions
Section titled “Functions”Original wiki source
Some wiki templates and tables need their original context. View this article on the Second Life Wiki. Technical wording and examples are retained from the source; historical guidance may differ from current behavior.