Namespace

Library

DuAEExpression.Library

The expression library
Use DuAEExpression.Library.get and DuAEExpression.Library.getRequirements
to easily include the methods and classes listed here to your expressions.
These methods take the name (listed here) of the function/class as arguments.

View Source DuAEF.jsxinc, line 25918

Classes

"FuzzyLogic"
"FuzzyVeracity"
"Matrix"

Methods

# static "addNoise"(val, quantity)

Adds some noise to a value.
You may use seedRandom() before using this function as it will influence the generated noise. A timeless noise can be achieved with seedRandom(index,true) for example.
Parameters:
Name Type Description
val number | Array.<number> The value to add noise to.
quantity float The quantity of noise. A percentage. 100 means the value can range from (val * 0) to (val * 2).

View Source DuAEF.jsxinc, line 28396

Examples
seedRandom(index, true) // a timeless noise
addNoise(value, 50 ); // the property value will have noise between (value * 0.5) and (value * 1.5) which won't vary through time.
seedRandom(index, false);
addNoise(value, 33 ); // the noise will change at each frame, varying between (value * .66) and (value * 1.33)

# static "addPath"(path1, path2, path2weight) → {Object}

Adds two paths together.
The paths must be objects with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path1 Object First path
path2 Object Second path
path2weight float A weight to multiply the second path values

View Source DuAEF.jsxinc, line 27936

  • module:addPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "addPoints"(p1, p2, w) → {Array.<Array.<float>>}

Adds two lists of points/vectors.
Parameters:
Name Type Description
p1 Array.<Array.<float>> The list of points
p2 Array.<Array.<float>> The other list of points
w float A weight to multiply the values of p2

View Source DuAEF.jsxinc, line 27490

The added points
Array.<Array.<float>>

# static "alea"(seed)

A fast pseudo random number generator usage: `var rng = alea(seed); rng(5, 10);` Generates a number between 5 and 10.
Parameters:
Name Type Description
seed *

View Source DuAEF.jsxinc, line 27518

# static "animate"(keyframes, loopOutopt, loopInopt, timeopt) → {number}

Animates the property using the given keyframes
Parameters:
Name Type Attributes Default Description
keyframes Array.<Object> The keyframes. An object with four properties:
value The value of the keyframe
time The time of the keyframe
interpolation (optional. Default: linear) A function taking 5 arguments to interpolate between this keyframe and the next one
params (optional.) A sixth argument passed to the interpolation function. To be used with DuAEF interpolations.
Note that the keyframes must be sorted. The function does not sort them, as it would have a bad impact on performance.
loopOut string <optional>
'none' One of 'none', 'cycle', 'pingpong'.
loopIn string <optional>
'none' One of 'none', 'cycle', 'pingpong'.
time float <optional>
time Use this to control how time flows.

View Source DuAEF.jsxinc, line 26598

the animated value.
number
Example
var keyframes = [
   {value: 0, time: 1, interpolation: linear},
   {value: 180, time: 2, interpolation: gaussianInterpolation, params: -0.5}, //You need to include the gaussianInterpolation function from DuAEF
   {value: 250, time: 4, interpolation: ease},
   {value: 360, time: 5},
];
animate(keyframes, 'cycle', 'pingpong');

# static "bezierInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, bezierPointsopt) → {number}

Interpolates a value with a bezier curve.
This method can replace linear() and ease() with a custom bézier interpolation.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
bezierPoints Array.<number> <optional>
[0.33,0.0,0.66,1.0] an Array of 4 coordinates wihtin the [0.0, 1.0] range which describes the Bézier interpolation. The default mimics the native ease() function
[ outTangentX, outTangentY, inTangentX, inTangentY ]

View Source DuAEF.jsxinc, line 26660

the value.
number

# static "blendColor"(colorA, colorB, opacityopt, blendlingModeopt) → {Array.<float>}

Blends two colors together
Parameters:
Name Type Attributes Default Description
colorA Array.<float> The first color
colorB Array.<float> The second color
opacity float <optional>
The opacity of the second color, overrides colorB[3].
blendlingMode int <optional>
0 The blending mode, one of:
0: Normal
1: Add
2: Lighter color
3: Multiply
4: Darker color

View Source DuAEF.jsxinc, line 26025

  • module:blendColorValue
The new color
Array.<float>

# static "blendColorValue"(colorA, colorB, opacityopt, blendlingModeopt) → {float}

Blends two colors together
Parameters:
Name Type Attributes Default Description
colorA float The first color
colorB float The second color
opacity float <optional>
1 The opacity
blendlingMode int <optional>
0 The blending mode, one of:
0: Normal
1: Add
3: Multiply

View Source DuAEF.jsxinc, line 26065

The new value
float

# static "bounce"(t, elasticity, damping, vAtTimeopt) → {float|Array.<float>}

Bounce, to be used when the speed is 0.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
elasticity float The elasticity, which controls the amplitude and frequence according to the last known velocity
damping float Damping
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.

View Source DuAEF.jsxinc, line 27180

  • module:getPrevKey
  • module:bezierInterpolation
The new value
float | Array.<float>

# static "checkDuikEffect"(fx, duikMatchName) → {boolean}

Checks the type of a pseudo-effect used by Duik.
This is a workaround for the missing matchName in expressions.
Pseudo-Effects used by Duik start with a hidden property which name is the same as the matchName of the effect itself (without the 'Pseudo/' part).
Parameters:
Name Type Description
fx Property The effect to check
duikMatchName string The matchName of a pseudo-effect used by Duik (without the 'Pseudo/' part)

View Source DuAEF.jsxinc, line 28049

True when the property at propIndex is named propName
boolean
Example
if ( checkEffect(thisLayer.effect(1), "DUIK parentConstraint2") ) { "This is the second version of the parent constraint by Duik" }
else { "Who knows what this is?" }

# static "checkEffect"(fx, propIndex, propName) → {boolean}

Checks the type of an effect.
This is a workaround for the missing matchName in expressions.
It checks if the given effect has a specific property at a specific index.
Parameters:
Name Type Description
fx Property The effect to check
propIndex int The index of the property
propName string The expected name of the property. Be careful with the internationalization of After Effects...

View Source DuAEF.jsxinc, line 28073

True when the property at propIndex is named propName
boolean
Example
if ( checkEffect(thisLayer.effect(1), 1, "Blur") ) { "The first effect is a blur!" }
else { "Who knows what this is?" }

# static "continueIn"(t, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopIn('continue').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27244

  • module:getNextKey
The new value
float | Array.<float>

# static "continueOut"(t, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopOut('continue').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27266

  • module:getNextKey
The new value
float | Array.<float>

# static "cycleIn"(t, nK, o, vAtTimeopt, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopIn('cycle') and loopIn('offset').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
o Boolean Wether to offset or cycle
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27291

  • module:getNextKey
The new value
float | Array.<float>

# static "cycleOut"(t, nK, o, vAtTimeopt, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopOut('cycle') and loopOut('offset').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
o Boolean Wether to offset or cycle
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27332

  • module:getPrevKey
The new value
float | Array.<float>

# static "dishineritRotation"(lopt) → {float}

Removes the ancestors rotation from the rotation of a layer. This is very useful to make a layer keep its orientation without being influenced by its parents.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28424

  • module:sign
