Snapshot

Description

Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts

The Snapshot API provides access to the path that snapshots are saved to. This path is that provided in Settings > General > Snapshots. Snapshots may be taken using Window API functions such as Window.takeSnapshot.

Methods

Name Return Value Summary
getAnimatedSnapshotFormat Array.<string>

Gets the currently selected animated snapshot format.

getAvailableAnimatedSnapshotFormats Array.<string>

Returns a list of supported animated snapshot formats.

getAvailableAnimatedSnapshotFormatsWithDescriptions Array.<string>

Returns a list of supported animated snapshot formats with short descriptions.

getAvailableSnapshotFormats Array.<string>

Returns a list of supported snapshot formats.

getAvailableSnapshotFormatsWithDescriptions Array.<string>

Returns a list of supported snapshot formats with short descriptions.

getSnapshotFormat string

Gets the currently selected snapshot format.

getSnapshotsLocation string

Gets the path that snapshots are saved to.

setAnimatedSnapshotFormat None

Sets the snapshot format.

setSnapshotFormat None

Sets the snapshot format.

setSnapshotsLocation None

Sets the path that snapshots are saved to.

Signals

Name Summary
snapshotLocationSet

Triggered when the path that snapshots are saved to is changed.

Method Details

(static) getAnimatedSnapshotFormat( ) → {Array.<string>}
Returns: Currently selected snapshot format.

Gets the currently selected animated snapshot format.

(static) getAvailableAnimatedSnapshotFormats( ) → {Array.<string>}
Returns: List of supported animated snapshot formats.

Returns a list of supported animated snapshot formats.

(static) getAvailableAnimatedSnapshotFormatsWithDescriptions( ) → {Array.<string>}
Returns: List of supported animated snapshot formats with short descriptions.

Returns a list of supported animated snapshot formats with short descriptions.

(static) getAvailableSnapshotFormats( ) → {Array.<string>}
Returns: List of supported snapshot formats.

Returns a list of supported snapshot formats.

(static) getAvailableSnapshotFormatsWithDescriptions( ) → {Array.<string>}
Returns: List of supported snapshot formats with short descriptions.

Returns a list of supported snapshot formats with short descriptions.

(static) getSnapshotFormat( ) → {string}
Returns: Currently selected snapshot format.

Gets the currently selected snapshot format.

(static) getSnapshotsLocation( ) → {string}
Returns: The path to save snapshots to.

Gets the path that snapshots are saved to.

(static) setAnimatedSnapshotFormat( format )

Sets the snapshot format.

Parameters

Name Type Description
format String

one of the format names returned by Snapshot.getAvailableSnapshotFormats().

(static) setSnapshotFormat( format )

Sets the snapshot format.

Parameters

Name Type Description
format String

one of the format names returned by Snapshot.getAvailableSnapshotFormats().

(static) setSnapshotsLocation( location )

Sets the path that snapshots are saved to.

Parameters

Name Type Description
location String

The path to save snapshots to.

Signal Details

snapshotLocationSet( location )
Returns: Signal

Triggered when the path that snapshots are saved to is changed.

Parameters

Name Type Description
location string

The new snapshots location.

Example

Report when the snapshots location is changed.

// Run this script then change the snapshots location in Settings > General > Snapshots.
Snapshot.snapshotLocationSet.connect(function (path) {
    print("New snapshot location: " + path);
});