NGL@1.0.0-beta.7 Home Manual Reference Source Gallery
import TrajectoryPlayer from 'ngl/src/trajectory/trajectory-player.js'
public class | source

TrajectoryPlayer

Trajectory player for animating coordinate frames

Example:

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

Constructor Summary

Public Constructor
public

make trajectory player

Member Summary

Public Members
public
public

end

public
public
public get
public
public
public
public
public
public
Private Members
private
private
private
private
private
private

Method Summary

Public Methods
public

pause the animation

public

start the animation

public

set player parameters

public

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

public

toggle between playing and pausing the animation

Private Methods
private
private

_next()

private

Public Constructors

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

make trajectory player

Params:

NameTypeAttributeDescription
traj Trajectory

the trajectory

params TrajectoryPlayerParameters
  • optional

parameter object

Public Members

public direction source

public end source

public interpolateStep source

public interpolateType source

public get isRunning source

public mode source

public signals source

public start source

public step source

public timeout source

public traj source

Private Members

private _currentFrame source

private _currentStep source

private _currentTime source

private _direction source

private _previousTime source

private _run source

Public Methods

public pause(): undefined source

pause the animation

Return:

undefined

public play(): undefined source

start the animation

Return:

undefined

public setParameters(params: TrajectoryPlayerParameters) source

set player parameters

Params:

NameTypeAttributeDescription
params TrajectoryPlayerParameters
  • optional

parameter object

public stop(): undefined source

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

Return:

undefined

public toggle(): undefined source

toggle between playing and pausing the animation

Return:

undefined

Private Methods

private _animate() source

private _next() source

private _nextInterpolated() source