How does QQuickItem do with Animation? very amazing!
-
The Item ( which is QuickItem in C++ ) support Animation, how does my "ColorCube" ( derived from QObject and registered into QML ) support Animation? the simple code does not apply Animation, in other word, the color cube does not rotate.
@
ColorCube
{
id: cube
objectName: "The ColorCube"
vertexShaderFile: "../shader/ColorCube.vsh"
fragmentShaderFile: "../shader/ColorCube.fsh"ParallelAnimation { running: true NumberAnimation { target: cube property: "rotateAngle" from: 0 to: 360 duration: 5000 } Vector3dAnimation { target: cube property: "axis" from: Qt.vector3d( 0, 1, 0 ) to: Qt.vector3d( 1, 0, 0 ) duration: 5000 } loops: Animation.Infinite } }
@
-
You need to post a complete example including the ColorCube if we're going to help you.
-
Sletta: you mean, an example of some outer code that instantiates a ColorCube? So that others could test the code without having to write the outer code themselves? (I'm not criticizing, just trying to understand and facilitate the discussion.)
Also, I don't understand why the OP mentions registering ColorCube, as if it were defined in C++, but isn't the posted code the definition of ColorCube in QML?
-
The posted example is incomplete, so we have no idea what the properties "rotateAngle" and "axis" affect. Nor do we know what the ColorCube is supposed to do with those. Hence, a complete example needs to be posted before anybody can comment on it.