aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/particles
Commit message (Collapse)AuthorAgeFilesLines
* Start of examples refactorAlan Alpert2012-02-24142-7195/+0
| | | | | | | | | | | | This is the general reorg of the examples directory structure, plus additional guidelines. calculator, animations and accessibility have been updated to the new standards and tested, as an example. Task-number: QTBUG-24133 Change-Id: I76c3b86751d3195ba2a5474ff23afb875765e9a4 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Remove missing image referenceAlan Alpert2012-02-141-1/+0
| | | | | | | Not really needed for this example anyways Change-Id: I98fd546441f3fd5e6caa9212cc171dab3000a139 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-3055-55/+55
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update Sprite using examples to frameDurationAlan Alpert2012-01-279-28/+27
| | | | | | | | While it's good to test the interim compatibility code, examples are not supposed to print any warnings. Change-Id: Ie6560213fd89b0ca4162c5b48dbaf86dee63cb48 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Implement randomStart for spritesAlan Alpert2012-01-271-4/+2
| | | | | | | | Most useful in the particle system, so that sprites aren't temporally aligned at the start (ruining the random look). Change-Id: I1cbf6c2187e412fcb8b31cab0d87bcde275c9281 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Encode user input before insertion into URLsMatthew Vogt2012-01-231-1/+3
| | | | | | | | | Encode user input strings used to formulate URLs, to ensure they do not cause the structure of the URL to be subverted. Task-number: QTBUG-19925 Change-Id: I6173f4df67a4bc1676ac32be6072763fc16f9720 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-2355-55/+55
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-0555-55/+55
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Examples: Remove commented out 'plugins' list from .qmlproject filesKai Koehne2012-01-041-5/+0
| | | | | Change-Id: I24bacdd52f2f191dde8e0a2fa9718b38ab329597 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Examples: Hard-code the 'main' file in .qmlprojectKai Koehne2012-01-031-1/+7
| | | | | | | | | | | Set the 'mainFile:' property in .qmlproject files where it makes sense (i.e. there's one natural candidate). This makes sure Qt Creator doesn't fall back to 'current file in editor' as main file, which is unexpected to a lot of people. (This requires Qt Creator version 2.2 and newer). Change-Id: Ia5d20b0d982038520d7892bca155267c5f13644b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Use qt_Opacity in shadersAlan Alpert2011-12-061-4/+6
| | | | | Change-Id: Ie9da3e980ece4bcb71c0886d58bc46335f5289a6 Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
* Fix image pathAlan Alpert2011-12-061-1/+1
| | | | | | | Plasma Patrol wasn't finding a text mask. Change-Id: I10934d3cecd076df885ba68833d7654f4b3978d0 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Move XmlListModel to seperate pluginCharles Yin2011-12-011-0/+1
| | | | | | | | | | | | | XmlListModel is the only feature inside QtDeclarative which depends on the QtXmlPatterns module, move this item to a separate plugin can reduce the unnecessary dependency in most use cases. To use the new XmlListModel, an additional "import QtQuick.xmllistmodel 2.0" is needed. Task-number:QTBUG-22158 Change-Id: I9e19eb6cbba46cd40fb7ffcdbd741f346779a54d Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
* Correct image pathAlan Alpert2011-11-161-1/+1
| | | | | Change-Id: I9bf07a90d6e9c64a9f8470da0744766a391a06cd Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fix GravityAlan Alpert2011-11-031-1/+1
| | | | | | | | Now simulates acceleration instead of setting it, and properties are renamed to be consistent with AngleDirection Change-Id: I648aa9122c49b46aa7b7d7796bc25d5bd56bfffe Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add non-floats to particle typeAlan Alpert2011-11-011-1/+1
| | | | | | | | booleans exposed for the 1.0 or 0.0 floats, and color exposed as 0.0-1.0 even though it's 0-255 internally. Change-Id: Idc7ab2527fef150fddb077fc73ac1c7cf122cfdd Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* ImageParticle Sprite ImprovementsAlan Alpert2011-10-311-1/+2
| | | | | | | | Sprite updates are now from signals instead of polled, and update ParticleData as well as vertices. Change-Id: Ib91604a70f4b1fe849bd27c3212ccc1d1482c075 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fold Move into AffectorAlan Alpert2011-10-242-12/+9
| | | | | | | | | | | | | | | | | | Since 'Move' was just a generic physics property affector, it makes sense to fold it into the generic affector as an easier way of implementing the common case of custom affector (and much faster, since it doesn't hit JS). For completeness in the Move behavior, 'once' now applies the effect of affectors over a second in that one time, so as to avoid exposing the simulation tick. This allows once to have actual meaning for continous affectors. Gravity is also going to be kept around as a convenience (although it will change slightly), so just removing its deprecation warning. Change-Id: Ieb52f8990445fe95f94070175a0f9beb6686324b Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Affectors now simulate with a minimum granularityAlan Alpert2011-10-241-23/+25
| | | | | | | | | | Since all time is sourced from the ParticleSystem, the easiest way is to alter the common time point while doing the multiple simulation runs. Also removes the experimental TargetAffector. Change-Id: Ieb52f8990445fe95f94070175a0f9beb6686324a Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Replace Smiles with StarfishAlan Alpert2011-10-2136-150/+61
| | | | | | | | And a bear. Change-Id: I9809bca1664a7fe1aa6734edc986440b6ca2a63c Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Allow sizing of TrailEmitter emit area based on particle sizeAlan Alpert2011-10-171-5/+7
| | | | | Change-Id: I7ce2ba29459b9a66e62933f9bfb9e066baedaaef Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add Move affectorAlan Alpert2011-10-142-3/+147
| | | | | | | | | Slated to replace the 'Gravity' affector which only did one specialized gravity usecase anyways. This one is more generic. Change-Id: I3cbb975bad24e8f6fca7e07b671aa8ba5a3a916c Reviewed-on: http://codereview.qt-project.org/6657 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Split GroupGoal out of SpriteGoalAlan Alpert2011-10-051-6/+3
| | | | | | | | | | Leaving SpriteGoal alone for a few weeks with a deprecation message, but a functioning GroupGoal has been added. Change-Id: I395046c00526e7caa38bdbc499a8191308c476fa Reviewed-on: http://codereview.qt-project.org/5950 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* pulse calls should use ms instead of sKent Hansen2011-09-293-3/+3
| | | | | | | | | | This updates the examples to reflect the API change that was done in commit f0dc82305eb9c9297d73cba67634e9e4bc4f3b84 Change-Id: Id08896cbe3a47adc0b02797faddf50281a24c625 Reviewed-on: http://codereview.qt-project.org/5702 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Make delegates visibleAlan Alpert2011-09-231-1/+0
| | | | | | | Change-Id: Ia932396419e41692431a9ce5e964331700810677 Reviewed-on: http://codereview.qt-project.org/5424 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change burst to use ms instead of sAlan Alpert2011-09-221-0/+84
| | | | | | | | | Also renames that variable, and adds a burst example. Change-Id: I53787612f287e71d9afb5618bd445c8aa72fd39e Reviewed-on: http://codereview.qt-project.org/5349 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Recognize deformable performance level properlyAlan Alpert2011-09-221-1/+0
| | | | | | | | | Task-number: QTBUG-21305 Change-Id: I88cfe56f0f22abc92a083b2a0a8da059ebefc652 Reviewed-on: http://codereview.qt-project.org/5344 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add whitespaceAlan Alpert2011-09-2150-669/+738
| | | | | | Change-Id: Iad55228ffa86bbf63b12a33d0f00ce734807c071 Reviewed-on: http://codereview.qt-project.org/5199 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* CustomEmitter/Affector now affect whole lists at onceAlan Alpert2011-09-212-30/+39
| | | | | | | | | | Better performance potential (fewer drops to JS, possibility of more optimzed JS). Change-Id: If386f06ac8714162a5bfc6b5eef7f2e67f9dae95 Reviewed-on: http://codereview.qt-project.org/5189 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Initial ImageParticle sharingAlan Alpert2011-09-202-0/+199
| | | | | | | | | | | This allows particles rendered by ImageParticle to share some of their randomly generated state. Still to come are reset methods and animData sharing (so animations can look synced) Change-Id: Ia805e1b3735b15fba7bd14778ed7abd795b11f06 Reviewed-on: http://codereview.qt-project.org/5114 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Add Age exampleAlan Alpert2011-09-161-0/+92
| | | | | | | | | | Also added advancePosition property to Age, as it was needed for even this simple example. Change-Id: I614a719280efc1bc5140d07ab91ec0f1bc345788 Reviewed-on: http://codereview.qt-project.org/4871 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Fill out examples a little moreAlan Alpert2011-09-162-0/+205
| | | | | | | | | | Adds an example of colorized ImageParticle, and an example comparing the particle system to dynamically created Images (which don't do too badly when they're kept really simple). Change-Id: Id9e8d0575a38ddde1c73d694bd5c062d56cbed42 Reviewed-on: http://codereview.qt-project.org/5047 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Particles examples shuffleAlan Alpert2011-09-16149-901/+3133
| | | | | | | | Recast as examples, not demos. Fewer licking face usages. Change-Id: I02a03fb9af513cbc3dc2a94aa0843220f162593b Reviewed-on: http://codereview.qt-project.org/4754 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Friction and Gravity examplesAlan Alpert2011-09-162-0/+208
| | | | | | | Change-Id: Ie816f1209711aae3b9cd1465f874919370c26028 Reviewed-on: http://codereview.qt-project.org/4875 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Refactor SpriteEngine out of StochasticEngineAlan Alpert2011-09-139-132/+126
| | | | | | | | | | | | Also add ParticleGroups which use only StochasticStates Simplistic change for now, just to focus the API for the particle system. ParticleGroup elements replace the particleStates property on the system, and the term "group" is now used more consistently. Change-Id: I6456f9c521b8166ccd94ea953275557bcfbf6423 Reviewed-on: http://codereview.qt-project.org/4699 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Implement Turbulence properlyAlan Alpert2011-09-131-9/+13
| | | | | | | | | | Or at least closer to. Now uses curl noise off of a source noise image, documented as usable, and not an immense performance drain (just a normal one). Change-Id: Iac11c98cd9589cbe6a41b2b30893ab40d541d18f Reviewed-on: http://codereview.qt-project.org/4510 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Fix missing and outdated license headers.Jason McDonald2011-09-094-0/+160
| | | | | | Change-Id: I940ced2e84a86daabc5158d348b05b7532cb1c22 Reviewed-on: http://codereview.qt-project.org/4314 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update images in falling leaves particle demo.Michael Brasser2011-09-094-0/+0
| | | | | | | | | Original images were causing warnings with libpng. Change-Id: I697f20ee3968b0e27f12dc55eb20ea46f809a46e Reviewed-on: http://codereview.qt-project.org/4496 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Missed an example in previous name changesAlan Alpert2011-09-091-1/+1
| | | | | | | | | | One non-essential varaible still had the old name, leading to a non-fatal warning. It is now rectified. Change-Id: I4ebcf92b3521aeff92e4da89f41b8c81c2f6ab96 Reviewed-on: http://codereview.qt-project.org/4494 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
* Particles module refactoring en masseAlan Alpert2011-09-0847-1593/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All the little changes in one commit. StochasticDirection -> Direction AngledDirection -> AngleDirection TargetedDirection -> TargetDirection QSGCustomParticle is now Affector's implementation (C++ only refactor) FollowEmitter -> TrailEmitter Kill -> Age and gained lifeLeft property ModelParticle is removed, use ItemParticle instead. Added RectangleShape to replace Shape for the case of Rectangles Abstract Types are no longer createable, despite sensible defaults. GLSL variables in CustomParticle now begin with qt_ JS variables are now such that x,vx,ax are current (old ones are now initialX, initialVX, initialAX). Same for y. A few more were extended. Emitter::emitCap -> Emitter::maximumEmitted. Set to -1 for noCap: false Emitter::noCap is gone. Emitter::emitting -> Emitter::enabled Affector::active -> Affector::enabled Affector::collisionParticles -> Affector::whenCollidingWith Affector::signal is gone. PointAttractor -> Attractor Attractor/Wander::physics -> ::affectedParameter ParticleSystem::fastForward is gone ParticleSystem::startTime is gone (use Emitter::startTime) ParticleSystem::clear -> ParticleSystem::empty And various Doc fixes. Change-Id: Ia3b02b987f692e6f1bd14c42e575381bdfb7bbb5 Reviewed-on: http://codereview.qt-project.org/4231 Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add clear property to QSGParticleSystemAlan Alpert2011-09-081-1/+5
| | | | | | | | | Makes it possible to pause the system when all particles are expired. Change-Id: Iebeb987c2e2af261bdffa4584d75f3b108dcf050 Reviewed-on: http://codereview.qt-project.org/4046 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Animation-like API for ParticleSystemAlan Alpert2011-09-071-1/+7
| | | | | | | | Includes skipping rendering when paused. Change-Id: I353ac415fb877917d46ba1832ad9cb5a84640b57 Reviewed-on: http://codereview.qt.nokia.com/4041 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Update more examples to QtQuick 2.0Damian Jansen2011-09-022-2/+2
| | | | | | | | | | | Minehunt and abstractitemmodel examples use QSGview Snake now using Particles 2.0 Minor examples and twitter have updated imports Removed duplicate delegate example Change-Id: I04f8f8aeb8ef34ab2a8678ccc1d6d594b9db166e Reviewed-on: http://codereview.qt.nokia.com/3630 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Rename PointAttractor x,y to pointX,pointYAlan Alpert2011-08-313-16/+16
| | | | | | | | | Avoid hiding the Item properties, which still have an effect. Change-Id: I2449c376fe0f2c769792e4bb7b23899672cce5e1 Reviewed-on: http://codereview.qt.nokia.com/3837 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Custom Particle now supplies default codeAlan Alpert2011-08-314-85/+7
| | | | | | | | | | | Attributes and a sample function are now prepended to the vertex shader, allowing many to become simple again. Change-Id: Ie1fbc864bd0d58647cb67994b96c2cb88db92f10 Reviewed-on: http://codereview.qt.nokia.com/3839 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Glenn Watson <glenn.watson@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Add more proportionality modes to PointAttractorAlan Alpert2011-08-302-4/+4
| | | | | | | | | | | Inverse proportionality is now properly named, direct proportionality is added, and constant as well (in case they all just draw towards a point). Change-Id: I6187c0df908fdf20e2bb0b0a1007ebcc38dd3ac2 Reviewed-on: http://codereview.qt.nokia.com/3868 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Absorb CustomEmitter/AffectorAlan Alpert2011-08-242-3/+3
| | | | | | | | | | The signal is now on the Emitter/Affector base type, but only emitted if connected to (to save creating the v8 object) Change-Id: Ib5522e0f760caa17a6ad731b2dfbce9994a7664e Reviewed-on: http://codereview.qt.nokia.com/3393 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Initial entryEffect support for ImageParticleAlan Alpert2011-08-241-0/+1
| | | | | | | | | | Implementation for tabled and above is different, coming in a later commit. Change-Id: I7ad16a173521bdcef4ddb68f594be7c942ddb505 Reviewed-on: http://codereview.qt.nokia.com/3280 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Tweak particle examplesAlan Alpert2011-08-153-4/+4
| | | | | | | | | Some of them weren't scaling well when in the examples launcher. Change-Id: Ib6049fb5b3c9a99775008ae9072750c2424ad6ed Reviewed-on: http://codereview.qt.nokia.com/2857 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
* Get Custom particle example rotating againAlan Alpert2011-08-151-4/+4
| | | | | | | Change-Id: I9045f9b76f7c681cf828aa60659abb4c6b521e11 Reviewed-on: http://codereview.qt.nokia.com/2856 Reviewed-by: Alan Alpert <alan.alpert@nokia.com> Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>