The new rotation value, in degrees.
float
Examples
//in a rotation property, just include the function and use:
dishineritRotation();
//the layer will now keep its own orientation.
//you can also combine the result with something else
var result = dishineritRotation();
result + wiggle(5,20);

# static "dishineritScale"(lopt) → {Array.<float>}

Removes the ancestors scale from the scale of a layer. This is very useful to make a layer keep its scale without being influenced by its parents.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28456

The new scale value, in percent.
Array.<float>
Examples
//in a rotation property, just include the function and use:
dishineritScale();
//the layer will now keep its own scale.
//you can also combine the result with something else
var result = dishineritScale();
result + wiggle(5,20);

# static "distanceToLine"(point, line) → {float}

Gets the distance of a point to a line
Parameters:
Name Type Description
point Array.<float> The point [x,y]
line Array.<Array.<float>> The line [ A , B ] where A and B are two points

View Source DuAEF.jsxinc, line 27594

The distance
float

# static "expInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with an exponential function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].

View Source DuAEF.jsxinc, line 26708

  • module:linearExtrapolation
the value.
number

# static "fromGroupToLayer"(point) → {Array.<number>}

Converts the point coordinates from the current group in the shape layer to the Layer.
Use toWorld and toComp with the result if you need te coordinates in the world or the comp.
Parameters:
Name Type Description
point Array.<number> The 2D coordinates of the point in the current group.

View Source DuAEF.jsxinc, line 28488

  • module:Matrix
  • module:getGroupTransformMatrix
The 2D coordinates of the point in the Layer.
Array.<number>

# static "fromLayerToGroup"(point) → {Array.<number>}

Converts the point coordinates from Layer to the current group in the shape layer.
Use fromWorld or fromComp first if you need to convert from the world or composition coordinates, and pass the result to this function.
Parameters:
Name Type Description
point Array.<number> The 2D coordinates of the point in the Layer.

View Source DuAEF.jsxinc, line 28506

  • module:Matrix
  • module:getGroupTransformMatrix
The 2D coordinates of the point in the current group.
Array.<number>

# static "gaussian"(value, minopt, maxopt, centeropt, fwhmopt) → {Number}

The gaussian function
Parameters:
Name Type Attributes Default Description
value Number The variable
min Number <optional>
0 The minimum return value
max Number <optional>
1 The maximum return value
center Number <optional>
0 The center of the peak
fwhm Number <optional>
1 The full width at half maximum of the curve

View Source DuAEF.jsxinc, line 27620

The result
Number

# static "gaussianInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with a gaussian function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
0 The raising speed in the range [-1.0, 1.0].

View Source DuAEF.jsxinc, line 26740

the value.
number

# static "gaussianRateToBezierPoints"(rate) → {number}

Converts a Gaussian rate (as used with gaussianInterpolation) to the closest possible Bézier controls for use with bezierInterpolation.
Parameters:
Name Type Description
rate number The raising speed in the range [-1.0, 1.0].

View Source DuAEF.jsxinc, line 26782

the value.
number

# static "getCompScale"(lopt, topt) → {number}

Gets the "real" scale of a layer, resulting to its scale property, the scale of its parents, and it's location in Z-space if it's 3D.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer
t number <optional>
time The time when to get the scale

View Source DuAEF.jsxinc, line 28523

The scale ratio. This is not a percent, 1.0 is 100%.
number

# static "getEffectLayer"(fx, ind) → {Layer|null}

Gets a layer from a layer property in an effect, without generating an error if "None" is selected with the Legacy expression engine.
Parameters:
Name Type Description
fx Property The effect
ind int | string The index or the name of the property

View Source DuAEF.jsxinc, line 28096

The layer, or null if set to "None"
Layer | null

# static "getGroupTransformMatrix"(propopt) → {Matrix}

Gets the transformation Matrix for the current group in a shape layer, including the transformation from the ancestor groups
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property from which to get the matrix

View Source DuAEF.jsxinc, line 28544

  • module:isLayer
  • module:Matrix
The 2D Transform Matrix.
Matrix

# static "getLayerCompPos"(topt, lopt) → {Array.<number>}

Gets the comp position (2D Projection in the comp) of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28578

The comp position
Array.<number>

# static "getLayerDistance"(other, originopt, topt) → {Array.<number>}

Gets the world position of a layer.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
other Layer The other layer
origin Layer <optional>
thisLayer The origin
t number <optional>
time Time from when to get the position

View Source DuAEF.jsxinc, line 28599

  • module:getLayerWorldPos
The world position
Array.<number>

# static "getLayerWorldPos"(topt, lopt) → {Array.<number>}

Gets the world position of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28618

The world position
Array.<number>

# static "getLayerWorldSpeed"(topt, lopt) → {number}

Gets the world instant speed of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time when to get the velocity
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28637

  • module:getLayerWorldVelocity
A positive number. The speed.
number

# static "getLayerWorldVelocity"(topt, lopt) → {Array.<number>}

Gets the world instant velocity of a layer.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time when to get the velocity
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28654

  • module:getLayerWorldPos
The velocity.
Array.<number>

# static "getNextKey"(topt, propopt) → {Key|null}

Gets the key immediately before the given time
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27045

The key, or null if there's no key before.
Key | null

# static "getNextStopKey"(topt, propopt) → {Key|null}

Gets the next key where there is no motion after it
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27068

  • module:isStill
  • module:getNextKey
The key, or null if there's no key before.
Key | null

# static "getOrientation"(l) → {float}

Gets the world orientation of a (2D) layer.
Parameters:
Name Type Description
l Layer The layer to get the orientation from

View Source DuAEF.jsxinc, line 28669

  • module:sign
The orientation, in degrees.
float

# static "getOrientationAtTime"(l, topt) → {float}

Gets the world orientation of a (2D) layer at a specific time.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer The layer to get the orientation from
t float <optional>
time The time at which to get the orientation

View Source DuAEF.jsxinc, line 28716

The orientation, in degrees.
float

# static "getPath"() → {Object}

Gets the path from the current property at a given time.

View Source DuAEF.jsxinc, line 28110

A path object with three array attributes: points, inTangents, outTangents
Object

# static "getPrevKey"(topt, propopt) → {Key|null}

Gets the key immediately before the given time
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27092

The key, or null if there's no key before.
Key | null

# static "getPrevStartKey"(topt, propopt) → {Key|null}

Gets the previous key where there is no motion before it
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27115

  • module:isStill
  • module:getPrevKey
The key, or null if there's no key before.
Key | null

# static "getPropFromPath"(l, p) → {Property}

Gets a property from an array of indices as returned by getPropPath.
Parameters:
Name Type Description
l Layer The layer containing the needed property
p Array.<int> The indices to the property.

View Source DuAEF.jsxinc, line 28129

The property.
Property

# static "getPropPath"() → {Array.<int>}

Gets an array of all indices needed to get the current property from the layer level.

View Source DuAEF.jsxinc, line 28146

All indices to the property.
Array.<int>

# static "getPropWorldSpeed"(topt, propopt) → {Array.<number>}

Gets the world speed of a property.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28738

  • module:getPropWorldVelocity
The world speed
Array.<number>

# static "getPropWorldValue"(topt, propopt) → {Array.<number>}

Gets the world coordinates of a property.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28755

  • module:getLayerWorldPos
  • module:isPosition
