mooball
    Preparing search index...

    Class Segment

    A class that defines a segment.

    Index

    Constructors

    Properties

    arcCenter: Point

    The calculated center point of this Segment. Only applies to curved Segments.

    arcRadius: Point

    The calculated radius of this Segment. Only applies to curved Segments.

    bCoef: number

    The bouncing coefficient of this Segment.

    bias: number

    Bias of this Segment.

    cGroup: number

    The collision group of this Segment.

    cMask: number

    The collision mask of this Segment.

    color: number

    The color of this Segment. Range: -1 <= color < 16777216.

    • This value can be converted into a rgba string via API's Utils.numberToColor function.
    • The special value -1 means transparent color.
    curveF: number

    The curving angle of this Segment. (in radians)

    normal: Point

    The calculated normal vector of this Segment. Only applies to non-curved Segments.

    textureId: number

    The texture id of this Segment. -1 = empty.

    v0: Vertex

    The first Vertex of this Segment.

    v0Normal: Point

    The calculated normal direction of the object's tangent line at v0. Only applies to curved Segments.

    v1: Vertex

    The second Vertex of this Segment.

    v1Normal: Point

    The calculated normal direction of the object's tangent line at v1. Only applies to curved Segments.

    vis: boolean

    Whether this Segment is visible or not.