Type IMaterial

IMaterial

Methods

getColor( x, y ) Gets the colour of the given pixel co-ordinates on the texture.
getFloat( param ) Gets the given float material parameter.
getInt( param ) Gets the given integer material parameter.
getMatrix( param ) Gets the given VMatrix material parameter.
getName() Gets the path of the material.
getShader() Gets the shader the material is using.
getString( param ) Gets the given string material parameter.
getVector( param ) Gets the given vector material parameter.
getVectorLinear( param ) Gets the given linear vector material parameter.
height() Returns the height of the material.
isError() Returns whether the material has not loaded correctly (i.e doesn't exist).
width() Returns the width of the material.


Methods

IMaterial:getColor( x, y )
Gets the colour of the given pixel co-ordinates on the texture. Only works for PNG files.

Environment:

Client

Parameters:

  • x: The x co-ordinate.
  • y: The y co-ordinate.

Return value:

    (Color) Pixel colour object.
IMaterial:getFloat( param )
Gets the given float material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (number) Float value at the given key.
IMaterial:getInt( param )
Gets the given integer material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (number) Integer value at the given key.
IMaterial:getMatrix( param )
Gets the given VMatrix material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (VMatrix) VMatrix value at the given key.
IMaterial:getName()
Gets the path of the material.

Environment:

Client

Return value:

    (string) String path of the material.
IMaterial:getShader()
Gets the shader the material is using.

Environment:

Client

Return value:

    (string) String shader name, e.g "UnlitGeneric".
IMaterial:getString( param )
Gets the given string material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (string) String value at the given key.
IMaterial:getVector( param )
Gets the given vector material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (Vector) Vector value at the given key.
IMaterial:getVectorLinear( param )
Gets the given linear vector material parameter.

Environment:

Client

Parameters:

  • param: The string key to read.

Return value:

    (Vector) Vector value at the given key.
IMaterial:height()
Returns the height of the material.

Environment:

Client

Return value:

    (number) Height value.
IMaterial:isError()
Returns whether the material has not loaded correctly (i.e doesn't exist).

Environment:

Client

Return value:

    (boolean) True if the material invalid.
IMaterial:width()
Returns the width of the material.

Environment:

Client

Return value:

    (number) Width value.

Valid XHTML 1.0!