Description
Supported Script Types: Interface Scripts • Client Entity Scripts • Avatar Scripts
TheClipboard
API enables you to export and import entities to and from JSON files.Methods
Name | Return Value | Summary |
---|---|---|
exportEntities
|
boolean |
Exports specified entities to a JSON file. |
exportEntities
|
boolean |
Exports all entities that have centers within a cube to a JSON file. |
getClipboardContentsLargestDimension
|
number |
Gets the largest dimension of the extents of the entities held in the clipboard. |
getContentsDimensions
|
Vec3 |
Gets the extents of the entities held in the clipboard. |
importEntities
|
boolean |
Imports entities from a JSON file into the clipboard. |
pasteEntities
|
Array.<Uuid> |
Pastes the contents of the clipboard into the domain. |
Method Details
(static) exportEntities( filename, entityIDs ) → {boolean}
Returns: true if entities were found and the file was written, otherwise false .
|
|||||||||
---|---|---|---|---|---|---|---|---|---|
Exports specified entities to a JSON file. Parameters
Example
|
(static) exportEntities( filename, x, y, z, scale ) → {boolean}
Returns: true if entities were found and the file was written, otherwise false .
|
||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Exports all entities that have centers within a cube to a JSON file. Parameters
|
(static) getClipboardContentsLargestDimension( ) → {number}
Returns: The largest dimension of the extents of the content held in the clipboard. |
---|
Gets the largest dimension of the extents of the entities held in the clipboard. |
(static) getContentsDimensions( ) → {Vec3}
Returns: The extents of the content held in the clipboard. |
---|
Gets the extents of the entities held in the clipboard. Example
|
(static) importEntities( filename, isObservableopt, callerIDopt ) → {boolean}
Returns: true if the import was successful, otherwise false .
|
||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Imports entities from a JSON file into the clipboard. Parameters
Example
|
(static) pasteEntities( position, entityHostTypeopt ) → {Array.<Uuid>}
Returns: The IDs of the new entities that were created as a result of the paste operation. If entities couldn't be created then an empty array is returned. |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Pastes the contents of the clipboard into the domain. Parameters
|