FORGE. Tween

new Tween(viewer, object)

Utility class to interpolate objects values.
Parameters:
Name Type Description
viewer FORGE.Viewer The FORGE.Viewer reference.
object Object The object to interpolate its property.
Source:

Extends

Members

(readonly) alive :boolean

Get the alive flag value of the object.
Type:
  • boolean
Inherited From:
Source:

(readonly) className :string

Get the class name of the object.
Type:
  • string
Inherited From:
Source:

(readonly) complete :boolean

Get the complete flag value.
Type:
  • boolean
Source:

data :*

Get and set any custom data you want to associate to this object.
Type:
  • *
Inherited From:
Source:

debug :boolean

Get and set the debug flag.
Type:
  • boolean
Inherited From:
Source:

easing :function

Get and set the easing method.
Type:
  • function
Source:

(readonly) onComplete :FORGE.EventDispatcher

Get the onComplete FORGE.EventDispatcher
Type:
Source:

(readonly) onDestroy :FORGE.EventDispatcher

Get the onDestroy FORGE.EventDispatcher, this event is emitted at the end of the destroy sequence.
Type:
Inherited From:
Source:

(readonly) onProgress :FORGE.EventDispatcher

Get the onProgress FORGE.EventDispatcher
Type:
Source:

(readonly) onStart :FORGE.EventDispatcher

Get the onStart FORGE.EventDispatcher
Type:
Source:

(readonly) tags :Array

Get the tags associated to this object.
Type:
  • Array
Inherited From:
Source:

(readonly) uid :string

Get the uid of the object.
Type:
  • string
Inherited From:
Source:

warning :boolean

Get and set the warning flag.
Type:
  • boolean
Inherited From:
Source:

Methods

destroy()

Destroy method.
Overrides:
Source:

log(value)

Basic log method, log a string in the console if debug is enabled.
Parameters:
Name Type Description
value * The value you want to log in the console.
Inherited From:
Source:

start() → {FORGE.Tween}

Stop the tween.
Source:
Returns:
Returns the {FORGE.Tween} object.
Type
FORGE.Tween

start() → {FORGE.Tween}

Start the tween.
Source:
Returns:
Returns the {FORGE.Tween} object.
Type
FORGE.Tween

to(values, duration, easingopt) → {FORGE.Tween}

Set the tween properties.
Parameters:
Name Type Attributes Description
values Array | Object Array of values.
duration number Duration of the tween.
easing function <optional>
Easing value.
Source:
Returns:
Returns the {FORGE.Tween} object.
Type
FORGE.Tween

update()

Update loop.
Source:

warn(valuenullable)

Basic warn method, log a warn string in the console if warning is enabled.
Parameters:
Name Type Attributes Description
value string | Object <nullable>
The value you want to warn in the console.
Inherited From:
Source:

FORGE. Tween

Members
Methods