Skip to main content

Renderer

class Renderer 

The rendering logic used by the editor to export animations.

This class uses the PlaybackManager to render animations. In contrast to a player, a renderer does not use an update loop. It plays through the animation as fast as it can, occasionally pausing to keep the UI responsive.

The actual exporting is outsourced to an Exporter.

Constructors

constructor

public new Rendererproject: Project: Renderer

Parameters

Properties

estimator

readonly public estimator: TimeEstimator = ...

stage

readonly public stage: Stage = ...

Accessors

onFinished


onFrameChanged

public get onFrameChanged(): SubscribableValueEventnumber

onStateChanged

public get onStateChanged(): SubscribableValueEventRendererState

Methods

abort

public abort(): void

Abort the ongoing render process.


frameToTime

public frameToTimeframe: number: number

Parameters


getNumberOfFrames

public getNumberOfFramessettings: RendererSettings: Promisenumber

Returns number of frames that a project will have.

Parameters


render

public rendersettings: RendererSettings: Promisevoid

Render the animation using the provided settings.

Parameters


renderFrame

public renderFramesettings: RendererSettingstime: number: Promisevoid

Export an individual frame.

This method always uses the default ImageExporter.

Parameters


timeToFrame

public timeToFramesecond: number: number

Parameters