texture.pixelWidth

Type Number
Object TextureResourceCanvas
Library graphics.*
Revision Current Public Release (2017.3068)
See also TextureResource
TextureResourceCanvas
texture.pixelHeight
texture.width
display.setDefault()

Overview

This read-only property indicates the horizontal pixel dimensions of the texture that the canvas resource is rendered to.

Creating textures with low pixelWidth and pixelHeight like 32 or 64 can create nice pixelated effects. To make pixel edges sharp, use display.setDefault( "magTextureFilter", "nearest" ) before creating the texture.