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 } }
@
-
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?
-