Documentation - v20.0.0-dev
    Preparing search index...

    Moves the given objects (meshes, sprites…) to a layer: a layer is drawn over the layers below it, whatever their depth (see SceneObject.layer). Undoable.

    Hierarchy

    Index

    Constructors

    • Parameters

      • viewer: Viewer

        The viewer of the objects.

      • uuids: Iterable<string>

        The objects moved.

      • layer: MeshLayer

        The engine's MeshLayer they are drawn in.

      Returns SetObjectsLayerCommand

    Properties

    _objects: SceneObject[]
    _state: PartialState<TState>
    isUndoable: boolean = true

    Indicates whether the command is undoable and redoable

    isUpdatable: boolean = false

    Indicated whether the command can be updated

    name: "SetObjectsLayerCommand" = 'SetObjectsLayerCommand'

    Name of the command

    viewer: Viewer

    Accessors

    • get hasBeenExecuted(): boolean

      Returns boolean

    Methods

    • Cleans the command footprint.

      Returns Promise<void>

    • Actions to execute during the execute method

      Returns Promise<Partial<ObjectState & RestoreState>>

    • Actions to execute during the undo method

      Returns Promise<void>

    • Update the current state of the command when the update method is called

      Returns void

    • Parameters

      • cmd: this

      Returns boolean

    • Toggle the command

      Parameters

      Returns Promise<void | Partial<ObjectState>>

    • Undo the command

      Parameters

      Returns Promise<void>

    • Update the current state of the command and push the new state in history

      Parameters

      • ...params: unknown[]

        The new values of the command's state

      Returns Promise<void>