EffectShockwave.qml Example File
multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml
import QtQuick 2.0
Effect {
id: root
parameters: ListModel {
ListElement {
name: "Amplitude"
value: 0.5
}
onDataChanged: updateParameters()
}
function updateParameters()
{
granularity = parameters.get(0).value * 20;
weight = parameters.get(0).value;
}
property real granularity: 0.5 * 20
property real weight: 0.5
property real centerX
property real centerY
property real time
SequentialAnimation {
running: true
loops: Animation.Infinite
ScriptAction {
script: {
centerX = Math.random()
centerY = Math.random()
}
}
NumberAnimation {
target: root
property: "time"
from: 0
to: 1
duration: 1000
}
}
fragmentShaderFilename: "shockwave.fsh"
}