IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Attractor QML Type

Attracts particles towards a specific point.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Attractor QML Type

  • Import Statement: import QtQuick.Particles

  • Inherits: Affector

  • Group: Attractor is part of qtquick-particles

Detailed Description

Like other affectors, Attractor has the standard properties x, y, width, and height that represent the affected area. The size and position of the Attractor item determine the affected particles.

The size of the attracting point is always 0x0, and its location is specified by pointX and pointY properties.

Property Documentation

 

affectedParameter : enumeration

The attribute of particles that is directly affected.

Constant

Description

Attractor.Position

Position

Attractor.Velocity

Velocity

Attractor.Acceleration

Acceleration

pointX : real

The x coordinate of the attracting point, relative to the x coordinate of the Attractor item.

pointY : real

The y coordinate of the attracting point, relative to the y coordinate of the Attractor item.

proportionalToDistance : enumeration

The relation between the strength of the attraction and the distance from the particle to the attracting point.

Constant

Description

Attractor.Constant

Constant

Attractor.Linear

Linear

Attractor.InverseLinear

Inverse linear

Attractor.Quadratic

Quadratic

Attractor.InverseQuadratic

Inverse quadratic

strength : real

The pull, in units per second, to be exerted on an item one pixel away.

Strength, together with the value of proportionalToDistance property, determine the exact amount of pull exerted on particles at a distance.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+