ImageTexture node


Used to map a texture to any geometry in 3D context and to a Rectangle or Bitmap in a 2D context.

Note:
For Tiny Mobile Widgets, use small images (which take less space). To do: - Remove alpha channel (transparency)
- Go to indexed color (48 colors, but depends on the rendering)


1.4.2

The newSize field can keep the image aspect-ratio while downscaling a texture.


MFString url [] :
Multiple item urls can be defined, but only the first one is loaded as a texture.
If the first one is empty (eg url ["" "image1.jpg"]), no image is displayed.
Items url can be of one of the following types:

SFVec2f newSize 0 0 :
The size of the texture can be modified permanently during its first load.
This allows to use images smaller or bigger than the targeted texture size and scale them once at loading time and free resource associated to the original image.

SFVec2f size_changed 0 0 :
Once the image is loaded (on first display), the size of the texture (after transformation done by newSize) is given on this field.
When no texture is loaded, it has [0 0] values.

MFString alternateUrl [] :
The alternateUrl is used to display an image while the main image (the one defined in the url field) is loading or when an error occurs during load.
The two first items can be used to handle these two events separately (eg alternateUrl ["loading.png" "error.png"]).
If only the first image is defined, it will be used for both loading and error cases.

SFBool filter FALSE :
The filter is used to smooth the image when it is scaled by newSize or by Transform2D.scale.
Use this field sparingly as this process is quite CPU consumming on big images.

Note:
the alternateUrl only supports "local" images available in the M4M file.