The world coordinates
Array.<number>

# static "getPropWorldVelocity"(topt, propopt) → {Array.<number>}

Gets the world velocity of a property.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28775

  • module:getPropWorldValue
The world velocity
Array.<number>

# static "getSameProp"(l) → {Property}

Gets the same property as the current one but from another layer.
Parameters:
Name Type Description
l Layer The layer containing the needed property

View Source DuAEF.jsxinc, line 28174

  • module:getPropFromPath
  • module:getPropPath
The property.
Property

# static "getScale"(l) → {Array.<float>}

Gets the world scale of a layer.
Parameters:
Name Type Description
l Layer The layer to get the scale from

View Source DuAEF.jsxinc, line 28789

The scale, in percent.
Array.<float>

# static "inside"(point, points) → {object}

Checks if a point is inside a given polygon.
Parameters:
Name Type Description
point Array.<float> A 2D point [x, y]
points Array.<Array.<float>> The vertices of the polygon

View Source DuAEF.jsxinc, line 27960

An object with two properties: - `inside (bool)` is true if the point is inside the polygon - `closestVertex` is the index of the closest vertex of the polygon
object

# static "integrateLinearKeys"(propopt)

Integrates the (linear) keyframe values. Useful to animate frequencies! cf. http://www.motionscript.com/articles/speed-control.html for more explanation.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property with the keyframes.

View Source DuAEF.jsxinc, line 26806

# static "interpolateColor"(topt, modeopt, tMinopt, tMaxopt, colorAopt, colorBopt, interpolationMethodopt)

Fixes interpolation of colors by using HSL or a smart HSL taking the smallest path
Parameters:
Name Type Attributes Default Description
t number <optional>
time The value to interpolate and extrapolate
mode int <optional>
2 How to interpolate the colors, one of: 0 for 'RGB', 1 for 'HSL', or 2 for 'shortest-path HSL', 3 for 'longest-path HSL', or 4 for 'combined-RGB SL'
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
colorA Array.<number> <optional>
[0,0,0,0] The first color
colorB Array.<number> <optional>
[1,1,1,1] The second color
interpolationMethod function <optional>
ease The interpolation function, like linear(), easeIn(), easeOut(), etc.
Or any other method taking the same five arguments.

View Source DuAEF.jsxinc, line 26838

# static "inverseGaussian"(v, minopt, maxopt, centeropt, fwhmopt) → {Array.<Number>}

The inverse gaussian function
Parameters:
Name Type Attributes Default Description
v Number The variable
min Number <optional>
0 The minimum return value of the corresponding gaussian function
max Number <optional>
1 The maximum return value of the corresponding gaussian function
center Number <optional>
0 The center of the peak of the corresponding gaussian function
fwhm Number <optional>
1 The full width at half maximum of the curve of the corresponding gaussian function

View Source DuAEF.jsxinc, line 27649

The two possible results, the lower is the first in the list. If both are the same, it is the maximum
Array.<Number>

# static "inverseLogistic"(v, midValueopt, minopt, maxopt, rateopt) → {Number}

The inverse logistic function (inverse sigmoid)
Parameters:
Name Type Attributes Default Description
v Number The variable
midValue Number <optional>
0 The midpoint value, at which the function returns max/2 in the original logistic function
min Number <optional>
0 The minimum return value of the original logistic function
max Number <optional>
1 The maximum return value of the original logistic function
rate Number <optional>
1 The logistic growth rate or steepness of the original logistic function

View Source DuAEF.jsxinc, line 27679

The result
Number

# static "isAfterLastKey"() → {boolean}

Checks if current time is after the time of the last key in the property

View Source DuAEF.jsxinc, line 27137

true if time is > lastkey.time
boolean

# static "isKeyTop"(k, axis) → {boolean}

Checks if the key is a maximum or minimum
Parameters:
Name Type Description
k Keyframe The key to check
axis int The axis to check for multi-dimensionnal properties

View Source DuAEF.jsxinc, line 27154

true if the key is a maximum or minimum
boolean

# static "isLayer"(prop) → {boolean}

Checks if a property is a layer. Useful when traversing up the property tree to stop when getting the layer.
Parameters:
Name Type Description
prop Property The property to test

View Source DuAEF.jsxinc, line 28189

true if the prop is a layer
boolean

# static "isLayerFlipped"(lopt) → {bool}

Checks if the layer has been flipped (scale sign is not the same on both axis).
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28819

  • module:sign
Whether the layer is flipped
bool

# static "isPath"(prop) → {boolean}

Checks if a property is a path property.
Parameters:
Name Type Description
prop Property The property

View Source DuAEF.jsxinc, line 28204

true if the property is a path property.
boolean

# static "isPosition"(propopt) → {boolean}

Checks if a property is a transform.position property.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28224

true if the property is the transform.position property.
boolean

# static "isShapeLayer"(layopt) → {boolean}

Checks if a property is a shape layer.
Parameters:
Name Type Attributes Default Description
lay Property <optional>
thisLayer The layer to test

View Source DuAEF.jsxinc, line 28238

true if the prop is a layer
boolean

# static "isSpatial"(propopt) → {boolean}

Checks if a property is spatial
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property to check

View Source DuAEF.jsxinc, line 28255

true if the property is spatial.
boolean

# static "isStill"(topt, thresholdopt, axisopt) → {boolean}

Checks if the current property is animated at a given time.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time
threshold number <optional>
0.01 The speed under which the property is considered still.
axis number <optional>
-1 The axis to check. If < 0, will check all axis.

View Source DuAEF.jsxinc, line 28275

true if the property does not vary.
boolean

# static "isZero"(x) → {Boolean}

Checks if the value is 0; works with arrays.
Parameters:
Name Type Description
x Number | Array.<Number> The value(s)

View Source DuAEF.jsxinc, line 27699

true if all values are 0.
Boolean

# static "lastActiveTime"(prop, t) → {float}

Checks the last previous time at which the property value was not 0. (meant to be used on boolean property, works on single dimension properties too).
Parameters:
Name Type Description
prop Property The property to check
t float The time before which to run the check

View Source DuAEF.jsxinc, line 28301

  • module:getPrevKey
The last active time before t
float

# static "limit"(value, minopt, maxopt, softnessopt)

Clamps a value, but with a smooth interpolation according to a softness parameter
Parameters:
Name Type Attributes Default Description
value number | Array.<number> The value to limit
min number | Array.<number> | null <optional>
The minimum value
max number | Array.<number> | null <optional>
The maximum value
softness number <optional>
0 The softness, a value corresponding value, from which the interpolation begins to slow down

View Source DuAEF.jsxinc, line 26897

# static "linearExtrapolation"(t, tMinopt, tMaxopt, value1opt, value2opt) → {number}

Interpolates a value with a linear function, but also extrapolates it outside of known values.
This method can replace linear(), adding extrapolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate and extrapolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result

View Source DuAEF.jsxinc, line 26960

the value.
number

# static "logInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with a logarithmic function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].

View Source DuAEF.jsxinc, line 26984

  • module:linearExtrapolation
the value.
number

# static "logistic"(value, midValueopt, minopt, maxopt, rateopt) → {Number}

