Difference between revisions of "Particles"

From GiderosMobile
(case harmonisation)
Line 11: Line 11:
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|
 
=== Methods ===
 
=== Methods ===
[[Special:MyLanguage/Particles.new|Particles.new]] ''Create new particles group''<br/><!-- GIDEROSMTD:Particles.new() Create new particles group -->
+
[[Particles.new]] ''creates new particles group''<br/><!--GIDEROSMTD:Particles.new() creates a new particles group-->
[[Special:MyLanguage/Particles:addParticles|Particles:addParticles]] ''Add particles''<br/><!-- GIDEROSMTD:Particles:addParticles(particles) Add particles -->
+
[[Particles:addParticles]] ''adds particles''<br/><!--GIDEROSMTD:Particles:addParticles(particles) adds particles-->
[[Special:MyLanguage/Particles:clearTexture|Particles:clearTexture]] ''Clear texture for all particles''<br/><!-- GIDEROSMTD:Particles:clearTexture() Clear texture for all particles -->
+
[[Particles:clearTexture]] ''clears texture for all particles''<br/><!--GIDEROSMTD:Particles:clearTexture() clears texture for all particles-->
[[Special:MyLanguage/Particles:getNearestParticle|Particles:getNearestParticle]] ''Get the index of the nearest particle to the given point'' <br/><!-- GIDEROSMTD:Particles:getNearestParticle(x,y)  Get the index of the nearest particle to the given point-->
+
[[Particles:getNearestParticle]] ''gets the index of the nearest particle to the given point''<br/><!--GIDEROSMTD:Particles:getNearestParticle(x,y)  gets the index of the nearest particle to the given point-->
[[Special:MyLanguage/Particles:getParticleAngle|Particles:getParticleAngle]] ''get particle angle''<br/><!-- GIDEROSMTD:Particles:getParticleAngle(i) get particle angle -->
+
[[Particles:getParticleAngle]] ''gets particle angle''<br/><!--GIDEROSMTD:Particles:getParticleAngle(i) gets particle angle-->
[[Special:MyLanguage/Particles:getParticleColor|Particles:getParticleColor]] ''Get color and alpha value of particle''<br/><!-- GIDEROSMTD:Particles:getParticleColor(i) Get color and alpha value of particle -->
+
[[Particles:getParticleColor]] ''gets particle color and alpha value''<br/><!--GIDEROSMTD:Particles:getParticleColor(i) gets particle color and alpha value-->
[[Special:MyLanguage/Particles:getParticleDecay|Particles:getParticleDecay]] ''Get particle decay factor'' <br/><!-- GIDEROSMTD:Particles:getParticleDecay(i) Get particle decay factor -->
+
[[Particles:getParticleDecay]] ''gets particle decay factor''<br/><!--GIDEROSMTD:Particles:getParticleDecay(i) gets particle decay factor-->
[[Special:MyLanguage/Particles:getParticlePosition|Particles:getParticlePosition]] ''get position of particle''<br/><!-- GIDEROSMTD:Particles:getParticlePosition(i) get position of particle -->
+
[[Particles:getParticlePosition]] ''gets particle position''<br/><!--GIDEROSMTD:Particles:getParticlePosition(i) gets particle position-->
[[Special:MyLanguage/Particles:getParticleSize|Particles:getParticleSize]] ''get size of particle in pixels''<br/><!-- GIDEROSMTD:Particles:getParticleSize(i) get size of particle in pixels -->
+
[[Particles:getParticleSize]] ''gets particle size in pixels''<br/><!--GIDEROSMTD:Particles:getParticleSize(i) gets particle size in pixels-->
[[Special:MyLanguage/Particles:getParticleSpeed|Particles:getParticleSpeed]] ''Get speed of particle''<br/><!-- GIDEROSMTD:Particles:getParticleSpeed(i) Get speed of particle -->
+
[[Particles:getParticleSpeed]] ''gets particle speed''<br/><!--GIDEROSMTD:Particles:getParticleSpeed(i) gets particle speed-->
[[Special:MyLanguage/Particles:getParticleTag|Particles:getParticleTag]] ''Get the tag associated to the particle'' <br/><!-- GIDEROSMTD:Particles:getParticleTag(i) Get the tag associated to the particle -->
+
[[Particles:getParticleTag]] ''gets particle associated tag''<br/><!--GIDEROSMTD:Particles:getParticleTag(i) gets particle associated tag-->
[[Special:MyLanguage/Particles:getParticleTtl|Particles:getParticleTtl]] ''get initial time to live of particle''<br/><!-- GIDEROSMTD:Particles:getParticleTtl(i) get initial time to live of particle -->
+
[[Particles:getParticleTtl]] ''gets particle initial time to live''<br/><!-- GIDEROSMTD:Particles:getParticleTtl(i) gets particle initial time to live-->
[[Special:MyLanguage/Particles:getParticles|Particles:getParticles]] ''get particles'' <br/><!-- GIDEROSMTD:Particles:getParticles(set,tag) get particles -->
+
[[Particles:getParticles]] ''gets particles''<br/><!--GIDEROSMTD:Particles:getParticles(set,tag) gets particles-->
[[Special:MyLanguage/Particles:isPaused|Particles:isPaused]] ''Tell if the Particle set is paused'' <br/><!-- GIDEROSMTD:Particles:isPaused() Tell if the Particle set is paused -->
+
[[Particles:isPaused]] ''tells if the Particle set is paused''<br/><!--GIDEROSMTD:Particles:isPaused() tells if the Particle set is paused-->
[[Special:MyLanguage/Particles:removeParticles|Particles:removeParticles]] ''Remove particles by index in table or as arguments''<br/><!-- GIDEROSMTD:Particles:removeParticles(particle indeces) Remove particles by index in table or as arguments -->
+
[[Particles:removeParticles]] ''removes particles by index in table or as arguments''<br/><!--GIDEROSMTD:Particles:removeParticles(particle indeces) removes particles by index in table or as arguments-->
[[Special:MyLanguage/Particles:scaleParticles|Particles:scaleParticles]] ''scale or resize all particles in this sprite''<br/><!-- GIDEROSMTD:Particles:scaleParticles(scale,absolute) scale or resize all particles in this sprite -->[[Special:MyLanguage/Particles:setParticleAngle|Particles:setParticleAngle]] ''set angle of particle''<br/><!-- GIDEROSMTD:Particles:setParticleAngle(i,angle) set angle of particle -->
+
[[Particles:scaleParticles]] ''scales or resizes all particles in this sprite''<br/><!--GIDEROSMTD:Particles:scaleParticles(scale,absolute) scales or resizes all particles in this sprite-->
[[Special:MyLanguage/Particles:setParticleColor|Particles:setParticleColor]] ''set color of particles''<br/><!-- GIDEROSMTD:Particles:setParticleColor(i,color,alpha) set color of particles -->
+
[[Particles:setParticleAngle]] ''sets particle angle''<br/><!--GIDEROSMTD:Particles:setParticleAngle(i,angle) sets particle angle-->
[[Special:MyLanguage/Particles:setParticleDecay|Particles:setParticleDecay]] ''set the decay factor of particles'' <br/><!-- GIDEROSMTD:Particles:setParticleDecay(i,decay,decayAlpha,decayGrowth,decayAngular) set the decay factor of particles -->
+
[[Particles:setParticleColor]] ''sets particle color''<br/><!--GIDEROSMTD:Particles:setParticleColor(i,color,alpha) sets particle color-->
[[Special:MyLanguage/Particles:setParticlePosition|Particles:setParticlePosition]] ''set position of particle''<br/><!-- GIDEROSMTD:Particles:setParticlePosition(i,x,y) set position of particle -->
+
[[Particles:setParticleDecay]] ''sets particle decay factor''<br/><!--GIDEROSMTD:Particles:setParticleDecay(i,decay,decayAlpha,decayGrowth,decayAngular) sets particle decay factor-->
[[Special:MyLanguage/Particles:setParticleSize|Particles:setParticleSize]] ''set size of particle''<br/><!-- GIDEROSMTD:Particles:setParticleSize(i,size) set size of particle -->
+
[[Particles:setParticlePosition]] ''sets particle position''<br/><!--GIDEROSMTD:Particles:setParticlePosition(i,x,y) sets particle position-->
[[Special:MyLanguage/Particles:setParticleSpeed|Particles:setParticleSpeed]] ''Set speed of particles''<br/><!-- GIDEROSMTD:Particles:setParticleSpeed(i,x,y,a,s) Set speed of particles -->
+
[[Particles:setParticleSize]] ''sets particle size''<br/><!--GIDEROSMTD:Particles:setParticleSize(i,size) sets particle size-->
[[Special:MyLanguage/Particles:setParticleTag|Particles:setParticleTag]] ''Set a tag to a particle'' <br/><!-- GIDEROSMTD:Particles:setParticleTag(i,tag) Set a tag to a particle -->
+
[[Particles:setParticleSpeed]] ''sets particle speed''<br/><!--GIDEROSMTD:Particles:setParticleSpeed(i,x,y,a,s) sets particle speed-->
[[Special:MyLanguage/Particles:setParticleTtl|Particles:setParticleTtl]] ''set time to live''<br/><!-- GIDEROSMTD:Particles:setParticleTtl(i,ttl) set time to live -->
+
[[Particles:setParticleTag]] ''sets particle tag''<br/><!--GIDEROSMTD:Particles:setParticleTag(i,tag) sets particle tag-->
[[Special:MyLanguage/Particles:setPaused|Particles:setPaused]] ''Pause or resume the Particle set'' <br/><!-- GIDEROSMTD:Particles:setPaused(paused) Pause or resume the Particle set -->
+
[[Particles:setParticleTtl]] ''sets particle time to live''<br/><!--GIDEROSMTD:Particles:setParticleTtl(i,ttl) sets particle time to live-->
[[Special:MyLanguage/Particles:setTexture|Particles:setTexture]] ''Set texture to all particles''<br/><!-- GIDEROSMTD:Particles:setTexture(texture) Set texture to all particles -->
+
[[Particles:setPaused]] ''pauses or resumes the Particle set''<br/><!--GIDEROSMTD:Particles:setPaused(paused) pauses or resumes the Particle set-->
 +
