wiki.sine.space | sinespace

Difference between revisions of "Scripting/SParticle"

From wiki.sine.space
Jump to: navigation, search
(Created page with "=Properties= {{ScriptFunction|SVector|position|{ get;set; }|The position of the particle.|5= <pre></pre>}} {{ScriptFunction|SVector|velocity|{ get;set; }|The velocity of t...")
 
Line 2: Line 2:
  
  
{{ScriptFunction|SVector|position|{ get;set; }|The position of the particle.|5= <pre></pre>}}
+
{{ScriptFunction|SVector|position|{ get;set; }|The position of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
position = FirstParticle.position
 +
 +
end
  
{{ScriptFunction|SVector|velocity|{ get;set; }|The velocity of the particle.|5= <pre></pre>}}
+
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
  
{{ScriptFunction|SVector|animatedVelocity|{ get; }|The animated velocity of the particle.|5= <pre></pre>}}
+
{{ScriptFunction|SVector|velocity|{ get;set; }|The velocity of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
velocity= FirstParticle.velocity
 +
 +
end
  
{{ScriptFunction|SVector|totalVelocity|{ get; }|The total velocity of the particle.|5= <pre></pre>}}
+
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
  
{{ScriptFunction|float|remainingLifetime|{ get;set; }|The remaining lifetime of the particle.|5= <pre></pre>}}
+
{{ScriptFunction|SVector|animatedVelocity|{ get; }|The animated velocity of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
animatedVelocity= FirstParticle.animatedVelocity
 +
 +
end
  
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
{{ScriptFunction|float|startLifetime|{ get;set; }|The starting lifetime of the particle.|5= <pre></pre>}}
 
  
 +
{{ScriptFunction|SVector|totalVelocity|{ get; }|The total velocity of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
{{ScriptFunction|SColor|startColor|{ get;set; }|The initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.|5= <pre></pre>}}
+
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
totalVelocity= FirstParticle.totalVelocity
 +
 +
end
  
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
{{ScriptFunction|uint|randomSeed|{ get;set; }|The random seed of the particle.|5= <pre></pre>}}
 
  
 +
{{ScriptFunction|float|remainingLifetime|{ get;set; }|The remaining lifetime of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
{{ScriptFunction|SVector|axisOfRotation|{ get;set; }|Mesh particles rotate around this axis.|5= <pre></pre>}}
+
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
remainingLifetime= FirstParticle.remainingLifetime
 +
 +
end
  
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
{{ScriptFunction|float|startSize|{ get;set; }|The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.|5= <pre></pre>}}
 
  
  
{{ScriptFunction|SVector|startSize3D|{ get;set; }|The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.|5= <pre></pre>}}
+
{{ScriptFunction|float|startLifetime|{ get;set; }|The starting lifetime of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
startLifetime= FirstParticle.startLifetime
 +
 +
end
  
{{ScriptFunction|float|rotation|{ get;set; }|The rotation of the particle.|5= <pre></pre>}}
+
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
  
{{ScriptFunction|SVector|rotation3D|{ get;set; }|The 3D rotation of the particle.|5= <pre></pre>}}
+
{{ScriptFunction|SColor|startColor|{ get;set; }|The initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
startColor= FirstParticle.startColor
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|uint|randomSeed|{ get;set; }|The random seed of the particle.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
randomSeed= FirstParticle.randomSeed
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|SVector|axisOfRotation|{ get;set; }|Mesh particles rotate around this axis.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
axisOfRotation= FirstParticle.axisOfRotation
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|float|startSize|{ get;set; }|The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
startSize= FirstParticle.startSize
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|SVector|startSize3D|{ get;set; }|The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
startSize3D= FirstParticle.startSize3D
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|float|rotation|{ get;set; }|The rotation of the particle.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
rotation= FirstParticle.rotation
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|SVector|rotation3D|{ get;set; }|The 3D rotation of the particle.|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
rotation3D= FirstParticle.rotation3D
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
  
 
{{ScriptFunction|float|angularVelocity|{ get;set; }|The angular velocity of the particle.
 
{{ScriptFunction|float|angularVelocity|{ get;set; }|The angular velocity of the particle.
|5= <pre></pre>}}
+
|5= <pre>this = Space.Host.ExecutingObject
 +
 
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
angularVelocity= FirstParticle.angularVelocity
 +
 +
end
 +
 
 +
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
 +
 
 +
 
 +
{{ScriptFunction|SVector|angularVelocity3D|{ get;set; }|The 3D angular velocity of the particle.|5= <pre>this = Space.Host.ExecutingObject
  
 +
OnParticleTrigger = function(GameObject)
 +
ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 +
FirstParticle = ParticlesArray[1]
 +
angularVelocity3D= FirstParticle.angularVelocity3D
 +
 +
end
  
{{ScriptFunction|SVector|angularVelocity3D|{ get;set; }|The 3D angular velocity of the particle.|5= <pre></pre>}}
+
this.SubscribeToEvents()
 +
this.OnParticleTrigger(OnParticleTrigger)</pre>}}
  
  

Revision as of 09:36, 12 June 2021

Properties

position

SVector position { get;set; }

The position of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 position = FirstParticle.position
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



velocity

SVector velocity { get;set; }

The velocity of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 velocity= FirstParticle.velocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



animatedVelocity

SVector animatedVelocity { get; }

The animated velocity of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 animatedVelocity= FirstParticle.animatedVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



totalVelocity

SVector totalVelocity { get; }

The total velocity of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 totalVelocity= FirstParticle.totalVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



remainingLifetime

float remainingLifetime { get;set; }

The remaining lifetime of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 remainingLifetime= FirstParticle.remainingLifetime
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



startLifetime

float startLifetime { get;set; }

The starting lifetime of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startLifetime= FirstParticle.startLifetime
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



startColor

SColor startColor { get;set; }

The initial color of the particle. The current color of the particle is calculated procedurally based on this value and the active color modules.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startColor= FirstParticle.startColor
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



randomSeed

uint randomSeed { get;set; }

The random seed of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 randomSeed= FirstParticle.randomSeed
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



axisOfRotation

SVector axisOfRotation { get;set; }

Mesh particles rotate around this axis.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 axisOfRotation= FirstParticle.axisOfRotation
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



startSize

float startSize { get;set; }

The initial size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startSize= FirstParticle.startSize
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



startSize3D

SVector startSize3D { get;set; }

The initial 3D size of the particle. The current size of the particle is calculated procedurally based on this value and the active size modules.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 startSize3D= FirstParticle.startSize3D
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



rotation

float rotation { get;set; }

The rotation of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 rotation= FirstParticle.rotation
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



rotation3D

SVector rotation3D { get;set; }

The 3D rotation of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 rotation3D= FirstParticle.rotation3D
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



angularVelocity

float angularVelocity { get;set; }

The angular velocity of the particle.


this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 angularVelocity= FirstParticle.angularVelocity
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)



angularVelocity3D

SVector angularVelocity3D { get;set; }

The 3D angular velocity of the particle.

this = Space.Host.ExecutingObject

OnParticleTrigger = function(GameObject)
 ParticlesArray  = this.ParticleSystem.GetTriggerParticles(0)
 FirstParticle = ParticlesArray[1]
 angularVelocity3D= FirstParticle.angularVelocity3D
 
end

this.SubscribeToEvents()
this.OnParticleTrigger(OnParticleTrigger)