The logistic function (sigmoid)
Parameters:
Name Type Attributes Default Description
value Number The value
midValue Number <optional>
0 The midpoint value, at which the function returns max/2
min Number <optional>
0 The minimum return value
max Number <optional>
1 The maximum return value
rate Number <optional>
1 The logistic growth rate or steepness of the function

View Source DuAEF.jsxinc, line 27726

The result in the range [min, max] (excluding min and max)
Number

# static "logisticInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt, tMidopt) → {number}

Interpolates a value with a logistic (sigmoid) function.
This method can replace linear() and ease() with a gaussian interpolation.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].
tMid number <optional>
The t value at which the interpolated value should be half way. By default, (tMin+tMax)/2

View Source DuAEF.jsxinc, line 27019

  • module:logistic
  • module:linearExtrapolation
the value.s
number

# static "mean"(values) → {Number}

Returns the mean of a set of values
Parameters:
Name Type Description
values Array.<Number> The values

View Source DuAEF.jsxinc, line 27747

The mean
Number

# static "multPath"(path, weight) → {Object}

Multiplies a path with a scalar.
The path must be an object with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path Object The path
weight float The multipliers

View Source DuAEF.jsxinc, line 27997

  • module:multPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "multPoints"(p, w) → {Array.<Array.<float>>}

Multiplies a list of points/vectors with a scalar.
Parameters:
Name Type Description
p Array.<Array.<float>> The list of points
w float The multiplier

View Source DuAEF.jsxinc, line 27769

The multiplied points
Array.<Array.<float>>

# static "multSets"(setA, setB) → {Array.<float>}

Multiplies two sets of values, one with each other. If the lists are not the same length, additional values will be ignored
Parameters:
Name Type Description
setA Array.<float> The first list
setB Array.<float> The other list

View Source DuAEF.jsxinc, line 27788

The new values
Array.<float>

# static "nextActiveTime"(prop, t) → {float}

Checks the next time at which the property value was not 0. (meant to be used on boolean property, works on single dimension properties too).
Parameters:
Name Type Description
prop Property The property to check
t float The time after which to run the check

View Source DuAEF.jsxinc, line 28325

  • module:getNextKey
The next active time after t
float

# static "normalizeWeights"(weights, sumopt) → {Array.<float>}

Normalizes a list of weights so their sum equals 1.0
Parameters:
Name Type Attributes Description
weights Array.<float> The weights to normalize
sum float <optional>
The sum of the weights; provide it if it's already computed to improve performance.

View Source DuAEF.jsxinc, line 27811

The normalized weights
Array.<float>

# static "overshoot"(t, elasticity, damping, vAtTimeopt) → {float|Array.<float>}

Overshoot animation, to be used when the speed is 0.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
elasticity float The elasticity, which controls the amplitude and frequence according to the last known velocity
damping float Damping
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.

View Source DuAEF.jsxinc, line 27372

  • module:getPrevKey
The new value
float | Array.<float>

# static "pingPongIn"(t, nK, vAtTimeopt, dampingopt) → {float}

Animatable equivalent to loopIn('pingpong').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27409

  • module:getNextKey
The new value
float

# static "pingPongOut"(t, nK, vAtTimeopt, dampingopt) → {float}

Animatable equivalent to loopOut('pingpong'). Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27451

  • module:getPrevKey
The new value
float

# static "pointsToWorld"(points, layer) → {Array.<Array.<float>>}

Transform the points from layer to world coordinates
Parameters:
Name Type Description
points Array.<Array.<float>> The points
layer Layer The layer

View Source DuAEF.jsxinc, line 29025

The points in world coordinates
Array.<Array.<float>>

# static "randomUnitVector"(dimensions, rngopt) → {Array.<Number>}

Generates a unit vector in 2 or 3 dimensions
Parameters:
Name Type Attributes Default Description
dimensions Number The number of dimensions, either 2 or 3
rng function <optional>
random A Random number generator which can take a min and max value like the random() function.

View Source DuAEF.jsxinc, line 27839

The vector
Array.<Number>

# static "shapePointsToLayer"(prop) → {Array.<Array.<float>>}

Gets the points of the shape path in layer coordinates (applies the group transform)
Parameters:
Name Type Description
prop Property The property from which to get the path

View Source DuAEF.jsxinc, line 29043

  • module:getGroupTransformMatrix
The points in layer coordinates
Array.<Array.<float>>

# static "subPath"(path1, path2, path2weight) → {Object}

Substracts two paths together.
The paths must be objects with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path1 Object First path
path2 Object Second path
path2weight float A weight to multiply the second path values

View Source DuAEF.jsxinc, line 28022

  • module:subPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "subPoints"(p1, p2, w) → {Array.<Array.<float>>}

Substracts two lists of points/vectors.
Parameters:
Name Type Description
p1 Array.<Array.<float>> The list of points
p2 Array.<Array.<float>> The other list of points
w float A weight to multiply the values of p2

View Source DuAEF.jsxinc, line 27884

The substracted points
Array.<Array.<float>>

# static "translatePointWithLayer"(l, pointopt, startTopt, endTopt) → {Array.<float>}

Translates a point with a layer, as if it was parented to it.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer The layer to get the translation from.
point Array.<float> <optional>
[0,0] The [X,Y] point to translate (using world coordinates).
startT float <optional>
0 The start time of the translation
endT float <optional>
time The end time of the translation

View Source DuAEF.jsxinc, line 29066

The coordinates of the translated point.
Array.<float>

# static "unitVector"(dimensions, axis) → {Array.<Number>}

Creates a unit vector along a given axis
Parameters:
Name Type Description
dimensions Number
axis Number

View Source DuAEF.jsxinc, line 27913

Array.<Number>

# static "zero"() → {any}

Generates a "zero" value for the current property, i.e. 0 or [0,0], etc. according to the property type.
Note that for path properties, this method returns a path object with three array attributes: points, inTangents, outTangents.

View Source DuAEF.jsxinc, line 28348

The zero value.
any

# static get(functions) → {string}

Gets functions and their dependencies from the library.
Parameters:
Name Type Description
functions Array.<string> The name of the functions to get

View Source DuAEF.jsxinc, line 25925

The expression
string

# static getRequirements(functionName) → {Array.<string>}

A recursive method to get all the requirements (dependencies) of a function from a library
Parameters:
Name Type Description
functionName string The name of the function

View Source DuAEF.jsxinc, line 25956

The names of the required functions, including the querried one
Array.<string>

DuAEExpression.Library

Expression Library
Using DuAEF, you can easily include the methods and classes listed here to your expressions,
using DuAEExpression.Library.get and DuAEExpression.Library.getRequirements. These methods take the name of the function/class as arguments.

View Source DuAEF.jsxinc, line 25999

Classes

"FuzzyLogic"
"FuzzyVeracity"
"Matrix"

Methods

# static "addNoise"(val, quantity)

Adds some noise to a value.
You may use seedRandom() before using this function as it will influence the generated noise. A timeless noise can be achieved with seedRandom(index,true) for example.
Parameters:
Name Type Description
val number | Array.<number> The value to add noise to.
quantity float The quantity of noise. A percentage. 100 means the value can range from (val * 0) to (val * 2).

View Source DuAEF.jsxinc, line 28396

