Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Property<PropertyValueType>

Type parameters

  • PropertyValueType: Value

Hierarchy

Index

Constructors

constructor

  • new Property<PropertyValueType>(value: PropertyValueType, name?: string): Property<PropertyValueType>
  • Type parameters

    • PropertyValueType: Value

    Parameters

    • value: PropertyValueType
    • name: string = "Property name"

    Returns Property<PropertyValueType>

Properties

Readonly name

name: string = "Property name"

Readonly numKeys

numKeys: number = 0

The number of keyframes on the property

Readonly propertyIndex

propertyIndex: number = 0

The index number of the property in it's property group

Readonly speed

speed: PropertyValueType

A 1D, positive speed value equal to the speed at which the property is changing at the default time. This element can be used only for spatial properties.

Readonly value

value: PropertyValueType

Readonly velocity

velocity: PropertyValueType

The temporal velocity value at the current time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.

Methods

key

  • key(index: number): Key<PropertyValueType>
  • Parameters

    • index: number

      The index of the keyframe to return (e.g. the 1st keyframe)

    Returns Key<PropertyValueType>

    The keyframe at the specified index on the property

loopIn

  • loopIn(type?: loopType, numKeyframes?: number): PropertyValueType
  • Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer.

    Parameters

    • type: loopType = "cycle"

      "cycle": (default) Repeats the specified segment. "pingpong": Repeats the specified segment, alternating between forward and backward. "offset": Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped. "continue": Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.

    • numKeyframes: number = 0

      determines what segment is looped: The segment looped is the portion of the layer from the first keyframe to the numKeyframes+1 keyframe. The default value of 0 means that all keyframes loop

    Returns PropertyValueType

loopInDuration

  • loopInDuration(type?: loopType, duration?: number): PropertyValueType
  • Loops a segment of time that is measured from the first keyframe on the layer forward toward the Out point of the layer. The loop plays from the In point of the layer.

    Parameters

    • type: loopType = "cycle"

      "cycle": (default) Repeats the specified segment. "pingpong": Repeats the specified segment, alternating between forward and backward. "offset": Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped. "continue": Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.

    • duration: number = 0

      The number of composition seconds in a segment to loop; the specified range is measured from the first keyframe

    Returns PropertyValueType

loopOut

  • loopOut(type?: loopType, numKeyframes?: number): PropertyValueType
  • Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer.

    Parameters

    • type: loopType = "cycle"

      "cycle": (default) Repeats the specified segment. "pingpong": Repeats the specified segment, alternating between forward and backward. "offset": Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped. "continue": Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.

    • numKeyframes: number = 0

      determines what segment is looped: The segment looped is the portion of the layer from the last keyframe to the thisProperty.numKeys - numKeyframes keyframe. The default value of 0 means that all keyframes loop

    Returns PropertyValueType

loopOutDuration

  • loopOutDuration(type?: loopType, duration?: number): PropertyValueType
  • Loops a segment of time that is measured from the last keyframe on the layer back toward the In point of the layer. The loop plays until the Out point of the layer.

    Parameters

    • type: loopType = "cycle"

      "cycle": (default) Repeats the specified segment. "pingpong": Repeats the specified segment, alternating between forward and backward. "offset": Repeats the specified segment, but offsets each cycle by the difference in the value of the property at the start and end of the segment, multiplied by the number of times the segment has looped. "continue": Does not repeat the specified segment, but continues to animate a property based on the velocity at the first or last keyframe.

    • duration: number = 0

      The number of composition seconds in a segment to loop; the specified range is measured from the last keyframe backwards.

    Returns PropertyValueType

nearestKey

  • nearestKey(time: number): Key<PropertyValueType>
  • Parameters

    • time: number

    Returns Key<PropertyValueType>

    The marker that is nearest in time to t

propertyGroup

  • Parameters

    • countUp: number

      The number of levels in the property hierarchy to ascend, e.g. countUp = 1 will return the parent PropertyGroup.

    Returns PropertyGroup

    The group of properties (PropertyGroup object) relative to the property of which the expression is written

smooth

  • smooth(width?: number, samples?: number, time?: number): PropertyValueType
  • Smooths the property values over time, converting large, brief deviations in the value to smaller, more evenly distributed deviations. This smoothing is accomplished by applying a box filter to the value of the property at the specified time.

    Parameters

    • width: number = 0.2

      The range of time (in seconds) over which the filter is averaged.

    • samples: number = 5

      The number of discrete samples evenly spaced over time; use a larger value for greater smoothness (but decreased performance). Generally, you’ll want samples to be an odd number so that the value at the current time is included in the average.

    • time: number = 0

    Returns PropertyValueType

speedAtTime

  • speedAtTime(time: number): PropertyValueType
  • Parameters

    • time: number

      The composition time in seconds to get the speed at

    Returns PropertyValueType

    A 1D, positive speed value equal to the speed at which the property is changing at the specified time. This element can be used only for spatial properties.

temporalWiggle

  • temporalWiggle(freq: number, amp: number, octaves?: number, amp_mult?: number, time?: number): PropertyValueType
  • Samples the property value at a time which is wiggled

    Parameters

    • freq: number

      The rate at which the value changes in wiggles per second

    • amp: number

      How much the value should change, in units of the original property value (e.g. 1 by 100% of the original value)

    • octaves: number = 1

      How much detail the wiggle has, which is driven by the number of "octaves" of noise to multiply together. Higher values will have more detail

    • amp_mult: number = 0.5

      The amount the given amplitude is multiplied by for each octave, which controls the falloff of the upper harmonics ("octaves").

    • time: number = 0

      The time at which the value is sampled for use within the wiggle

    Returns PropertyValueType

valueAtTime

  • valueAtTime(time: number): PropertyValueType
  • Returns the value for the property at the specified time

    Parameters

    • time: number

      THe composition time in seconds to get the value at

    Returns PropertyValueType

velocityAtTime

  • velocityAtTime(time: number): PropertyValueType
  • Parameters

    • time: number

      The composition time in seconds to get the velocity at

    Returns PropertyValueType

    The temporal velocity value at the specified time. For spatial properties, such as Position, it returns the tangent vector value. The result is the same dimension as the property.

wiggle

  • wiggle(freq: number, amp: number, octaves?: number, amp_mult?: number, time?: number): PropertyValueType
  • Modifies the property value randomly over time.

    Parameters

    • freq: number

      The rate at which the value changes in wiggles per second

    • amp: number

      How much the value should change, in units of the original property value (e.g. 1 by 100% of the original value)

    • octaves: number = 1

      How much detail the wiggle has, which is driven by the number of "octaves" of noise to multiply together. Higher values will have more detail

    • amp_mult: number = 0.5

      The amount the given amplitude is multiplied by for each octave, which controls the falloff of the upper harmonics ("octaves").

    • time: number = 0

      The time at which the value is sampled for use within the wiggle

    Returns PropertyValueType

Generated using TypeDoc