Monocurl
Download

std.scene

scene.mcl

Reference for the symbols exported by scene.mcl.

Index

Constructors

Defaults

Constructors

constructor

Build a perspective camera from a position, target, up vector, and clipping range.

The value is a tagged map consumed specially by the renderer. Animate the camera leader with CameraLerp rather than plain Lerp for smoother up-vector motion.

let Camera = |position = 4b, target = [0,0,0], up = 1u, near = 0.1, far = 100| ...
uppreferred screen-up direction; it should not be parallel to the view direction
nearnear clipping plane distance
farfar clipping plane distance
camera = Camera(position: [2, 1, 5], target: ORIGIN)
play CameraLerp(&camera, 1)

Defaults

constant

Initial camera used by new scenes.

Equivalent to a camera at [0, 0, 4], looking at the origin with UP as the up vector.

let DEFAULT_CAMERA = __monocurl__native__ initial_camera()
camera = DEFAULT_CAMERA
constant

Initial background color used by new scenes.

A solid white background value. Assign background = BLACK or another RGBA color/map to change it.

let DEFAULT_BACKGROUND = __monocurl__native__ initial_background()
background = DEFAULT_BACKGROUND