diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2011-07-22 17:45:59 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-07-28 11:27:26 +0200 |
commit | e57189d3bbac058a3ddea567a6e487be65cdde5a (patch) | |
tree | f3019565789a11704b6644f3c7ab912fe9343efe /src/declarative/particles/qsgfriction.cpp | |
parent | 0511dfc0b8851baf84df73780e770f1025261068 (diff) |
Add some more properties to JS particle type
Adds the current position, velocity and acceleration.
While we're at it, renaming the velocity vars from sx,sy to vx,vy
Change-Id: I87f582169c7873c45a6fd453052b25c4dc940f3e
Reviewed-on: http://codereview.qt.nokia.com/2021
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Diffstat (limited to 'src/declarative/particles/qsgfriction.cpp')
-rw-r--r-- | src/declarative/particles/qsgfriction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/declarative/particles/qsgfriction.cpp b/src/declarative/particles/qsgfriction.cpp index fcd43a57d9..e6a43013e8 100644 --- a/src/declarative/particles/qsgfriction.cpp +++ b/src/declarative/particles/qsgfriction.cpp @@ -63,10 +63,10 @@ bool QSGFrictionAffector::affectParticle(QSGParticleData *d, qreal dt) { if (!m_factor) return false; - qreal curSX = d->curSX(); - qreal curSY = d->curSY(); - d->setInstantaneousSX(curSX + (curSX * m_factor * -1 * dt)); - d->setInstantaneousSY(curSY + (curSY * m_factor * -1 * dt)); + qreal curVX = d->curVX(); + qreal curVY = d->curVY(); + d->setInstantaneousVX(curVX + (curVX * m_factor * -1 * dt)); + d->setInstantaneousVY(curVY + (curVY * m_factor * -1 * dt)); return true; } QT_END_NAMESPACE |