Examples
seedRandom(index, true) // a timeless noise
addNoise(value, 50 ); // the property value will have noise between (value * 0.5) and (value * 1.5) which won't vary through time.
seedRandom(index, false);
addNoise(value, 33 ); // the noise will change at each frame, varying between (value * .66) and (value * 1.33)

# static "addPath"(path1, path2, path2weight) → {Object}

Adds two paths together.
The paths must be objects with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path1 Object First path
path2 Object Second path
path2weight float A weight to multiply the second path values

View Source DuAEF.jsxinc, line 27936

  • module:addPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "addPoints"(p1, p2, w) → {Array.<Array.<float>>}

Adds two lists of points/vectors.
Parameters:
Name Type Description
p1 Array.<Array.<float>> The list of points
p2 Array.<Array.<float>> The other list of points
w float A weight to multiply the values of p2

View Source DuAEF.jsxinc, line 27490

The added points
Array.<Array.<float>>

# static "alea"(seed)

A fast pseudo random number generator usage: `var rng = alea(seed); rng(5, 10);` Generates a number between 5 and 10.
Parameters:
Name Type Description
seed *

View Source DuAEF.jsxinc, line 27518

# static "animate"(keyframes, loopOutopt, loopInopt, timeopt) → {number}

Animates the property using the given keyframes
Parameters:
Name Type Attributes Default Description
keyframes Array.<Object> The keyframes. An object with four properties:
value The value of the keyframe
time The time of the keyframe
interpolation (optional. Default: linear) A function taking 5 arguments to interpolate between this keyframe and the next one
params (optional.) A sixth argument passed to the interpolation function. To be used with DuAEF interpolations.
Note that the keyframes must be sorted. The function does not sort them, as it would have a bad impact on performance.
loopOut string <optional>
'none' One of 'none', 'cycle', 'pingpong'.
loopIn string <optional>
'none' One of 'none', 'cycle', 'pingpong'.
time float <optional>
time Use this to control how time flows.

View Source DuAEF.jsxinc, line 26598

the animated value.
number
Example
var keyframes = [
   {value: 0, time: 1, interpolation: linear},
   {value: 180, time: 2, interpolation: gaussianInterpolation, params: -0.5}, //You need to include the gaussianInterpolation function from DuAEF
   {value: 250, time: 4, interpolation: ease},
   {value: 360, time: 5},
];
animate(keyframes, 'cycle', 'pingpong');

# static "bezierInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, bezierPointsopt) → {number}

Interpolates a value with a bezier curve.
This method can replace linear() and ease() with a custom bézier interpolation.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
bezierPoints Array.<number> <optional>
[0.33,0.0,0.66,1.0] an Array of 4 coordinates wihtin the [0.0, 1.0] range which describes the Bézier interpolation. The default mimics the native ease() function
[ outTangentX, outTangentY, inTangentX, inTangentY ]

View Source DuAEF.jsxinc, line 26660

the value.
number

# static "blendColor"(colorA, colorB, opacityopt, blendlingModeopt) → {Array.<float>}

Blends two colors together
Parameters:
Name Type Attributes Default Description
colorA Array.<float> The first color
colorB Array.<float> The second color
opacity float <optional>
The opacity of the second color, overrides colorB[3].
blendlingMode int <optional>
0 The blending mode, one of:
0: Normal
1: Add
2: Lighter color
3: Multiply
4: Darker color

View Source DuAEF.jsxinc, line 26025

  • module:blendColorValue
The new color
Array.<float>

# static "blendColorValue"(colorA, colorB, opacityopt, blendlingModeopt) → {float}

Blends two colors together
Parameters:
Name Type Attributes Default Description
colorA float The first color
colorB float The second color
opacity float <optional>
1 The opacity
blendlingMode int <optional>
0 The blending mode, one of:
0: Normal
1: Add
3: Multiply

View Source DuAEF.jsxinc, line 26065

The new value
float

# static "bounce"(t, elasticity, damping, vAtTimeopt) → {float|Array.<float>}

Bounce, to be used when the speed is 0.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
elasticity float The elasticity, which controls the amplitude and frequence according to the last known velocity
damping float Damping
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.

View Source DuAEF.jsxinc, line 27180

  • module:getPrevKey
  • module:bezierInterpolation
The new value
float | Array.<float>

# static "checkDuikEffect"(fx, duikMatchName) → {boolean}

Checks the type of a pseudo-effect used by Duik.
This is a workaround for the missing matchName in expressions.
Pseudo-Effects used by Duik start with a hidden property which name is the same as the matchName of the effect itself (without the 'Pseudo/' part).
Parameters:
Name Type Description
fx Property The effect to check
duikMatchName string The matchName of a pseudo-effect used by Duik (without the 'Pseudo/' part)

View Source DuAEF.jsxinc, line 28049

True when the property at propIndex is named propName
boolean
Example
if ( checkEffect(thisLayer.effect(1), "DUIK parentConstraint2") ) { "This is the second version of the parent constraint by Duik" }
else { "Who knows what this is?" }

# static "checkEffect"(fx, propIndex, propName) → {boolean}

Checks the type of an effect.
This is a workaround for the missing matchName in expressions.
It checks if the given effect has a specific property at a specific index.
Parameters:
Name Type Description
fx Property The effect to check
propIndex int The index of the property
propName string The expected name of the property. Be careful with the internationalization of After Effects...

View Source DuAEF.jsxinc, line 28073

True when the property at propIndex is named propName
boolean
Example
if ( checkEffect(thisLayer.effect(1), 1, "Blur") ) { "The first effect is a blur!" }
else { "Who knows what this is?" }

# static "continueIn"(t, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopIn('continue').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27244

  • module:getNextKey
The new value
float | Array.<float>

# static "continueOut"(t, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopOut('continue').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27266

  • module:getNextKey
The new value
float | Array.<float>

# static "cycleIn"(t, nK, o, vAtTimeopt, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopIn('cycle') and loopIn('offset').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
o Boolean Wether to offset or cycle
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27291

  • module:getNextKey
The new value
float | Array.<float>

# static "cycleOut"(t, nK, o, vAtTimeopt, dampingopt) → {float|Array.<float>}

Animatable equivalent to loopOut('cycle') and loopOut('offset').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
o Boolean Wether to offset or cycle
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27332

  • module:getPrevKey
The new value
float | Array.<float>

# static "dishineritRotation"(lopt) → {float}

Removes the ancestors rotation from the rotation of a layer. This is very useful to make a layer keep its orientation without being influenced by its parents.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28424

  • module:sign
The new rotation value, in degrees.
float
Examples
//in a rotation property, just include the function and use:
dishineritRotation();
//the layer will now keep its own orientation.
//you can also combine the result with something else
var result = dishineritRotation();
result + wiggle(5,20);

# static "dishineritScale"(lopt) → {Array.<float>}

Removes the ancestors scale from the scale of a layer. This is very useful to make a layer keep its scale without being influenced by its parents.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28456

The new scale value, in percent.
Array.<float>
Examples
//in a rotation property, just include the function and use:
dishineritScale();
//the layer will now keep its own scale.
//you can also combine the result with something else
var result = dishineritScale();
result + wiggle(5,20);

# static "distanceToLine"(point, line) → {float}

Gets the distance of a point to a line
Parameters:
Name Type Description
point Array.<float> The point [x,y]
line Array.<Array.<float>> The line [ A , B ] where A and B are two points

