类型 数字 对象 TextureResourceCanvas 库 graphics.* 修订 发布 2024.3703 另请参阅 TextureResource TextureResourceCanvas texture.pixelHeight texture.width display.setDefault()
此只读属性指示画布资源渲染到的纹理的水平像素尺寸。
使用较低的 pixelWidth
和 pixelHeight
(例如 32
或 64
)创建纹理,可以实现出色的像素化效果。若要使像素边缘清晰,请使用display.setDefault( "magTextureFilter", "nearest" )