NGL@0.10.4 Home Manual Reference Source GalleryRepository
import TrajectoryPlayer from 'ngl/src/trajectory/trajectory-player.js'
public class | source

TrajectoryPlayer

Trajectory player for animating coordinate frames

Example:

var player = new NGL.TrajectoryPlayer( trajComp.trajectory, { step: 1, timeout: 50 } );
player.play();

Constructor Summary

Public Constructor
public

make trajectory player

Method Summary

Public Methods
public

pause the animation

public

start the animation

public

stop the animation (pause and return to start-frame)

public

toggle between playing and pausing the animation

Public Constructors

public constructor(traj: Trajectory, params: TrajectoryPlayerParameters) source

make trajectory player

Params:

NameTypeAttributeDescription
traj Trajectory

the trajectory

params TrajectoryPlayerParameters
  • optional

parameter object

Public Methods

public pause(): undefined source

pause the animation

Return:

undefined

public play(): undefined source

start the animation

Return:

undefined

public stop(): undefined source

stop the animation (pause and return to start-frame)

Return:

undefined

public toggle(): undefined source

toggle between playing and pausing the animation

Return:

undefined