Sets up the Story and adds the Default Scenes.
Protected_curProtected_frameProtected_frameProtected_heightProtected_isProtected_isProtected_isDefines the log level. Use LL_VERBOSE for debugging.
The server can modify this mode.
Protected_metadataProtected_queueProtected_renderProtected_renderProtected_renderProtected_renderProtected_renderProtected_renderProtected_renderProtected_renderProtected_scenesIf true, the input parameters have strict checks and throw errors if fails. If false, BeamToIX is more relax and bypasses errors. The server can modify this mode on startup.
Protected_virtualInternal map from selectors to VirtualAnimators. Each animator must have a unique selector, but future versions might support different animators have the selector.
Optional_virtualProtected_widthProtected_wkReturns the play speed that best matches the fps.
Default unit used when input time values are used in numeric forms.
Supports minutes, seconds, milliseconds and frames.
TimeUnit.f = 0;
TimeUnit.ms = 1;
TimeUnit.s = 2;
TimeUnit.m = 3;
ReadonlyfpsFrames per second.
All the time values is converted into frames using this value.
Defined during the call to createStory.
#end-user
ReadonlyhasTrue if it's running a supporting server program for frame storage.
#end-user
OptionalonEvent triggered after a frame is rendered.
OptionalonEvent triggered before a frame is rendered.
OptionalonMaps Ids into Virtual Elements Used only in non-DOM elements such as WebGL elements.
virtual element Id without '%'
Optionalargs: BeamToIXArgsOptionalonEvent triggered during the rendering process after a frame is rendered and is ready to move to following frame.
OptionalonEvent triggered when render finished the rendering process. EXPERIMENTAL The behavior can changed or be deprecated.
OptionalonEvent triggered by server, stating that it's ready to receive frames. A server is usually a headless capture program such as puppeteer. If the animation is running without server, this event is never fired.
Provides information about the running server.
ReadonlyserverThe name of the server. The server will assign this property value.
#end-user
Allows flyovers to find elements on the document body or in the virtual world.
If true, it terminates the server when the render call finishes or if it's aborted. For a serverless execution, it has no effect.
Returns BeamToIXArgs. This should be used only in specific cases such the access to --var. In most cases, this property is passed as an argument to plugins and callbacks.
#end-user
Current active and visible scene.
Valid both for adding animations and rendering.
Use gotoScene to change this value.
#end-user
Total number of frames from all the scenes.
#end-user
Numerical value of the frame height in pixels.
#end-user
True if the rendering has started.
Use finishRender to abort the rendering process.
#end-user
True if it's teleporting.
#end-user
Numerical value of the frame width in pixels.
#end-user
Render direction. 1 for forward, -1 for backwards.
Defined during the call to story.render.
#end-user
The number of the current frame being rendered.
Defined during the call to story.render.
This value doesn't changes during the rendering process.
#end-user
The number of the last frame to be rendered within the story.
Defined during the call to story.render.
This value doesn't changes during the rendering process.
#end-user
The number of the current frame being rendered.
Defined during the call to story.render.
This value changes during the rendering process.
#end-user
List of the scenes.
#end-user
Numerical value of the frame width in pixels.
#end-user
Protected_calcComputes the render properties from the user frame params.
Protected_getProtected_internalProtected_internalOptionalplaySpeedMs: anyOptionalframeOpts: RenderFrameOptionsProtected_renderProtected_sendProtected_setupAdds a list scene/serial/parallel animations. In essence, it represents the complete storyline. Use this method to load the whole storyline from an external file. Otherwise is preferable to add animation scene by scene.
Adds a list of serial/parallel animations per scene Id. It requires that each scene has defined the id (DOM attribute). It bypasses invalid scene ids.
Adds a to the story. Use story.removeVirtualAnimator to take it from the story.
Returns the animations, html, CSS as an object.
Use only if isTeleporting = true.
Send this information via Ajax to the remote server.
Due CORS, it requires a live server to access CSS information.
Set frameOpts, if you need segment rendering.
Set isPretty = true, to test only, since this mode will return a formatted output but bigger in size.
OptionalframeOpts: RenderFrameOptionsOptionalisPretty: booleanSame as getStoryToTeleport() but it returns as StoryConfig object.
Use this function instead of getStoryToTeleport, if you need to
add extra fields.
Modifying the content of config.beamtoix is forbidden for 3rd-party
remote server rendering.
OptionalframeOpts: RenderFrameOptionsFormats a log using a format supported by exact test framework. This is mostly used internally for testing, but it's publicly available.
list of [name, value]
OptionallogType: LogTypeRemoves a to the story. Use story.addVirtualAnimator to add it to the story.
Starts the Rendering process.
It can render the whole storyline or just a segment.
Forward and backward rending is supported.
If it has a server, such as headless webpage capture program, it will
render a frame, and send a message to the server to store it on the disk.
If it's running on the browser, it will render and wait playSpeedMs time.
OptionalplaySpeedMs: anyPlay speed in milliseconds, ignored on server mode. BeamToIX doesn't guarantee the exact timing. If it's undefined, it will play at full speed.
OptionalframeOpts: RenderFrameOptionsUse this method only if you have created the story with toTeleport = true
and toStartTeleporting = false, because you need to inject
html/css code into the page before the teleporting process starts.
Otherwise, you won't need to call this method since it's called automatically
if teleporting a story.
Stores the complete story on a file in the disk. Use this method only for testing. This method requires that:
isTeleporting === truebeamtoix render ...Use this method instead of getStoryToTeleport.
OptionalframeOpts: RenderFrameOptionsOptionalisPretty: boolean
Implementation of _Story class.