Function SpringOutFrame

  • The format to use when defining custom frame functions An example of a frame function is SpringFrame


    Source code of TypeFrameFunction


    a single frame of the frame function at the time specified

    Note: Be very careful of only setting some of the spring parameters, it can cause errors if you are not careful


    • t: number

      time value between 0 & 1

    • Optional spring-parameters: number[]

      mass = mass of object

      • stiffness = stiffness of spring
      • damping = amount to dampen spring motion
      • velocity = initial velocity of spring
    • Optional duration: number

      (optional) the maximum duration (in milliseconds) required for a spring (with its specified spring parameters) to reach a resting position. It's used to ensure the progress of all spring frames put together are smooth

    Returns number

Generated using TypeDoc