Creates a new database from data loaded from an Articy JSON file
JS object parsed from a Articy JSON file
A function that resolves asset reference paths from the Articy JSON into real paths on the disk/web
Unique database instance ID
Localization provider. Use this to switch the active language or to manually request the localized value of a string.
Gets information about the loaded project (name, guid, etc.)
Resolves the full filename of an asset given its ID
Asset Id
Absolute path using the assetResolver
passed into the database constructor.
Resolves the full filename of an asset given its reference name
Asset Reference
Absolute path using the assetResolver
passed into the database constructor
Gets the IDs of all children of a given object
Object ID
IDs of all its children
Returns a list of children of a given node that match a given type
Object ID
Type class to match against
All children of the object that match the type
Gets the definition of a given template/class type
Type name
Definition from Articy JSON, including specifications for its properties and features
Returns the display name for a given enum value
Enum technical name
Numeric enumeration value
Display name for that enum value
Returns the properties block of an object
Properties block interface
Template block interface
Object ID
Model
Returns all models of a given type (or that derive from that type). A model is just an object that contains both the properties block and the template block.
Properties block interface
Template block interface
Type string
Finds all models whose template has a given feature
Interface of the feature type
Name of the feature to improve return type deduction
Name of the feature in the template
All models whose templates contain the feature
Loads an Articy Object wrapped in a registered Javascript class associated with the type. See ArticyType and RegisterDatabaseTypeClass.
A note about types: getObject
will always return an instance of the most specific
registered class type associated with the requested data, regardless of the value of the type
parameter.
The type
parameter predominately functions as a type check. The method returns undefined
if the parameter in type
is not equal to or a base class of the registered type.
Type returned by the constructor in the type
parameter
Object ID
Constructor for the registered class to wrap the object with
an instance of ObjectType
or undefined if there is a type-mismatch or the object can't be found
Loads an Articy Object into a given JS class by technical name (with type safety). Similar to getObject but uses the TechnicalName.
Technical name to search by
Object type
Object, or undefined if no object has that technical name or it doesn't match the given type
Returns objects of a given type with a given feature name. This is a special type-safe version that works only with features that are a part of the GlobalFeatures interface.
Name of the feature to improve return type deduction
Object type
Name of the feature to search for
Object type to return
All objects that have the given feature
Returns objects of a given type with a given feature name
Name of the feature to search for
Object type to return
All objects matching the given type that have the given feature
Finds an object's parent in the hierarchy
Id of the object to get the parent of
That ID of that object's parent, or null if there is none.
Returns the type string of a given object ID
Object ID to lookup
Type string, like "DialogueFragment" or "MyCustomTemplate"
Quick check to see if a given object is of a given type
Object ID to check
Type to check against (can either be the technical name of the type like "FlowFragment" or a registered class like FlowFragment)
true if the object is of that type (or of a type that derives from it)
Checks if type is an instance of another type
Type name
Type or base type name
If the types are equal or the type derives from the other type
Creates a new global variable store with initial values loaded from the database.
A variable store
Prints errors to the console if there are script methods in the Articy JSON that haven't been registered using RegisterScriptFunction.
Generated using TypeDoc
A read-only Database wrapping data loaded from a JSON file exported from Articy.
Most applications will only have one global database instance containing all their story data. The easiest way to manage a database object is to export it from its own module, like so:
Then you can access it easily via an import statement like
Access objects like Entities, Flow Fragments, or Locations by Id using getObject. Accessed objects will be automatically wrapped in classes registered via RegisterDatabaseTypeClass or ArticyType.