Better explain texture repeat
This commit is contained in:
parent
03359c8735
commit
49d4168f30
@ -638,7 +638,8 @@
|
||||
The filtering mode used to render this [CanvasItem]'s texture(s).
|
||||
</member>
|
||||
<member name="texture_repeat" type="int" setter="set_texture_repeat" getter="get_texture_repeat" enum="CanvasItem.TextureRepeat" default="0">
|
||||
The repeating mode used to render this [CanvasItem]'s texture(s).
|
||||
The repeating mode used to render this [CanvasItem]'s texture(s). It affects what happens when the texture is sampled outside its extents, for example by setting a [member Sprite2D.region_rect] that is larger than the texture or assigning [Polygon2D] UV points outside the texture.
|
||||
[b]Note:[/b] [TextureRect] is not affected by [member texture_repeat], as it uses its own texture repeating implementation.
|
||||
</member>
|
||||
<member name="top_level" type="bool" setter="set_as_top_level" getter="is_set_as_top_level" default="false">
|
||||
If [code]true[/code], this [CanvasItem] will [i]not[/i] inherit its transform from parent [CanvasItem]s. Its draw order will also be changed to make it draw on top of other [CanvasItem]s that do not have [member top_level] set to [code]true[/code]. The [CanvasItem] will effectively act as if it was placed as a child of a bare [Node].
|
||||
@ -748,7 +749,7 @@
|
||||
The [CanvasItem] will inherit the filter from its parent.
|
||||
</constant>
|
||||
<constant name="TEXTURE_REPEAT_DISABLED" value="1" enum="TextureRepeat">
|
||||
The texture does not repeat.
|
||||
The texture does not repeat. Sampling the texture outside its extents will result in "stretching" of the edge pixels. You can avoid this by ensuring a 1-pixel fully transparent border on each side of the texture.
|
||||
</constant>
|
||||
<constant name="TEXTURE_REPEAT_ENABLED" value="2" enum="TextureRepeat">
|
||||
The texture repeats when exceeding the texture's size.
|
||||
|
Loading…
x
Reference in New Issue
Block a user