RSX Code Reference
    Preparing search index...

    Class Layers

    Contains a list of layers that can be used for where an effect is being applied. This system can be used to determine which Camera can see a particular Renderable or which Rigidbody is intersected by a PhysicsScene raycast.

    A maximum of 8 layers is supported, but RSX could support more.

    Index
    allLayers: rsx.LayerMask

    The default bit value for LayerMasks. All layers are enabled.

    firstLayer: rsx.LayerMask

    The first layer bit value for LayerMasks.

    maximumLayerCount: 8

    The maximum number of layers.

    noLayers: rsx.LayerMask

    The default bit value for LayerMasks. No layers are enabled.

    • get names(): string[]

      Returns the names of all available layers.

      Returns string[]

    • Converts the array of activeBits into a single bigint.

      [1, 4, 8] would create a bigint with bits 1,4,8 enabled.

      Parameters

      • activeBits: number[]

        The array of active bits.

      Returns rsx.LayerMask

      Layermask as bigint.

    • Unpacks a layerBitMask into an array of active bit indices.

      A layerBitMask bits 1,4,8 enabled will result in the array [1,4,8].

      Parameters

      Returns number[]

      Array of active bit indices.