@pixi/3d
    Preparing search index...

    Class Cylindrical

    A point given as radius, theta and y: its distance from the Y axis, its angle around that axis measured from +Z toward +X, and its height

    Use it to lay things out around a vertical axis, such as a ring of pillars or a spiral staircase, then convert back with Vector3#setFromCylindrical.

    const step = new Cylindrical();

    for (let i = 0; i < stairs.length; i++) {
    step.set(4, i * 0.4, i * 0.25);
    stairs[i].position.setFromCylindrical(step);
    }
    Index
    • Creates a new Cylindrical

      Parameters

      • radius: number = 1

        Distance from the Y axis

      • theta: number = 0

        Azimuthal angle (radians) measured from +Z

      • y: number = 0

        Height above the XZ plane

      Returns Cylindrical

    radius: number = 0

    Distance from the Y axis

    ring.radius = arenaRadius - 1;
    
    theta: number = 0

    Angle in radians around the Y axis, measured from +Z toward +X

    carousel.theta += ticker.deltaMS * 0.001;
    
    type: SHAPE_PRIMITIVE_3D = 'cylindrical'

    Names the shape without an instanceof check, like the type on pixi's 2D shapes

    'cylindrical'
    
    y: number = 0

    Height above the XZ plane

    spiral.y += climbSpeed;
    
    • Creates a new Cylindrical with the same values

      Returns Cylindrical

      The new instance

      const start = slot.clone();
      
    • Copies other into this instance

      Parameters

      Returns this

      This instance for chaining

      restingSlot.copyFrom(slot);
      
    • Copies this instance into target and returns it

      Type Parameters

      Parameters

      • target: T

        The instance to copy into

      Returns T

      The given target

      slot.copyTo(restingSlot);
      
    • Returns true when radius, theta and y match other exactly (no epsilon tolerance)

      Parameters

      Returns boolean

      Whether all components match

      const settled = slot.equals(restingSlot);
      
    • Sets radius, theta and y

      Parameters

      • radius: number

        Distance from the Y axis

      • theta: number

        Azimuthal angle (radians) measured from +Z

      • y: number

        Height above the XZ plane

      Returns this

      This instance for chaining

      const slot = new Cylindrical().set(6, (index / count) * Math.PI * 2, 0);
      
    • Sets this instance from Cartesian (x, y, z)

      Parameters

      • x: number

        The Cartesian x coordinate

      • y: number

        The Cartesian y coordinate

      • z: number

        The Cartesian z coordinate

      Returns this

      This instance for chaining

      const around = new Cylindrical().setFromCartesianCoords(pointer.x, 0, pointer.z);
      
    • Sets this instance from the Cartesian point v

      Parameters

      Returns this

      This instance for chaining

      const around = new Cylindrical().setFromPoint3D(player.position);
      
    • Advanced

      Returns a string representation of these coordinates

      Returns string

      A string in the form [@pixi/3d/math:Cylindrical radius=1 theta=0 y=0]