Header menu logo Mibo.Raylib

Particle2D Type

A single 2D particle rendered as a textured quad with optional sprite-sheet source rect.

This is a render snapshot. Simulation state (velocity, lifetime, spin, color rules) lives in the user's model and is written into this struct at the start of the view function.

Record fields

Record Field Description

Color

Full Usage: Color

Field type: Color

Tint color. Alpha controls transparency.

Field type: Color

Position

Full Usage: Position

Field type: Vector2

Center position in world/screen space.

Field type: Vector2

Rotation

Full Usage: Rotation

Field type: float32

Rotation in degrees around the center.

Field type: float32

Size

Full Usage: Size

Field type: Vector2

Width and height of the quad.

Field type: Vector2

SourceRect

Full Usage: SourceRect

Field type: Rectangle

Source rectangle within the texture in pixels. Use (0, 0, tw, th) for the full texture.

Field type: Rectangle

Type something to start searching.