data. SceneData

The data schema for a Scene document.


new SceneData(data, documentopt)

  • BaseScene
Name Type Attributes Default Description
_id string

The _id which uniquely identifies this Scene document

name string

The name of this scene

active boolean <optional>

Is this scene currently active? Only one scene may be active at a given time.

navigation boolean <optional>

Is this scene displayed in the top navigation bar?

navOrder number <optional>

The integer sorting order of this Scene in the navigation bar relative to others

navName string <optional>

A string which overrides the canonical Scene name which is displayed in the navigation bar

img string | null <optional>

An image or video file path which provides the background media for the scene

foreground string | null <optional>

An image or video file path which is drawn on top of all other elements in the scene

thumb string | null <optional>

A thumbnail image (base64) or file path which visually summarizes the scene

width number <optional>

The width of the scene canvas, this should normally be the width of the background media

height number <optional>

The height of the scene canvas, this should normally be the height of the background media

padding number <optional>

The proportion of canvas padding applied around the outside of the scene dimensions to provide additional buffer space

initial Object | null <optional>

The initial view coordinates for the scene, or null

backgroundColor string | null <optional>

The color of the canvas which is displayed behind the scene background

gridType number <optional>

The type of grid used in this scene, a number from CONST.GRID_TYPES

grid number <optional>

The grid size which represents the width (or height) of a single grid space

shiftX number <optional>

A number of offset pixels that the background image is shifted horizontally relative to the grid

shiftY number <optional>

A number of offset pixels that the background image is shifted vertically relative to the grid

gridColor string | null <optional>

A string representing the color used to render the grid lines

gridAlpha number <optional>

A number between 0 and 1 for the opacity of the grid lines

gridDistance number <optional>

The number of distance units which are represented by a single grid space.

gridUnits string <optional>

A label for the units of measure which are used for grid distance.

tokenVision boolean <optional>

Do Tokens require vision in order to see the Scene environment?

fogExploration boolean <optional>

Should fog exploration progress be tracked for this Scene?

fogReset number <optional>

The timestamp at which fog of war was last reset for this Scene.

globalLight boolean <optional>

Does this Scene benefit from global illumination which provides bright light everywhere?

darkness number <optional>

The ambient darkness level in this Scene, where 0 represents mid-day (maximum illumination) and 1 represents mid-night (maximum darkness)

globalLightThreshold number <optional>

A darkness level between 0 and 1, beyond which point global illumination is temporarily disabled if globalLight is true.

drawings Collection.<BaseDrawing> <optional>

A collection of embedded Drawing objects.

tiles Collection.<BaseTile> <optional>

A collection of embedded Tile objects.

tokens Collection.<BaseToken> <optional>

A collection of embedded Token objects.

lights Collection.<BaseAmbientLight> <optional>

A collection of embedded AmbientLight objects.

notes Collection.<BaseNote> <optional>

A collection of embedded Note objects.

sounds Collection.<BaseAmbientSound> <optional>

A collection of embedded AmbientSound objects.

templates Collection.<BaseMeasuredTemplate> <optional>

A collection of embedded MeasuredTemplate objects.

walls Collection.<BaseWall> <optional>

A collection of embedded Wall objects

playlist BasePlaylist <optional>

A linked Playlist document which should begin automatically playing when this Scene becomes active.

playlistSound BasePlaylistSound <optional>

A linked PlaylistSound document from the selected playlist that will begin automatically playing when this Scene becomes active.

journal JournalEntry <optional>

A linked JournalEntry document which provides narrative details about this Scene.

weather string <optional>

A named weather effect which should be rendered in this Scene.

folder string | null

The _id of a Folder which contains this Actor

sort number <optional>

The numeric sort value which orders this Actor relative to its siblings

permission object <optional>

An object which configures user permissions to this Scene

flags object <optional>

An object of optional key/value flags

Name Type Attributes Description
data object

Initial data used to construct the data object

document BaseScene <optional>

The document to which this data object belongs


  • DocumentData