View Source DuAEF.jsxinc, line 27594

The distance
float

# static "expInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with an exponential function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].

View Source DuAEF.jsxinc, line 26708

  • module:linearExtrapolation
the value.
number

# static "fromGroupToLayer"(point) → {Array.<number>}

Converts the point coordinates from the current group in the shape layer to the Layer.
Use toWorld and toComp with the result if you need te coordinates in the world or the comp.
Parameters:
Name Type Description
point Array.<number> The 2D coordinates of the point in the current group.

View Source DuAEF.jsxinc, line 28488

  • module:Matrix
  • module:getGroupTransformMatrix
The 2D coordinates of the point in the Layer.
Array.<number>

# static "fromLayerToGroup"(point) → {Array.<number>}

Converts the point coordinates from Layer to the current group in the shape layer.
Use fromWorld or fromComp first if you need to convert from the world or composition coordinates, and pass the result to this function.
Parameters:
Name Type Description
point Array.<number> The 2D coordinates of the point in the Layer.

View Source DuAEF.jsxinc, line 28506

  • module:Matrix
  • module:getGroupTransformMatrix
The 2D coordinates of the point in the current group.
Array.<number>

# static "gaussian"(value, minopt, maxopt, centeropt, fwhmopt) → {Number}

The gaussian function
Parameters:
Name Type Attributes Default Description
value Number The variable
min Number <optional>
0 The minimum return value
max Number <optional>
1 The maximum return value
center Number <optional>
0 The center of the peak
fwhm Number <optional>
1 The full width at half maximum of the curve

View Source DuAEF.jsxinc, line 27620

The result
Number

# static "gaussianInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with a gaussian function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
0 The raising speed in the range [-1.0, 1.0].

View Source DuAEF.jsxinc, line 26740

the value.
number

# static "gaussianRateToBezierPoints"(rate) → {number}

Converts a Gaussian rate (as used with gaussianInterpolation) to the closest possible Bézier controls for use with bezierInterpolation.
Parameters:
Name Type Description
rate number The raising speed in the range [-1.0, 1.0].

View Source DuAEF.jsxinc, line 26782

the value.
number

# static "getCompScale"(lopt, topt) → {number}

Gets the "real" scale of a layer, resulting to its scale property, the scale of its parents, and it's location in Z-space if it's 3D.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer
t number <optional>
time The time when to get the scale

View Source DuAEF.jsxinc, line 28523

The scale ratio. This is not a percent, 1.0 is 100%.
number

# static "getEffectLayer"(fx, ind) → {Layer|null}

Gets a layer from a layer property in an effect, without generating an error if "None" is selected with the Legacy expression engine.
Parameters:
Name Type Description
fx Property The effect
ind int | string The index or the name of the property

View Source DuAEF.jsxinc, line 28096

The layer, or null if set to "None"
Layer | null

# static "getGroupTransformMatrix"(propopt) → {Matrix}

Gets the transformation Matrix for the current group in a shape layer, including the transformation from the ancestor groups
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property from which to get the matrix

View Source DuAEF.jsxinc, line 28544

  • module:isLayer
  • module:Matrix
The 2D Transform Matrix.
Matrix

# static "getLayerCompPos"(topt, lopt) → {Array.<number>}

Gets the comp position (2D Projection in the comp) of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28578

The comp position
Array.<number>

# static "getLayerDistance"(other, originopt, topt) → {Array.<number>}

Gets the world position of a layer.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
other Layer The other layer
origin Layer <optional>
thisLayer The origin
t number <optional>
time Time from when to get the position

View Source DuAEF.jsxinc, line 28599

  • module:getLayerWorldPos
The world position
Array.<number>

# static "getLayerWorldPos"(topt, lopt) → {Array.<number>}

Gets the world position of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28618

The world position
Array.<number>

# static "getLayerWorldSpeed"(topt, lopt) → {number}

Gets the world instant speed of a layer.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time when to get the velocity
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28637

  • module:getLayerWorldVelocity
A positive number. The speed.
number

# static "getLayerWorldVelocity"(topt, lopt) → {Array.<number>}

Gets the world instant velocity of a layer.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time when to get the velocity
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28654

  • module:getLayerWorldPos
The velocity.
Array.<number>

# static "getNextKey"(topt, propopt) → {Key|null}

Gets the key immediately before the given time
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27045

The key, or null if there's no key before.
Key | null

# static "getNextStopKey"(topt, propopt) → {Key|null}

Gets the next key where there is no motion after it
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27068

  • module:isStill
  • module:getNextKey
The key, or null if there's no key before.
Key | null

# static "getOrientation"(l) → {float}

Gets the world orientation of a (2D) layer.
Parameters:
Name Type Description
l Layer The layer to get the orientation from

View Source DuAEF.jsxinc, line 28669

  • module:sign
The orientation, in degrees.
float

# static "getOrientationAtTime"(l, topt) → {float}

Gets the world orientation of a (2D) layer at a specific time.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer The layer to get the orientation from
t float <optional>
time The time at which to get the orientation

View Source DuAEF.jsxinc, line 28716

The orientation, in degrees.
float

# static "getPath"() → {Object}

Gets the path from the current property at a given time.

View Source DuAEF.jsxinc, line 28110

A path object with three array attributes: points, inTangents, outTangents
Object

# static "getPrevKey"(topt, propopt) → {Key|null}

Gets the key immediately before the given time
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27092

The key, or null if there's no key before.
Key | null

# static "getPrevStartKey"(topt, propopt) → {Key|null}

Gets the previous key where there is no motion before it
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time at which to get the key
prop Property <optional>
thisProperty The property from which to get the key

View Source DuAEF.jsxinc, line 27115

  • module:isStill
  • module:getPrevKey
The key, or null if there's no key before.
Key | null

# static "getPropFromPath"(l, p) → {Property}

Gets a property from an array of indices as returned by getPropPath.
Parameters:
Name Type Description
l Layer The layer containing the needed property
p Array.<int> The indices to the property.

View Source DuAEF.jsxinc, line 28129

The property.
Property

# static "getPropPath"() → {Array.<int>}

Gets an array of all indices needed to get the current property from the layer level.

View Source DuAEF.jsxinc, line 28146

All indices to the property.
Array.<int>

# static "getPropWorldSpeed"(topt, propopt) → {Array.<number>}

Gets the world speed of a property.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28738

  • module:getPropWorldVelocity
The world speed
Array.<number>

# static "getPropWorldValue"(topt, propopt) → {Array.<number>}

Gets the world coordinates of a property.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28755

  • module:getLayerWorldPos
  • module:isPosition
The world coordinates
Array.<number>

# static "getPropWorldVelocity"(topt, propopt) → {Array.<number>}

Gets the world velocity of a property.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number <optional>
time Time from when to get the position
prop Layer <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28775

  • module:getPropWorldValue
The world velocity
Array.<number>

# static "getSameProp"(l) → {Property}

Gets the same property as the current one but from another layer.
Parameters:
Name Type Description
l Layer The layer containing the needed property

View Source DuAEF.jsxinc, line 28174

  • module:getPropFromPath
  • module:getPropPath
The property.
Property

# static "getScale"(l) → {Array.<float>}

Gets the world scale of a layer.
Parameters:
Name Type Description
l Layer The layer to get the scale from

