Preparing search index...

    Represents an immutable set of scene layers, supporting set operations like union, intersection, and difference.

        const allSet = Editor.Model.LayerSet.All;
    const noneSet = Editor.Model.LayerSet.None;

    console.log(`All set is empty: ${allSet.isEmpty()}`);
    console.log(`None set is empty: ${noneSet.isEmpty()}`);
    console.log(`All set mask: ${allSet.mask}`);

    const setA = Editor.Model.LayerSet.fromId(Editor.Model.LayerId.Default);
    const setB = Editor.Model.LayerSet.fromId(Editor.Model.LayerId.Ortho);

    const union = setA.union(setB);
    const intersection = setA.intersect(setB);
    const difference = setA.except(setB);

    console.log(`setA contains Default: ${setA.contains(Editor.Model.LayerSet.fromId(Editor.Model.LayerId.Default))}`);
    console.log(`Union mask: ${union.mask}`);
    console.log(`Intersection is empty: ${intersection.isEmpty()}`);
    console.log(`Difference mask: ${difference.mask}`);

    // Reconstruct a LayerSet from a raw bitmask
    const fromMask = Editor.Model.LayerSet.fromMask(union.mask);
    console.log(`fromMask equals union: ${fromMask.mask === union.mask}`);

    const predefined = Editor.Model.LayerSet.PredefinedIds();
    console.log(`Predefined ids mask: ${predefined.mask}`);
    Index

    Constructors

    Properties

    A LayerSet containing all available layers.

    mask: number

    The underlying bitmask representing the set of active layers.

    None: LayerSet

    An empty LayerSet containing no layers.

    Methods

    • Returns true if this set contains all layers in the given LayerSet.

      Parameters

      Returns boolean

    • Creates a LayerSet from a single bit index.

      Parameters

      • bit: number

      Returns LayerSet

    • Creates a LayerSet from a raw bitmask value.

      Parameters

      • mask: number

      Returns LayerSet

    • Returns true if this set contains no layers.

      Returns boolean

    • Returns the collection of predefined layer identifiers.

      Returns LayerSet

    • Returns an array of all LayerId values in this set.

      Returns LayerId[]