← Back to Docs
  • index.html
  • Clayground
  • Clayground.Character3D
  • GaitCycleAnim
  • Clayground 2026.7
  • GaitCycleAnim QML Type

    The one locomotion cycle: two mirrored steps over a table that gait.js derives from a base (walk or run) and a factor vector. More...

    Import Statement: import Clayground.Character3D
    Inherited By:

    RunAnim and WalkAnim

    Properties

    Detailed Description

    WalkAnim and RunAnim are this with base set. Every angle comes from table, which gait.js derives from the base's authored numbers and the entity's gaitFactors; with no factors the table is the base, and the base is the cycle exactly as it was before the gait model existed - gait.test.js pins that to the digit.

    A change of factors lands at the next half-cycle, when the phase that is starting reads its targets; there is no blend, which is how every other activity switch here behaves too.

    Beyond the joints the cycle animates one number of its own, lift, the up-and-down of the whole figure; Character adds it to the torso's height. It is zero whenever the cycle is not running.

    Property Documentation

    base : string

    "walk" or "run": whose authored numbers the table starts from.


    cycleMs : real [read-only]

    One full cycle, two steps, in milliseconds.


    derivedSpeed : real [read-only]

    Ground speed that keeps the feet from sliding, from the hip angles, the leg and the cycle length.


    factors : var

    The composed factor vector, or null for neutral. Taken from the entity's gaitFactors when it has one.


    lift : real [read-only]

    How far the figure is raised right now, in world units: up to bounce x legHeight at mid-step, zero at contact, and zero whenever the cycle is not running.


    strideLength : real [read-only]

    How far the feet travel in one full cycle.


    table : var [read-only]

    The derived angles and cycle length the phases animate to.