Documentation
    Preparing search index...

    Function cylinderGeometry

    • A cylinder about the +Y axis, centred on the origin (§53 "cylinder").

      const geometry = cylinderGeometry({ radius: 0.25, height: 2 });
      

      The axis is +Y rather than +Z because §7a's world is Y-up in 2D and 3D alike: an upright cylinder is the common case (a pillar, a shaft, a rotor), and one that has to lie down is rotated by its node. @fourjs/physics' cylinder collider (§24) takes the same radius and height about the same axis.

      capped: false omits both discs and leaves an open tube — cheaper, and what a scene wants when the ends are never seen or are closed by something else. Uv is u around, v from 0 at -Y to 1 at +Y; each cap disc carries its own unit square with (0.5, 0.5) at the centre.

      Parameters

      Returns BufferGeometry