View Source DuAEF.jsxinc, line 28789

The scale, in percent.
Array.<float>

# static "inside"(point, points) → {object}

Checks if a point is inside a given polygon.
Parameters:
Name Type Description
point Array.<float> A 2D point [x, y]
points Array.<Array.<float>> The vertices of the polygon

View Source DuAEF.jsxinc, line 27960

An object with two properties: - `inside (bool)` is true if the point is inside the polygon - `closestVertex` is the index of the closest vertex of the polygon
object

# static "integrateLinearKeys"(propopt)

Integrates the (linear) keyframe values. Useful to animate frequencies! cf. http://www.motionscript.com/articles/speed-control.html for more explanation.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property with the keyframes.

View Source DuAEF.jsxinc, line 26806

# static "interpolateColor"(topt, modeopt, tMinopt, tMaxopt, colorAopt, colorBopt, interpolationMethodopt)

Fixes interpolation of colors by using HSL or a smart HSL taking the smallest path
Parameters:
Name Type Attributes Default Description
t number <optional>
time The value to interpolate and extrapolate
mode int <optional>
2 How to interpolate the colors, one of: 0 for 'RGB', 1 for 'HSL', or 2 for 'shortest-path HSL', 3 for 'longest-path HSL', or 4 for 'combined-RGB SL'
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
colorA Array.<number> <optional>
[0,0,0,0] The first color
colorB Array.<number> <optional>
[1,1,1,1] The second color
interpolationMethod function <optional>
ease The interpolation function, like linear(), easeIn(), easeOut(), etc.
Or any other method taking the same five arguments.

View Source DuAEF.jsxinc, line 26838

# static "inverseGaussian"(v, minopt, maxopt, centeropt, fwhmopt) → {Array.<Number>}

The inverse gaussian function
Parameters:
Name Type Attributes Default Description
v Number The variable
min Number <optional>
0 The minimum return value of the corresponding gaussian function
max Number <optional>
1 The maximum return value of the corresponding gaussian function
center Number <optional>
0 The center of the peak of the corresponding gaussian function
fwhm Number <optional>
1 The full width at half maximum of the curve of the corresponding gaussian function

View Source DuAEF.jsxinc, line 27649

The two possible results, the lower is the first in the list. If both are the same, it is the maximum
Array.<Number>

# static "inverseLogistic"(v, midValueopt, minopt, maxopt, rateopt) → {Number}

The inverse logistic function (inverse sigmoid)
Parameters:
Name Type Attributes Default Description
v Number The variable
midValue Number <optional>
0 The midpoint value, at which the function returns max/2 in the original logistic function
min Number <optional>
0 The minimum return value of the original logistic function
max Number <optional>
1 The maximum return value of the original logistic function
rate Number <optional>
1 The logistic growth rate or steepness of the original logistic function

View Source DuAEF.jsxinc, line 27679

The result
Number

# static "isAfterLastKey"() → {boolean}

Checks if current time is after the time of the last key in the property

View Source DuAEF.jsxinc, line 27137

true if time is > lastkey.time
boolean

# static "isKeyTop"(k, axis) → {boolean}

Checks if the key is a maximum or minimum
Parameters:
Name Type Description
k Keyframe The key to check
axis int The axis to check for multi-dimensionnal properties

View Source DuAEF.jsxinc, line 27154

true if the key is a maximum or minimum
boolean

# static "isLayer"(prop) → {boolean}

Checks if a property is a layer. Useful when traversing up the property tree to stop when getting the layer.
Parameters:
Name Type Description
prop Property The property to test

View Source DuAEF.jsxinc, line 28189

true if the prop is a layer
boolean

# static "isLayerFlipped"(lopt) → {bool}

Checks if the layer has been flipped (scale sign is not the same on both axis).
Parameters:
Name Type Attributes Default Description
l Layer <optional>
thisLayer The layer

View Source DuAEF.jsxinc, line 28819

  • module:sign
Whether the layer is flipped
bool

# static "isPath"(prop) → {boolean}

Checks if a property is a path property.
Parameters:
Name Type Description
prop Property The property

View Source DuAEF.jsxinc, line 28204

true if the property is a path property.
boolean

# static "isPosition"(propopt) → {boolean}

Checks if a property is a transform.position property.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property

View Source DuAEF.jsxinc, line 28224

true if the property is the transform.position property.
boolean

# static "isShapeLayer"(layopt) → {boolean}

Checks if a property is a shape layer.
Parameters:
Name Type Attributes Default Description
lay Property <optional>
thisLayer The layer to test

View Source DuAEF.jsxinc, line 28238

true if the prop is a layer
boolean

# static "isSpatial"(propopt) → {boolean}

Checks if a property is spatial
Parameters:
Name Type Attributes Default Description
prop Property <optional>
thisProperty The property to check

View Source DuAEF.jsxinc, line 28255

true if the property is spatial.
boolean

# static "isStill"(topt, thresholdopt, axisopt) → {boolean}

Checks if the current property is animated at a given time.
Parameters:
Name Type Attributes Default Description
t number <optional>
time The time
threshold number <optional>
0.01 The speed under which the property is considered still.
axis number <optional>
-1 The axis to check. If < 0, will check all axis.

View Source DuAEF.jsxinc, line 28275

true if the property does not vary.
boolean

# static "isZero"(x) → {Boolean}

Checks if the value is 0; works with arrays.
Parameters:
Name Type Description
x Number | Array.<Number> The value(s)

View Source DuAEF.jsxinc, line 27699

true if all values are 0.
Boolean

# static "lastActiveTime"(prop, t) → {float}

Checks the last previous time at which the property value was not 0. (meant to be used on boolean property, works on single dimension properties too).
Parameters:
Name Type Description
prop Property The property to check
t float The time before which to run the check

View Source DuAEF.jsxinc, line 28301

  • module:getPrevKey
The last active time before t
float

# static "limit"(value, minopt, maxopt, softnessopt)

Clamps a value, but with a smooth interpolation according to a softness parameter
Parameters:
Name Type Attributes Default Description
value number | Array.<number> The value to limit
min number | Array.<number> | null <optional>
The minimum value
max number | Array.<number> | null <optional>
The maximum value
softness number <optional>
0 The softness, a value corresponding value, from which the interpolation begins to slow down

View Source DuAEF.jsxinc, line 26897

# static "linearExtrapolation"(t, tMinopt, tMaxopt, value1opt, value2opt) → {number}

Interpolates a value with a linear function, but also extrapolates it outside of known values.
This method can replace linear(), adding extrapolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate and extrapolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result

View Source DuAEF.jsxinc, line 26960

the value.
number

# static "logInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt) → {number}

Interpolates a value with a logarithmic function.
This method can replace linear() and ease() with a gaussian interpolation.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].

View Source DuAEF.jsxinc, line 26984

  • module:linearExtrapolation
the value.
number

# static "logistic"(value, midValueopt, minopt, maxopt, rateopt) → {Number}

The logistic function (sigmoid)
Parameters:
Name Type Attributes Default Description
value Number The value
midValue Number <optional>
0 The midpoint value, at which the function returns max/2
min Number <optional>
0 The minimum return value
max Number <optional>
1 The maximum return value
rate Number <optional>
1 The logistic growth rate or steepness of the function

View Source DuAEF.jsxinc, line 27726

