Options
All
  • Public
  • Public/Protected
  • All
Menu

The client-side Scene document which extends the common BaseScene model.

mixes

ClientDocumentMixin

see

Scenes The world-level collection of Scene documents

see

SceneConfig The Scene configuration application

Hierarchy

  • any
    • Scene

Index

Constructors

  • Returns Scene

Properties

_viewPosition: CanvasViewPosition = {}

Track the viewed position of each scene (while in memory only, not persisted) When switching back to a previously viewed scene, we can automatically pan to the previous position.

_view: boolean = ...

Track whether the scene is the active view

dimensions: any = ...

Determine the canvas dimensions this Scene would occupy, if rendered

playlistSound: any
foregroundElevation: any
thumb: any

Accessors

  • get thumbnail(): string
  • Provide a thumbnail image path used to represent this document.

    Returns string

  • get isView(): boolean
  • A convenience accessor for whether the Scene is currently viewed

    Returns boolean

Methods

  • activate(): Promise<Scene>
  • Set this scene as currently active

    Returns Promise<Scene>

    A Promise which resolves to the current scene once it has been successfully activated

  • Set this scene as the current view

    Returns Promise<Scene>

  • clone(createData?: {}, options?: {}): any
  • override

    Parameters

    • createData: {} = {}
      • options: {} = {}

        Returns any

      • prepareBaseData(): void
      • inheritdoc

        Returns void

      • Get the Canvas dimensions which would be used to display this Scene. Apply padding to enlarge the playable space and round to the nearest 2x grid size to ensure symmetry. The rounding accomplishes that the padding buffer around the map always contains whole grid spaces.

        Returns SceneDimensions

      • _onClickDocumentLink(event: any): any
      • inheritdoc

        Parameters

        • event: any

        Returns any

      • _preCreate(data: any, options: any, user: any): Promise<any>
      • override

        Parameters

        • data: any
        • options: any
        • user: any

        Returns Promise<any>

      • _onCreate(data: any, options: any, userId: any): void
      • override

        Parameters

        • data: any
        • options: any
        • userId: any

        Returns void

      • _preUpdate(data: any, options: any, user: any): Promise<any>
      • override

        Parameters

        • data: any
        • options: any
        • user: any

        Returns Promise<any>

      • _onUpdate(data: any, options: any, userId: any): any
      • override

        Parameters

        • data: any
        • options: any
        • userId: any

        Returns any

      • _preDelete(options: any, user: any): Promise<void>
      • inheritdoc

        Parameters

        • options: any
        • user: any

        Returns Promise<void>

      • _onDelete(options: any, userId: any): void
      • override

        Parameters

        • options: any
        • userId: any

        Returns void

      • _preCreateEmbeddedDocuments(embeddedName: any, result: any, options: any, userId: any): void
      • inheritdoc

        Parameters

        • embeddedName: any
        • result: any
        • options: any
        • userId: any

        Returns void

      • _onCreateEmbeddedDocuments(...args: any[]): void
      • inheritdoc

        Parameters

        • Rest ...args: any[]

        Returns void

      • _preUpdateEmbeddedDocuments(embeddedName: any, result: any, options: any, userId: any): void
      • inheritdoc

        Parameters

        • embeddedName: any
        • result: any
        • options: any
        • userId: any

        Returns void

      • _onUpdateEmbeddedDocuments(...args: any[]): void
      • override

        Parameters

        • Rest ...args: any[]

        Returns void

      • _preDeleteEmbeddedDocuments(embeddedName: any, result: any, options: any, userId: any): void
      • inheritdoc

        Parameters

        • embeddedName: any
        • result: any
        • options: any
        • userId: any

        Returns void

      • _onDeleteEmbeddedDocuments(...args: any[]): void
      • inheritdoc

        Parameters

        • Rest ...args: any[]

        Returns void

      • toCompendium(pack: any, options?: {}): any
      • inheritdoc

        Parameters

        • pack: any
        • options: {} = {}

          Returns any

        • createThumbnail([options]?: { img: string; width: number; height: number; format: string; quality: number }): Promise<any>
        • Create a 300px by 100px thumbnail image for this scene background

          Parameters

          • [options]: { img: string; width: number; height: number; format: string; quality: number } = {}

            Options which modify thumbnail creation

            • img: string
            • width: number
            • height: number
            • format: string
            • quality: number

          Returns Promise<any>

          The created thumbnail data.

        • _onActivate(active: boolean): any
        • Handle Scene activation workflow if the active state is changed to true

          Parameters

          • active: boolean

            Is the scene now active?

          Returns any