[[Particles:setTexture]] ''sets texture to all particles''<br/><!--GIDEROSMTD:Particles:setTexture(texture) sets texture to all particles-->
  
 
| style="width: 50%; vertical-align:top;"|
 
| style="width: 50%; vertical-align:top;"|

Revision as of 19:27, 31 July 2021

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2016.06
Inherits from: Sprite

Description

A particle system which allows to draw several identical dots or bitmaps, with varying colour and orientation.

Methods

Particles.new creates new particles group
Particles:addParticles adds particles
Particles:clearTexture clears texture for all particles
Particles:getNearestParticle gets the index of the nearest particle to the given point
Particles:getParticleAngle gets particle angle
Particles:getParticleColor gets particle color and alpha value
Particles:getParticleDecay gets particle decay factor
Particles:getParticlePosition gets particle position
Particles:getParticleSize gets particle size in pixels
Particles:getParticleSpeed gets particle speed
Particles:getParticleTag gets particle associated tag
Particles:getParticleTtl gets particle initial time to live
Particles:getParticles gets particles
Particles:isPaused tells if the Particle set is paused
Particles:removeParticles removes particles by index in table or as arguments
Particles:scaleParticles scales or resizes all particles in this sprite
Particles:setParticleAngle sets particle angle
Particles:setParticleColor sets particle color
Particles:setParticleDecay sets particle decay factor
Particles:setParticlePosition sets particle position
Particles:setParticleSize sets particle size
Particles:setParticleSpeed sets particle speed
Particles:setParticleTag sets particle tag
Particles:setParticleTtl sets particle time to live
Particles:setPaused pauses or resumes the Particle set
Particles:setTexture sets texture to all particles

Events

Constants