SceneData

data. SceneData

The data schema for a Scene document.

Constructor

new SceneData(data, documentopt)

See:
  • BaseScene
Properties:
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>
false

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

navigation boolean <optional>
false

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 <optional>

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

thumb string <optional>

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

width number <optional>
4000

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

height number <optional>
3000

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

padding number <optional>
0.25

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

initial Object | null <optional>
null

The initial view coordinates for the scene, or null

backgroundColor string <optional>
#999999

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

gridType number <optional>
1

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

grid number <optional>
100

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

shiftX number <optional>
0

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

shiftY number <optional>
0

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

gridColor string <optional>
#000000

A string representing the color used to render the grid lines

gridAlpha number <optional>
0.2

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>
true

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

fogExploration boolean <optional>
true

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>
false

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

darkness number <optional>
0

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.

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 Actor

flags object <optional>
{}

An object of optional key/value flags

Parameters:
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

Extends

  • DocumentData

Methods

_initialize()