Wikitude SDK API Reference

API Docs for: 8.7.0
Show:

EasingCurve Class

Extends ARchitectObject
Module: AR

Easing Curves describe in which way a AR.PropertyAnimation will change the animated property's value from the start- to the end-value.

The following Easing Curve types are defined (see AR.CONST.EASING_CURVE_TYPE):

ConstantString Representation
LINEARlinear
EASE_IN_QUADeaseInQuad
EASE_OUT_QUADeaseOutQuad
EASE_IN_OUT_QUADeaseInOutQuad
EASE_OUT_IN_QUADeaseOutInQuad
EASE_IN_CUBICeaseInCubic
EASE_OUT_CUBICeaseOutCubic
EASE_IN_OUT_CUBICeaseInOutCubic
EASE_OUT_IN_CUBICeaseOutInCubic
EASE_IN_QUATeaseInQuat
EASE_OUT_QUATeaseOutQuat
EASE_IN_OUT_QUATeaseInOutQuat
EASE_OUT_IN_QUATeaseOutInQuat
EASE_IN_QUINTeaseInQuint
EASE_OUT_QUINTeaseOutQuint
EASE_IN_OUT_QUINTeaseInOutQuint
EASE_OUT_IN_QUINTeaseOutInQuint
EASE_IN_ELASTICeaseInElastic
EASE_OUT_ELASTICeaseOutElastic
EASE_IN_OUT_ELASTICeaseInOutElastic
EASE_OUT_IN_ELASTICeaseOutInElastic
EASE_IN_BACKeaseInBack
EASE_OUT_BACKeaseOutBack
EASE_IN_OUT_BACKeaseInOutBack
EASE_OUT_IN_BACKeaseOutInBack
EASE_IN_SINEeaseInSine
EASE_OUT_SINEeaseOutSine
EASE_IN_OUT_SINEeaseInOutSine
EASE_OUT_IN_SINEeaseOutInSine
EASE_IN_EXPOeaseInExpo
EASE_OUT_EXPOeaseOutExpo
EASE_IN_OUT_EXPOeaseInOutExpo
EASE_OUT_IN_EXPOeaseOutInExpo
EASE_IN_CIRCeaseInCirc
EASE_OUT_CIRCeaseOutCirc
EASE_IN_OUT_CIRCeaseInOutCirc
EASE_OUT_IN_CIRCeaseOutInCirc
EASE_IN_BOUNCEeaseInBounce
EASE_OUT_BOUNCEeaseOutBounce
EASE_IN_OUT_BOUNCEeaseInOutBounce
EASE_OUT_IN_BOUNCEeaseOutInBounce
EASE_IN_CURVEeaseInCurve
EASE_OUT_CURVEeaseOutCurve
EASE_SIN_CURVEeaseSinCurve
EASE_COS_CURVEeaseCosineCurve

Certain Easing Curves can be parametrized with additional values, such as amplitude, period and overshoot.
Amplitude is valid for all easing curves with the type description ending on ELASTIC or BOUNCE (like EASE_IN_ELASTIC or EASE_IN_BOUNCE), and will be ignored for all others.
Overshoot is valid for all easing curves with the type description ending on BACK (like EASE_IN_BACK), and will be ignored for all others.
Period is valid for all easing curves with the type description ending on BOUNCE (like EASE_IN_BOUNCE), and will be ignored for all others.

Example:
var easingCurve = AR.EasingCurve(AR.CONST.EASING_CURVE_TYPE.EASE_IN_BACK, {
  overshoot : 1.70158 //results in a 10% overshoot
});

The same Easing Curve can be instanziated by writing

var easingCurve = AR.EasingCurve("easeInBack", {
  overshoot : 1.70158 //results in a 10% overshoot
});

Constructor

EasingCurve

(
  • type
  • options
)

Parameters:

  • type String
  • options Object optional

    The easing curve can be parametrized with the following values:

Item Index

Methods

Methods

destroy

()

Inherited from ARchitectObject

Destroys the object.

Properties

amplitude

Number

The amplitude of the elastic effect, the higher the amplitude, the stronger the effect.

In case the amplitude is not set for an easing curve which requires the period value, the default value depends on the easing curve type.

destroyed

Boolean

Inherited from ARchitectObject

Indicates if the object has already been destroyed.

overshoot

Number

The overshoot of the "back"-effect. The higher the value, the stronger the "back"-effect.

In case the overshoot is not set for an easing curve which requires the value, the default value depends on the easing curve type.

period

Number

The period of the elastic effect, the higher the value, the less the frequency of the elastic effect.

In case the period is not set for an easing curve which requires the value, the default value depends on the easing curve type.