Api Sandbox ParticleSpriteRenderer
class

ParticleSpriteRenderer

public sealed class ParticleSpriteRenderer : ParticleRenderer

Renders particles as 2D sprites - can be static or animated

Constructors

ParticleSpriteRenderer()

Properties

Name Type Description
Sprite Sprite The sprite resource to render. This can be completely static or contain animation(s).
StartingAnimationName String The animation that this sprite should start playing when the scene starts.
PlaybackSpeed Single
Scale virtual Single The scale of the sprite when rendered.
Additive virtual Boolean Whether or not the sprite should be rendered additively.
Shadows virtual Boolean Whether or not the sprite should cast shadows in the scene.
Lighting virtual Boolean Whether or not the sprite should be lit by the scene lighting.
Opaque virtual Boolean Indicates whether the sprite is opaque, optimizing rendering by skipping sorting.
TextureFilter virtual FilterMode The texture filtering mode used when rendering the sprite. For pixelated sprites use Point.
Alignment virtual BillboardAlignment Alignment mode for the sprite's billboard behavior.
SortMode ParticleSortMode Sorting mode used for rendering particles.
DepthFeather virtual Single Amount of feathering applied to the depth, softening its intersection with geometry.
FogStrength virtual Single The strength of the fog effect applied to the sprite. This determines how much the sprite blends with any fog in the scene.
FaceVelocity virtual Boolean Aligns the sprite to face its velocity direction.
RotationOffset virtual Single Offset applied to the rotation when facing velocity.
MotionBlur virtual Boolean Enables motion blur effects for the sprite.
LeadingTrail virtual Boolean Determines whether the motion blur effect includes a leading trail.
BlurAmount virtual Single Amount of blur applied to the sprite during motion blur.
BlurSpacing virtual Single Spacing between blur samples in the motion blur effect.
BlurOpacity virtual Single Opacity of the blur effect applied to the sprite.
CurrentAnimation Animation The animation that is currently being played. Returns null if no sprite is set or the sprite has no animations.
IsAnimated Boolean Whether or not the sprite is animated. This is true if the sprite has more than one animation or if the current animation has more than one frame.
IsSorted virtual Boolean Interface property to determine if particles should be sorted
Pivot virtual Vector2 The pivot point of the sprite, used for rotation and scaling. This is in normalized coordinates (0 to 1).
Texture Texture The texture being displayed from the sprite given the current frame/animation.
RenderTexture virtual Texture Provides texture for rendering - implementation for IBatchedParticleSpriteRenderer
ComponentVersion virtual Int32

Methods

Void SetAnimation(Int32 index)

Set the animation by index (the first animation is index 0).

Void SetAnimation(String name)

Set the animation by name.

Assembly: Sandbox.Engine Namespace: Sandbox Full Name: Sandbox.ParticleSpriteRenderer