Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Animation

Handles animation of a RemoteModel.

With this class you can control state animations (animations across the states of the CAE analysis), particle trace animations and mode shape animations.

To start a state animation, specify the states to animate over with the ModelSpec.stateIdArray property and call runAnimation(true).

To start a particle trace animation, set the particleTraceAnimationStepCount property and call runParticleTraceAnimation(true). Note that you must first create a particle trace by calling RemoteModel.addParticleTraceGroup.

To start a mode shape animation, set the ModelSpec.modeShapeAnimationType and ModelSpec.modeShapeFrameCount properties and then call runAnimation(true). Note that you must first set a displacement result on the model with ModelSpec.displacementResultId, and that ModelSpec.stateIdArray must contain exactly one state id.

You can access the animation object from the remote model with the RemoteModel.animation property.

Hierarchy

  • Animation

Index

Accessors

particleTraceAnimationStepCount

particleTraceAnimationStepCount: number

The number of steps to use for the particle trace animation.

The number of steps will be used to calculate the delta time for each step in the animation based on the total time of all active traces.

targetFrameRate

targetFrameRate: number

The target animation speed in frames per second (fps).

This will be the maximum animation speed, but the actual speed may be lower for large models or slow clients.

Methods

isAnyAnimationRunning

  • isAnyAnimationRunning(): boolean
  • Returns true if either a state, mode shape or particle trace animation is running

    Returns boolean

isModelAnimationRunning

  • isModelAnimationRunning(): boolean
  • Returns true if either a state or mode shape animation is running

    Returns boolean

runAnimation

  • runAnimation(run: boolean): void

runParticleTraceAnimation

  • runParticleTraceAnimation(run: boolean): void
  • Starts a particle trace animation.

    The number of steps to use for the animation can be set with particleTraceAnimationStepCount.

    Parameters

    • run: boolean

    Returns void

setAnimationFrameChangedCallback

  • Sets a handler function that will be called whenever a progress indication packet is received from the visualization server.

    Parameters

    Returns void

setFirstFrame

  • setFirstFrame(): void
  • Sets the first step of the animation (if any) as the current step. This will stop the animation.

    Returns void

setLastFrame

  • setLastFrame(): void
  • Sets the last step of the animation (if any) as the current step. This will stop the animation.

    Returns void

setNextFrame

  • setNextFrame(): void
  • Sets the next step of the animation (if any) as the current step, wrapping around to the first step if on the last step. This will stop the animation.

    Returns void

setPreviousFrame

  • setPreviousFrame(): void
  • Sets the previous step of the animation (if any) as the current step, wrapping around to the last step if on the first step. This will stop the animation.

    Returns void

Generated using TypeDoc