@minecraft/server-editor
    Preparing search index...

    Interface ITimelinePlayerBeta

    A pane that hosts a single playhead and a collection of timeline entries that share it

    interface ITimelinePlayer {
        enable: boolean;
        entryCount: number;
        id: string;
        paneId: string;
        typeName: PropertyItemType;
        visible: boolean;
        addGroup(
            id: string,
            name: LocalizedString,
            tooltip?: LocalizedString,
        ): void;
        addVector3Timeline(
            options: IVector3TimelinePlayerEntryOptions,
        ): IVector3TimelinePlayerEntry;
        getDuration(): number;
        getEntryById(id: string): ITimelinePlayerEntry | undefined;
        getEntryByIndex(index: number): ITimelinePlayerEntry | undefined;
        getGroups(): ITimelinePlayerGroup[];
        getPlaybackState(): TimelinePlayerPlaybackState;
        getPrecision(): number;
        getSelectedGroupId(): string;
        getTime(): number;
        hide(): void;
        removeEntry(id: string): boolean;
        removeGroup(id: string): void;
        renameGroup(id: string, newName: LocalizedString): void;
        setDuration(duration: number): void;
        setPlaybackState(state: TimelinePlayerPlaybackState): void;
        setPrecision(precision: number): void;
        setSelectedGroupId(id: string): void;
        setTime(time: number): void;
        show(): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    enable: boolean

    If the item is enabled in the UI.

    entryCount: number

    Number of timeline entries owned by this player.

    id: string

    Unique ID for the property item.

    paneId: string

    The parent pane id.

    The type name of the target property.

    visible: boolean

    If the item should be visible in the UI.

    Methods

    • Beta

      Parameters

      • id: string

        Unique identifier for the group.

      • name: LocalizedString

        Localized display name for the group.

      • Optionaltooltip: LocalizedString

        Optional localized tooltip shown when hovering over the dropdown entry.

      Returns void

      Add a group to the dropdown.

    • Beta

      Returns number

      Get the total duration in seconds.

    • Beta

      Parameters

      • id: string

        Entry identifier.

      Returns ITimelinePlayerEntry | undefined

      Look up an entry by id.

    • Beta

      Parameters

      • index: number

        Entry index.

      Returns ITimelinePlayerEntry | undefined

      Look up an entry by index.

    • Beta

      Returns number

      Get the decimal precision used for keyframe time spacing.

    • Beta

      Returns string

      Get the currently selected group identifier.

    • Beta

      Returns number

      Get the playhead time in seconds.

    • Beta

      Returns void

      Hide the pane.

    • Beta

      Parameters

      • id: string

        Entry identifier.

      Returns boolean

      Remove an entry by id.

    • Beta

      Parameters

      • id: string

        Identifier of the group to remove.

      Returns void

      Remove a group from the dropdown.

    • Beta

      Parameters

      • id: string

        Identifier of the group to rename.

      • newName: LocalizedString

        New localized display name.

      Returns void

      Rename a group in the dropdown.

    • Beta

      Parameters

      • duration: number

        New duration in seconds.

      Returns void

      Set the total duration in seconds.

    • Beta

      Parameters

      • precision: number

        Decimal precision.

      Returns void

      Set the decimal precision used for keyframe time spacing.

    • Beta

      Parameters

      • id: string

        Identifier of the group to select.

      Returns void

      Set the selected group.

    • Beta

      Parameters

      • time: number

        New playhead time in seconds.

      Returns void

      Set the playhead time.

    • Beta

      Returns void

      Show the pane and all of its items.