1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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.
This commit is contained in:
reduz
2021-06-17 11:30:20 -03:00
parent 085e1d3c03
commit 94d31ac327
9 changed files with 81 additions and 0 deletions

View File

@@ -180,6 +180,7 @@ public:
TYPE_PARTICLES,
TYPE_TRANSFORM,
TYPE_CLIP_IGNORE,
TYPE_ANIMATION_SLICE,
};
Command *next;
@@ -286,6 +287,17 @@ public:
}
};
struct CommandAnimationSlice : public Command {
double animation_length = 0;
double slice_begin = 0;
double slice_end = 0;
double offset = 0;
CommandAnimationSlice() {
type = TYPE_ANIMATION_SLICE;
}
};
struct ViewportRender {
RenderingServer *owner;
void *udata;