Atlas Engine
API Referenceatlasatlas/units

atlas/units

Value types for coordinates, dimensions, rotations, and colors.

declare module "atlas/units"

Value types for coordinates, dimensions, rotations, and colors.

Classes

  • Position3d — Three-component value. Arithmetic returns new values; up is +Y and forward is +Z.
  • BoundingBox — Axis-aligned bounds with inclusive point containment and intersection checks.
  • Quaternion — Four-component orientation with conversion to and from Euler rotations.
  • Color — RGBA color, conventionally using 0–1 channels. Arithmetic returns new colors and includes alpha without clamping.
  • Position2d — Two-component value. Arithmetic returns new values; up is +Y.
  • Radians — Angle stored in radians, with degree conversion and arithmetic returning new values.
  • Size2d — Width and height value with component-wise arithmetic returning new values.

Types

  • Scale3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Size3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Point3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Normal3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Magnitude3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Impulse3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Force3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Vector3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Velocity3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Rotation3d — Semantic type alias for Position3d; it does not introduce a distinct value type.
  • Scale2d — Semantic type alias for Position2d; it does not introduce a distinct value type.
  • Point2d — Semantic type alias for Position2d; it does not introduce a distinct value type.
  • Movement2d — Semantic type alias for Position2d; it does not introduce a distinct value type.
  • Magnitude2d — Semantic type alias for Position2d; it does not introduce a distinct value type.

Enums

  • Direction3d — Named directions along the three coordinate axes.

On this page