Lens Scripting API
    Index

    Constructors

    • Parameters

      • k: number
      • damp: number
      • mass: number

      Returns SpringAnimate

    Properties

    damp: number
    k: number
    mass: number
    velocity: vec3

    Methods

    • Evaluates the new position of the object based on the spring dynamics.

      Parameters

      • currentValue: vec3

        The current position of the object.

      • targetValue: vec3

        The target position of the object.

      Returns vec3

      The updated position of the object.

    • Returns void

    • Creates a new spring animation with the given duration and bounce.

      Parameters

      • duration: number

        The perceptual duration of the animation in seconds.

      • bounce: number

        How much bounce the spring should have. 0 is no bounce, 1 is infinite bounce.

      Returns SpringAnimate

      A new spring animation object.

    MMNEPVFCICPMFPCPTTAAATR