Struct · Ara
Camera2d
Orthographic view. Pixel mode uses integer zoom and nearest texel sampling.
public struct Camera2d : IComponent<Camera2d>Properties
TypeIndex
public static uint TypeIndex { get; }Stable engine component index.
Fields
Centre
public Vector2 Centre;View centre in world metres.
Default: [0,0].
PixelsPerMetre
public float PixelsPerMetre;Art pixels per world metre.
Range: [0.001, ∞]. Default: 16.
Zoom
public float Zoom;Screen pixels per art pixel, rounded to an integer in pixel mode.
Range: [0.001, ∞]. Default: 2.
PixelPerfect
public bool PixelPerfect;Snap view and sprite geometry to art pixels and sample nearest texels.
Default: true.
Ambient
public Vector3 Ambient;Linear scene ambient illumination.
Default: [0.2,0.2,0.25].
Background
public Vector3 Background;Linear clear color behind every layer.
Default: [0.012,0.018,0.032].
Methods
Access
public static ref Camera2d Access(Entity entity, bool write);No description yet.
Insert
public static void Insert(in Commands commands, Entity entity, in Camera2d value);No description yet.
Contains
public static bool Contains(Entity entity);No description yet.