Module content.scripts.tex_util🔗
global record TexUtil
enum MinFilterMode
"LINEAR" "LINEAR_MIPMAP_LINEAR" "LINEAR_MIPMAP_NEAREST" "NEAREST" "NEAREST_MIPMAP_NEAREST" endmakeMaterialIndexTexture: function(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc makeTextureLinearClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapRepeat: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClampVertical: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc endrecord TextureDesc
type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end
Category: globals🔗
TexUtil🔗
global record TexUtil
enum MinFilterMode
"LINEAR" "LINEAR_MIPMAP_LINEAR" "LINEAR_MIPMAP_NEAREST" "NEAREST" "NEAREST_MIPMAP_NEAREST" endmakeMaterialIndexTexture: function(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc makeTextureLinearClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapRepeat: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClamp: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc makeTextureMipmapClampVertical: function(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc endrecord TextureDesc
type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end
TexUtil.TexType🔗
TexUtil.TexType."CUBE_MAP"🔗
Cube map texture
TexUtil.TexType."THREED"🔗
3D texture
TexUtil.TexType."TWOD"🔗
2D texture
TexUtil.TexType."TWOD_ARRAY"🔗
2D array texture
TexUtil.MagFilterMode🔗
TexUtil.MagFilterMode."LINEAR"🔗
Linear magnification
TexUtil.MagFilterMode."NEAREST"🔗
Nearest-neighbor magnification
TexUtil.MinFilterMode🔗
TexUtil.MinFilterMode."LINEAR"🔗
Linear minification
TexUtil.MinFilterMode."LINEAR_MIPMAP_LINEAR"🔗
Linear minification with linear mipmap interpolation
TexUtil.MinFilterMode."LINEAR_MIPMAP_NEAREST"🔗
Linear minification with nearest mipmap selection
TexUtil.MinFilterMode."NEAREST"🔗
Nearest-neighbor minification
TexUtil.MinFilterMode."NEAREST_MIPMAP_NEAREST"🔗
Nearest-neighbor minification with nearest mipmap selection
TexUtil.WrapMode🔗
TexUtil.WrapMode."CLAMP_TO_EDGE"🔗
Clamp to the edge of the texture
TexUtil.WrapMode."MIRROR_REPEAT"🔗
Mirror and repeat the texture
TexUtil.WrapMode."REPEAT"🔗
Repeat the texture
TexUtil.TextureDesc🔗
record TexUtil.TextureDesc
type: TexType fileName: string magFilter: MagFilterMode minFilter: MinFilterMode wrapS: WrapMode wrapT: WrapMode mipmapAlphaScale: number compressionAllowed: boolean redGreen: boolean scaleDownAllowed: boolean end
TexUtil.TextureDesc.type🔗
TexUtil.TextureDesc.type: TexType
Texture dimensionality type
TexUtil.TextureDesc.fileName🔗
TexUtil.TextureDesc.fileName: string
Path to the texture file
TexUtil.TextureDesc.magFilter🔗
TexUtil.TextureDesc.magFilter: MagFilterMode
Magnification filter mode
TexUtil.TextureDesc.minFilter🔗
TexUtil.TextureDesc.minFilter: MinFilterMode
Minification filter mode
TexUtil.TextureDesc.wrapS🔗
TexUtil.TextureDesc.wrapS: WrapMode
Horizontal (S) wrap mode
TexUtil.TextureDesc.wrapT🔗
TexUtil.TextureDesc.wrapT: WrapMode
Vertical (T) wrap mode
TexUtil.TextureDesc.mipmapAlphaScale🔗
TexUtil.TextureDesc.mipmapAlphaScale: number
Alpha scale factor applied during mipmap generation
TexUtil.TextureDesc.compressionAllowed🔗
TexUtil.TextureDesc.compressionAllowed: boolean
Whether compression is allowed for this texture
TexUtil.TextureDesc.redGreen🔗
TexUtil.TextureDesc.redGreen: boolean
Whether to use only the red and green channels
TexUtil.TextureDesc.scaleDownAllowed🔗
TexUtil.TextureDesc.scaleDownAllowed: boolean
Whether the texture may be scaled down
TexUtil.makeMaterialIndexTexture🔗
function TexUtil.makeMaterialIndexTexture(fileName : string, wrapS : WrapMode, wrapT : WrapMode): TextureDesc
Create a material index texture description.
ParametersfileName:string— path to the texture filewrapS:WrapMode— horizontal wrap modewrapT:WrapMode— vertical wrap mode
TextureDesc— texture description
TexUtil.makeTextureLinearClamp🔗
function TexUtil.makeTextureLinearClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc
Create a linear-filtered, clamped texture description.
ParametersfileName:string— path to the texture filecompressionAllowed:boolean— whether compression is allowedscaleDownAllowed:boolean— whether the texture may be scaled downredGreen:boolean— whether to use only red and green channelstexType:TexType— texture dimensionality type
TextureDesc— texture description
TexUtil.makeTextureMipmapRepeat🔗
function TexUtil.makeTextureMipmapRepeat(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc
Create a mipmapped, repeating texture description.
ParametersfileName:string— path to the texture filecompressionAllowed:boolean— whether compression is allowedscaleDownAllowed:boolean— whether the texture may be scaled downredGreen:boolean— whether to use only red and green channelstexType:TexType— texture dimensionality type
TextureDesc— texture description
TexUtil.makeTextureMipmapClamp🔗
function TexUtil.makeTextureMipmapClamp(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc
Create a mipmapped, clamped texture description.
ParametersfileName:string— path to the texture filecompressionAllowed:boolean— whether compression is allowedscaleDownAllowed:boolean— whether the texture may be scaled downredGreen:boolean— whether to use only red and green channelstexType:TexType— texture dimensionality type
TextureDesc— texture description
TexUtil.makeTextureMipmapClampVertical🔗
function TexUtil.makeTextureMipmapClampVertical(fileName : string, compressionAllowed : boolean, scaleDownAllowed : boolean, redGreen : boolean, texType : TexType): TextureDesc
Create a mipmapped, vertically-clamped texture description.
ParametersfileName:string— path to the texture filecompressionAllowed:boolean— whether compression is allowedscaleDownAllowed:boolean— whether the texture may be scaled downredGreen:boolean— whether to use only red and green channelstexType:TexType— texture dimensionality type
TextureDesc— texture description