ProtoTwin API
    Preparing search index...

    Class Clipboard

    Entity clipboard.

    Allows entities to be copied and pasted.

    Entities may be copied once and pasted multiple times. Entities may be removed from the virtual world after being copied. Copying an entity also copies all its descendants in the hierarchy.

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get empty(): boolean

      Whether the clipboard is empty.

      Returns boolean

    Methods

    • Clears the clipboard.

      Returns void

    • Copies a single entity.

      Parameters

      Returns void

    • Copies multiple entities.

      Parameters

      • entities: readonly Entity[]

        The list of entities to be copied.

      Returns void

    • Pastes all copied entities.

      Parameters

      Returns Entity[]

      The list of duplicated entities, corresponding to the entities that were copied.

      The descendants of the copied entities are not returned.