Core.Engine Class
samsara/core/Engine.js:12
Engine is a singleton object that is required to run a Samsara application.
It is the "heartbeat" of the application, managing the batching of streams
and creating RootNodes
and Contexts
to begin render trees.
It also listens and can respond to DOM events on the HTML <body>
tag
and window
object. For instance the resize
event.
Methods
start
()
static
Initiate the Engine's request animation frame loop.
step
()
private
Updates by a single frame of the application by looping through all function queues. This is repeatedly called within a requestAnimationFrame loop until the application is receiving no layout changes. At this point the requestAnimationFrame will be canceled until the next change.
stop
()
static
Stop the Engine's request animation frame loop.