Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ResourceImporterBitMap

继承: ResourceImporter < RefCounted < Object

导入 BitMap 资源(布尔值的 2D 数组)。

描述

BitMap 资源通常被用作 TextureButtonTouchScreenButton 的点击遮罩。

教程

属性

int

create_from

0

float

threshold

0.5


属性说明

int create_from = 0

用于生成位图的数据源。

黑白:HSV 值大于 threshold 的像素将被视为“启用”(位为 true)。如果像素低于或等于阈值,则将被视为“禁用”(位为 false)。

Alpha:Alpha值大于 threshold 的像素将被视为“启用”(位为 true)。如果像素低于或等于阈值,则将被视为“禁用”(位为 false)。


float threshold = 0.5

用于确定哪些位应被视为启用或禁用的阈值。另见 create_from