Unsolved sharing effects, method animation in Qml here...
-
hi,dears
i want to some beautiful methods and effects and methods animation for developing a mobile game .
generally i need effects that is best and competitive to game app android and is acceptable.fortunately Qml is power full. so i will sharing here my effects that i find. the source and snapshot i will share here soon .
i invited Qt experts that share their bright experience here,
thanks for your attention -
this is first my function demo :
demoimport QtQuick 2.2 import QtQuick.Window 2.1 Window { id:demo title:"Coreanimate" minimumHeight:Screen.desktopAvailableHeight/1.2 maximumHeight: Screen.desktopAvailableHeight/1.2 minimumWidth: Screen.desktopAvailableHeight/2 maximumWidth: Screen.desktopAvailableHeight/2 x: (Screen.desktopAvailableWidth-width)/2 y: (Screen.desktopAvailableHeight-height)/2 visible: true width: 360 height:550 color:"black"; Row {id:row y:demo.height/2.5 spacing: 5 Rectangle { width: 100; height: 100 color: "transparent" SequentialAnimation on y { loops: Animation.Infinite PropertyAnimation { to: 10 } PropertyAnimation { to: 100 } PropertyAnimation { to:10 } PropertyAnimation { to: 100 } PropertyAnimation { to: 10 } PropertyAnimation { to: 100 } PropertyAnimation { to: 10 } PropertyAnimation { to: 100 } } SequentialAnimation on x{ loops: Animation.Infinite PropertyAnimation { to:10 } PropertyAnimation { to:50 } PropertyAnimation { to: 100} PropertyAnimation { to: 150 } PropertyAnimation { to:200 } PropertyAnimation { to:250 } PropertyAnimation { to: 300} PropertyAnimation { to: 350 } } Image {id:image source:"egg0my.png"; width:100 height:100 anchors.centerIn: parent RotationAnimation on rotation {id:hrkh duration:300; loops: Animation.Infinite from:360 to:0 } MouseArea { anchors.fill: parent } } } } }
-
demo2:
link image:demo2
demo.qmlimport QtQuick 2.2 import QtQuick.Window 2.1 Window { id:demo title:"Coreanimate" minimumHeight:Screen.desktopAvailableHeight/1.2 maximumHeight: Screen.desktopAvailableHeight/1.2 minimumWidth: Screen.desktopAvailableHeight/2 maximumWidth: Screen.desktopAvailableHeight/2 x: (Screen.desktopAvailableWidth-width)/2 y: (Screen.desktopAvailableHeight-height)/2 visible: true width: 360 height:550 color:"black"; Row {id:row y:demo.height/3 spacing: 5 Rectangle { width: 240; height: 200 color:"black"; Component { id: delegate Column { id: wrapper Image { anchors.horizontalCenter: nameText.horizontalCenter width: 64; height: 64 source: icon } Text { id: nameText text: name font.pointSize: 16 color: wrapper.PathView.isCurrentItem ? "red" : "yellow" } } } PathView { anchors.fill: parent model: ContactModel {} delegate: delegate path: Path { startX: 120; startY:120 PathQuad { x: 120; y: 125; controlX: 260; controlY: 105 } PathQuad { x: 120; y: 110; controlX: -20; controlY: 105 } } } } } }
ContactModel.qml
import QtQuick 2.0 ListModel { ListElement { name: "A" icon: "egg0my.png" } ListElement { name: "B" icon: "egg0my.png" } ListElement { name: "C" icon: "egg0my.png" } }