package ephemeral

  1. Overview
  2. Docs

Module Renderer.RenderSource

Rendering vector tables

Sourceval shape_of_name : string -> Settings.shape

Guess a body's shape from its name

Sourceval color_of_name : string -> Graphics.color

Guess a body's color from its name

Sourceval size_of_shape : Settings.shape -> int

Guess a body's size from its shape

Sourceval size_of_name : string -> int

Guess a body's size from its name

Sourceval drag_origin : (int * int) option ref

Mouse drag state: Some (last_x, last_y) when button held

Sourceval rotate_point : float -> float -> float -> float * float

Apply the current view rotation to a 3D point, returning projected (x, y)

Sourceval draw_axes : int -> unit
Sourceval init : Ephemeral.Vector_table.vtable list -> int -> string -> unit

Initialize the rendering environment

Sourceval draw_shape : Settings.shape -> bool -> (int * int) -> int -> Graphics.color -> unit

Draw a body's shape on the screen

Sourceval screen_coords_of_body : int -> Settings.body -> int * int

Compute a body's screen coordinates from its real coordinates

Sourceval format_time : float -> string

Convert an epoch timestamp to text

Sourceval render_frame : Graphics.status -> int -> unit

Render an individual frame

Sourceval render : unit -> unit

Main render loop

Sourceval record : string -> unit

Render to a video file