Hi, I tried your example and fixed it this way:
– The Flow component is responsible for the positioning of the elements in your code, so it is required that the actual width and height can be accessed. It seems the scale-property tampers with the calculations and the elements then get wrong positions.
A specific width and height for the delegate (Sprite Sequence) should fix that problem:
import Felgo 3.0
import QtQuick 2.0
Flow {
anchors.fill: parent
anchors.margins: 1
spacing: 4
Repeater {
id: treesRepeater
model: 0
delegate: SpriteSequenceVPlay {
width: 1024 * 0.1
height: 512 * 0.1
SpriteVPlay {
source: "../assets/img/Tree.png"
frameCount: 4
frameWidth: 1024
frameHeight: 512
frameRate: 4
}
}
}
}
As for the image: If the Sprite image is set up correctly, the animation should work fine. In your case, the image “Tree.png” should be 4096 x 512 px.
All the frames of the animation should have the same width and should be aligned next to each other within the image. If you use four frames, they should each use 1/4 of the total width = 1024 px.
Hope this helps you!
Best,
GT