Description

A wrapper task calls a story or scene method, allowing for a story to be loaded from JSON file or to be teleporter.

ABeamer has the following built-in wrapper tasks:

  • scene-transition - setup a scene transition.

  • add-stills - adds stills to the scene pipeline.

  • add-flyover - adds a flyover to the story.

  • add-vars - adds variables to be used by expressions.

 

API

WrapperTaskName

public export type

export type WrapperTaskName =
    /** @see #SceneTransitionTaskParams */
    | 'scene-transition'
    /** @see #AddStillsTaskParams */
    | 'add-stills'
    /** @see #AddFlyoverTaskParams */
    | 'add-flyover'
    /** @see #AddVarsTaskParams */
    | 'add-vars';

WrapperTaskParams

public export type

export type WrapperTaskParams =
    | SceneTransitionTaskParams
    | AddStillsTaskParams
    | AddFlyoverTaskParams
    | AddVarsTaskParams;
 

SceneTransitionTaskParams

public export interface

export interface SceneTransitionTaskParams extends AnyParams{ }

SceneTransitionTaskParams.handler

public property [SceneTransitionTaskParams]

handler?: TransitionHandler;

SceneTransitionTaskParams.duration

public property [SceneTransitionTaskParams]

duration?: TimeHandler;
 

AddStillsTaskParams

public export interface

export interface AddStillsTaskParams extends AnyParams{ }

AddStillsTaskParams.duration

public property [AddStillsTaskParams]

duration: TimeHandler;
 

AddFlyoverTaskParams

public export interface

export interface AddFlyoverTaskParams extends AnyParams{ }

AddFlyoverTaskParams.handler

public property [AddFlyoverTaskParams]

handler: FlyoverHandler;

AddFlyoverTaskParams.params

public property [AddFlyoverTaskParams]

params?: FlyoverParams;
 

AddVarsTaskParams

public export interface

export interface AddVarsTaskParams extends AnyParams{ }

Adds multiple variables to args.vars.
Variables can be:

  • textual, numerical and arrays.
  • object variables of the above types.

Example

tasks: [{
   handler: 'add-vars',
   params: {
     vars: {
       prop1: 'changes the args.vars.prop1',
       'obj1.prop2': 'creates an object obj1 in vars, set prop2',
       'over.about.blue': 'creates obj over.about.sets prop blue',
     },
   }
}]

AddVarsTaskParams.overwrite

public property [AddVarsTaskParams]

overwrite?: boolean;

If false, it won't overwrite the previous value.
default: true

AddVarsTaskParams.allowExpr

public property [AddVarsTaskParams]

allowExpr?: boolean;

If true and textual value starts with =, it will compute the expression.
default: false

AddVarsTaskParams.vars

public property [AddVarsTaskParams]

vars: { [varName: string]: string | ExprString | number | number[] };

Object with name: value of all the variables to add to args.vars.