A mixin class with a dwim create function.
- Method create
This create function has the following heuristic:
If a mapping is encountered, the following information will be attempted to be extracted.
The texture image.
The image dimensions. If not provided, the dimensions of the
"image"member will be used.
The alpha mode.
Should the texture be mipmapped or not.
Should the texture be clamped or not.
The texture mode.
The debug name associated with this texture.
If an object is encountered in the argument list, the first object will be used as texture image and the second as texture alpha.
If a string is encountered in the argument list, it will be used as debug name associated with this texture.
Once all mappings, strings and objects are removed from the argument list, the remaining integers will be interpreted as width, height, alpha, mipmap and mode, unless there is only one argument. In that case it will be interpreted as the alpha mode.