Polygon2D
Node2D
简要描述
2D多边形。
Polygon2D由一组点定义。每个点都会连接到下一个点,最后一个点会连接到第一个点,形成闭环,2D多边形可以填充颜色(固定色或者渐变色),或者是填充纹理
注意:默认情况下,IdeaXR一次最多只能绘制4,096个多边形点。如果需要增加这个上限,打开项目设置[Setting]调整ProjectSettings.rendering/limits/buffers/canvas_polygon_buffer_size_kb 和 ProjectSettings.rendering/limits/buffers/canvas_polygon_index_buffer_size_kb
成员说明
Default | false |
---|
setter | set_antialiased(value) |
getter | get_antialiased |
Default | [] |
---|
setter | _set_bones(value) |
getter | _get_bones |
Default | Color( 1, 1, 1, 1 ) |
---|
setter | set_color(value) |
getter | get_color |
- int internal_vertex_count
Default | 0 |
---|
setter | set_internal_vertex_count(value) |
getter | get_internal_vertex_count |
Default | 100.0 |
---|
setter | set_invert_border(value) |
getter | get_invert_border |
Default | false |
---|
setter | set_invert(value) |
getter | get_invert |
Default | Vector2( 0, 0 ) |
---|
setter | set_offset(value) |
getter | get_offset |
Default | PoolVector2Array( ) |
---|
setter | set_polygon(value) |
getter | get_polygon |
Default | [] |
---|
setter | set_polygons(value) |
getter | get_polygons |
Default | NodePath("") |
---|
setter | set_skeleton(value) |
getter | get_skeleton |
setter | set_texture(value) |
---|
getter | get_texture |
Default | Vector2( 0, 0 ) |
---|
setter | set_texture_offset(value) |
getter | get_texture_offset |
setter | set_texture_rotation(value) |
---|
getter | get_texture_rotation |
- float texture_rotation_degrees
Default | 0.0 |
---|
setter | set_texture_rotation_degrees(value) |
getter | get_texture_rotation_degrees |
Default | Vector2( 1, 1 ) |
---|
setter | set_texture_scale(value) |
getter | get_texture_scale |
Default | PoolVector2Array( ) |
---|
setter | set_uv(value) |
getter | get_uv |
- PoolColorArray vertex_colors
Default | PoolColorArray( ) |
---|
setter | set_vertex_colors(value) |
getter | get_vertex_colors |
方法说明
- add_bone add_bone(path: NodePath, weights: PoolRealArray)
- clear_bones clear_bones()
- erase_bone erase_bone(index: int)
- get_bone_count get_bone_count() const
- get_bone_path get_bone_path(index: int) const
- get_bone_weights get_bone_weights(index: int) const
- set_bone_path set_bone_path(index: int, path: NodePath)
- set_bone_weights set_bone_weights(index: int, weights: PoolRealArray)