类型 数字 对象 TextureResourceCanvas 库 graphics.* 修订版 版本 2024.3703 请参阅 TextureResource TextureResourceCanvas texture.pixelWidth texture.height display.setDefault()
此只读属性指示画布资源呈现到的纹理的垂直像素尺寸。
创建 pixelWidth
和 pixelHeight
较低的纹理(例如 32
或 64
)可以创造出漂亮的像素化效果。 为了使像素边缘锐利,请使用display.setDefault( "magTextureFilter", "nearest" )