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
Parameters
Properties
estimator
readonly public estimator: TimeEstimator = ...
stage
Accessors
onFinished
public get onFinished(): SubscribableRendererResultEventHandlerRendererResult
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
frame: number
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
settings: RendererSettings
The rendering settings.
renderFrame
public renderFramesettings: RendererSettingstime: number: Promisevoid
Export an individual frame.
This method always uses the default ImageExporter
.
Parameters
settings: RendererSettings
The rendering settings.
time: number
The timestamp to export.
timeToFrame
public timeToFramesecond: number: number
Parameters
second: number