From 94d31ac327a8fe6ff7c007b34cb25772bf96d17e Mon Sep 17 00:00:00 2001 From: reduz Date: Thu, 17 Jun 2021 11:30:20 -0300 Subject: Implement animation slice drawing in CanvasItem * Added a function to ignore subsequent commands if they don't fall within the slice. * This will be used by the new TileMap to properly provide animated tiles. --- doc/classes/CanvasItem.xml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'doc/classes') diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 87b157db4e..f15bc14be3 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -24,6 +24,21 @@ Overridable function called by the engine (if defined) to draw the canvas item. + + + + + + + + + + + + + Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. + + @@ -98,6 +113,13 @@ Draws a colored polygon of any amount of points, convex or concave. + + + + + After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. + + -- cgit v1.2.3