new Animation()
Manages simple animations in the model.
Members
-
:Array
animationsActive <static>
-
A list of currently active animations.
Type
- Array
-
:Array
animationsComplete <static>
-
A list of completed animations that will soon be removed.
Type
- Array
-
:boolean
isAnimating <static>
-
Whether or not one or more animations are currently in progress.
Type
- boolean
Methods
-
animate() <static>
-
The callback method that handles active executing animations.
-
animateApertureOpenFraction( [element] [, aperture] [, open] [, parameter]) <static>
-
Animates aperture(s) between open and closed.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element the aperture belongs to.
apertureBIM.Aperture <optional>
The aperture to animate, defaults to current selection set.
opennumber <optional>
The target open fraction value to animate to, will be determined if not given.
parameterPD.Parameter <optional>
The parameter to keep updated, will be searched for if not given.
Returns:
Returns true if fraction is different and animation started.
- Type
- boolean
-
animateCursorOpacity(cursor, opacity) <static>
-
Fades the 3D model cursor in or out to the given opacity.
Parameters:
Name Type Description cursorPD.Cursor The cursor to fade.
opacitynumber The target opacity value to fade to.
Returns:
Returns true if opacity is different and animation started.
- Type
- boolean
-
animateDateTime(dateTime) <static>
-
Animates from the global date/time to the new date/time.
Parameters:
Name Type Description dateTimePD.DateTime The new date/time to animate to.
Returns:
Returns true if date/time is different and animation started.
- Type
- boolean
-
animateDisplaySettings( [surface_opacity] [, outline_opacity] [, outline_darkness] [, sunlight] [, skylight]) <static>
-
Scales the Z-axis of the given level by the given fraction.
Parameters:
Name Type Argument Description surface_opacitynumber <optional>
The opacity of 3D surfaces within the model (0 to 1).
outline_opacitynumber <optional>
The opacity of 3D outlines within the model (0 to 1).
outline_darknessnumber <optional>
The lightness/darkness of 3D outlines within the model (0 to 1).
sunlightnumber <optional>
The lightness/darkness of direct sunshine within the model (0 to 1).
skylightnumber <optional>
The lightness/darkness of diffuse sky light within the model (0 to 1).
Returns:
Returns true if display settings are changed and animation started.
- Type
- boolean
-
animateDynamicOpacity(container, opacity [, duration]) <static>
-
Fades the given renderable container in or out to the given opacity.
Parameters:
Name Type Argument Description containerBIM.Renderable The level or view to start fading.
opacitynumber The target opacity value to fade to.
durationnumber <optional>
The duration of the animation, defaults to global transition speed.
Returns:
Returns true if opacity is different and animation started.
- Type
- boolean
-
animateElementOpenFraction( [element] [, open] [, parameter]) <static>
-
Animates element(s) between open and closed.
Parameters:
Name Type Argument Description elementBIM.Element <optional>
The element to animate, defaults to current selection set.
opennumber <optional>
The target open fraction value to animate to, will be determined if not given.
parameterPD.Parameter <optional>
The parameter to keep updated, will be searched for if not given.
Returns:
Returns true if fraction is different and animation started.
- Type
- boolean
-
animateLevelHighlight(level, mesh [, duration]) <static>
-
Fades the given renderable container in or out to the given opacity.
Parameters:
Name Type Argument Description levelBIM.Level The level to temporarily highlight.
meshPD.PolyMesh The selection mesh to highlight it with.
durationnumber <optional>
The duration of the animation, defaults to global transition speed.
Returns:
Returns true if animation started.
- Type
- boolean
-
animateLevelVerticalScale(level, scale) <static>
-
Scales the Z-axis of the given level by the given fraction.
Parameters:
Name Type Description levelBIM.Level The level to start fading.
scalenumber The Z-axis scale to animate to.
Returns:
Returns true if opacity is different and animation started.
- Type
- boolean
-
animateObjectPosZ(obj, z [, options]) <static>
-
Animates the Z-axis position of an object.
Parameters:
Name Type Argument Description objTHREE.Object3D The object to animate.
znumber The Z-axis scale to animate to.
optionsobject <optional>
An optional configuration object.
Properties of
options:Name Type Argument Description durationnumber <optional>
An optional duration for the animation, in milliseconds, defaults to the default transition speed.
completefunction <optional>
An optional callback function when complete.
Returns:
Returns true if the z pos is different and animation started.
- Type
- boolean
-
animatePolyMeshOpacity(mesh, to) <static>
-
Fades a geometry mesh in or out to the given opacity.
Parameters:
Name Type Description meshPD.PolyMesh The mesh to fade.
tonumber The target opacity value to fade to.
Returns:
Returns true if opacity is different and animation started.
- Type
- boolean
-
animateValue(from, to, callback) <static>
-
Animates a value and invokes the given callback function in steps.
Parameters:
Name Type Description fromnumber The existing value.
tonumber The value to animate to.
callbackfunction The callback function to invoke on each step.
Returns:
Returns true if the values are different and animation started.
- Type
- boolean
-
cancel() <static>
-
Call this method to cancel all animations that are currently in progress.
After this method has been called, all currently active animations will jump to their end frame and be completed.
-
startAnimation(callback, payload [, options]) <static>
-
Adds an animation to the active animations list.
This method returns an object with basic metadata about the animation. You do not need to store this object, unless you may want to terminate the animation before it naturally completes. In this case, you can pass this object to the
PD.Animation.stopAnimationmethod.Parameters:
Name Type Argument Description callbackfunction A function to invoke in the form
callback(payload, fraction).payloadobject An object to use as the first argument to the callback function.
optionsobject <optional>
An optional configuration object.
Properties of
options:Name Type Argument Description durationnumber <optional>
An optional duration for the animation, in milliseconds, defaults to the default transition speed.
noredrawboolean <optional>
An optional flag to indicate that the animation does not affect the model, defaults to false.
completefunction <optional>
An optional callback function when complete, defaults to null.
Returns:
Returns a new animation metadata object.
- Type
- object
-
stopAnimation(anim) <static>
-
Stop and remove the given animation from the active animations list.
This will stop the given animation in its current state and invoke its
completecallback function if it has one.Parameters:
Name Type Description animobject The animation to remove, as returned by
PD.Animation.startAnimation.