The result in the range [min, max] (excluding min and max)
Number

# static "logisticInterpolation"(t, tMinopt, tMaxopt, value1opt, value2opt, rateopt, tMidopt) → {number}

Interpolates a value with a logistic (sigmoid) function.
This method can replace linear() and ease() with a gaussian interpolation.
Parameters:
Name Type Attributes Default Description
t number The value to interpolate
tMin number <optional>
0 The minimum value of the initial range
tMax number <optional>
1 The maximum value of the initial range
value1 number <optional>
0 The minimum value of the interpolated result
value2 number <optional>
1 The maximum value of the interpolated result
rate number <optional>
1 The raising speed in the range [0, inf].
tMid number <optional>
The t value at which the interpolated value should be half way. By default, (tMin+tMax)/2

View Source DuAEF.jsxinc, line 27019

  • module:logistic
  • module:linearExtrapolation
the value.s
number

# static "mean"(values) → {Number}

Returns the mean of a set of values
Parameters:
Name Type Description
values Array.<Number> The values

View Source DuAEF.jsxinc, line 27747

The mean
Number

# static "multPath"(path, weight) → {Object}

Multiplies a path with a scalar.
The path must be an object with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path Object The path
weight float The multipliers

View Source DuAEF.jsxinc, line 27997

  • module:multPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "multPoints"(p, w) → {Array.<Array.<float>>}

Multiplies a list of points/vectors with a scalar.
Parameters:
Name Type Description
p Array.<Array.<float>> The list of points
w float The multiplier

View Source DuAEF.jsxinc, line 27769

The multiplied points
Array.<Array.<float>>

# static "multSets"(setA, setB) → {Array.<float>}

Multiplies two sets of values, one with each other. If the lists are not the same length, additional values will be ignored
Parameters:
Name Type Description
setA Array.<float> The first list
setB Array.<float> The other list

View Source DuAEF.jsxinc, line 27788

The new values
Array.<float>

# static "nextActiveTime"(prop, t) → {float}

Checks the next time at which the property value was not 0. (meant to be used on boolean property, works on single dimension properties too).
Parameters:
Name Type Description
prop Property The property to check
t float The time after which to run the check

View Source DuAEF.jsxinc, line 28325

  • module:getNextKey
The next active time after t
float

# static "normalizeWeights"(weights, sumopt) → {Array.<float>}

Normalizes a list of weights so their sum equals 1.0
Parameters:
Name Type Attributes Description
weights Array.<float> The weights to normalize
sum float <optional>
The sum of the weights; provide it if it's already computed to improve performance.

View Source DuAEF.jsxinc, line 27811

The normalized weights
Array.<float>

# static "overshoot"(t, elasticity, damping, vAtTimeopt) → {float|Array.<float>}

Overshoot animation, to be used when the speed is 0.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
elasticity float The elasticity, which controls the amplitude and frequence according to the last known velocity
damping float Damping
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.

View Source DuAEF.jsxinc, line 27372

  • module:getPrevKey
The new value
float | Array.<float>

# static "pingPongIn"(t, nK, vAtTimeopt, dampingopt) → {float}

Animatable equivalent to loopIn('pingpong').
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all previous frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27409

  • module:getNextKey
The new value
float

# static "pingPongOut"(t, nK, vAtTimeopt, dampingopt) → {float}

Animatable equivalent to loopOut('pingpong'). Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
t float The time at which the value must be got. To end the loop, pass the same time for all subsequent frames.
nK int The number of keyframes to loop. Use 0 to loop all keyframes
vAtTime function <optional>
valueAtTime A function to replace valueAtTime. Use this to loop after an expression+keyframe controlled animation, by providing a function used to generate the animation.
damping float <optional>
0 Exponentially attenuates the effect over time

View Source DuAEF.jsxinc, line 27451

  • module:getPrevKey
The new value
float

# static "pointsToWorld"(points, layer) → {Array.<Array.<float>>}

Transform the points from layer to world coordinates
Parameters:
Name Type Description
points Array.<Array.<float>> The points
layer Layer The layer

View Source DuAEF.jsxinc, line 29025

The points in world coordinates
Array.<Array.<float>>

# static "randomUnitVector"(dimensions, rngopt) → {Array.<Number>}

Generates a unit vector in 2 or 3 dimensions
Parameters:
Name Type Attributes Default Description
dimensions Number The number of dimensions, either 2 or 3
rng function <optional>
random A Random number generator which can take a min and max value like the random() function.

View Source DuAEF.jsxinc, line 27839

The vector
Array.<Number>

# static "shapePointsToLayer"(prop) → {Array.<Array.<float>>}

Gets the points of the shape path in layer coordinates (applies the group transform)
Parameters:
Name Type Description
prop Property The property from which to get the path

View Source DuAEF.jsxinc, line 29043

  • module:getGroupTransformMatrix
The points in layer coordinates
Array.<Array.<float>>

# static "subPath"(path1, path2, path2weight) → {Object}

Substracts two paths together.
The paths must be objects with three array attributes: points, inTangents, outTangents
Parameters:
Name Type Description
path1 Object First path
path2 Object Second path
path2weight float A weight to multiply the second path values

View Source DuAEF.jsxinc, line 28022

  • module:subPoints
A path object with three array attributes: points, inTangents, outTangents
Object

# static "subPoints"(p1, p2, w) → {Array.<Array.<float>>}

Substracts two lists of points/vectors.
Parameters:
Name Type Description
p1 Array.<Array.<float>> The list of points
p2 Array.<Array.<float>> The other list of points
w float A weight to multiply the values of p2

View Source DuAEF.jsxinc, line 27884

The substracted points
Array.<Array.<float>>

# static "translatePointWithLayer"(l, pointopt, startTopt, endTopt) → {Array.<float>}

Translates a point with a layer, as if it was parented to it.
Note that for performance reasons with expressions, even if the parameters of the function are documented with optional/default values, you MUST provide ALL the arguments when using them.
Parameters:
Name Type Attributes Default Description
l Layer The layer to get the translation from.
point Array.<float> <optional>
[0,0] The [X,Y] point to translate (using world coordinates).
startT float <optional>
0 The start time of the translation
endT float <optional>
time The end time of the translation

View Source DuAEF.jsxinc, line 29066

The coordinates of the translated point.
Array.<float>

# static "unitVector"(dimensions, axis) → {Array.<Number>}

Creates a unit vector along a given axis
Parameters:
Name Type Description
dimensions Number
axis Number

View Source DuAEF.jsxinc, line 27913

Array.<Number>

# static "zero"() → {any}

Generates a "zero" value for the current property, i.e. 0 or [0,0], etc. according to the property type.
Note that for path properties, this method returns a path object with three array attributes: points, inTangents, outTangents.

View Source DuAEF.jsxinc, line 28348

The zero value.
any

# static get(functions) → {string}

Gets functions and their dependencies from the library.
Parameters:
Name Type Description
functions Array.<string> The name of the functions to get

View Source DuAEF.jsxinc, line 25925

The expression
string

# static getRequirements(functionName) → {Array.<string>}

A recursive method to get all the requirements (dependencies) of a function from a library
Parameters:
Name Type Description
functionName string The name of the function

View Source DuAEF.jsxinc, line 25956

The names of the required functions, including the querried one
Array.<string>