Description
The "web textures" feature of the Malleable Linkset is an extension of the "text labels" features. It allows an image specified by an URL to be displayed on a prim using the prim-drawing feature of OpenSim.
To add an image to a web texture prim, click the border to get a textbox input and specify the URL there. Leave the textbox blank to get a blank texture. Click "Submit" to display the texture.
You can change the resolution of the image by altering the notecard inside the prim named "Dimensions", which contains the size in the format "<x>,<y>". Note that a texture will always occupy the whole face of the prim; these figures affect the resolution only.
Construction
A web texture prim may be created by taking a cube and applying a taper of 0.1 on the X axis, which a shear of 0.05 also on the X axis. Set Y scale of the prim to the desired size, and the X scale to 1.1 x the desired size. Set the Z scale to 0.001. This will give the appearance of two faces on one apparent side, on of them a narrow border on the left side of the main square drawing surface. The border can be coloured black to conceal the image, and the reverse side and edges may be transparent. See example construction below.
As well as the "Moveable prim" script, the web texture prim should contain the "Web Texture Satellite" script. It is not necessary to create the "Dimensions" notecard, as the script will create one with default values of 512,512 if it is absent.
An additional script needs to be in the root prim: the "Web Texture Controller".
Theoretically, changing the and the dimensions of the prim and in the notecard will allow for images with aspect ratios other than 1:1 to be displayed, although this was not a requirement at the time of development and so was not tested.
Technical points
As with the text labels, the script in the child prim performs the prim drawing functions as instructed by the main ML script. Handling of the textbox dialogs is dealt with in the web texture controller script in the root prim. The latter script would serve well for other global functions, such as integration with the outside world, as and when these are required.
The prim face 4 is hard-coded as the face which is used to initiate the textbox.
The text is stored in PRIM_TEXT, preceded by the string "!WT" to distinguish it from other text.
The remote script PIN is 8990404, to enable automatic updates of the script should this be necessary
Example construction