ExhibitionItemModel

ExhibitionItemModel

This model contains all data of an exhibits and is filled by passing a data object from the loading process of ExhibitionProvider#load.

Constructor

new ExhibitionItemModel(data)

Source:
Parameters:
Name Type Description
data Object

Filled with data loaded in ExhibitionProvider#load

Members

artworks :Array.<number>

Description:
  • List of model ids of all artworks in this exhibit

Source:

List of model ids of all artworks in this exhibit

Type:
  • Array.<number>

collisionArea :Rect

Description:
  • Defines the collision box that is also used to create the physical mass object. If no height is specified, a sphere is created instead of a box. The width in this case is the radius.

Source:

Defines the collision box that is also used to create the physical mass object. If no height is specified, a sphere is created instead of a box. The width in this case is the radius.

Type:
  • Rect

elements :Array.<ExhibitionElementModel>

Description:
  • List of all artwork models

Source:

List of all artwork models

Type:

id :number

Description:
  • Unique identifier from the backend

Source:

Unique identifier from the backend

Type:
  • number

position :THREE.Vector3

Description:
  • 3D position of the whole exhibit (world space)

Source:

3D position of the whole exhibit (world space)

Type:
  • THREE.Vector3

rotation :number

Description:
  • 3D rotation of the whole exhibit (world space)

Source:

3D rotation of the whole exhibit (world space)

Type:
  • number

tags :Map.<string, number>

Description:
  • Tags are used to give each exhibit a profile that influences the visitor's profile through their viewing/activation. A tag consists of a unique key e.g. Politic and a value/importance between 0-10.

Source:

Tags are used to give each exhibit a profile that influences the visitor's profile through their viewing/activation. A tag consists of a unique key e.g. Politic and a value/importance between 0-10.

Type:
  • Map.<string, number>

transformFile :string

Description:
  • The position, rotation and collision area information can also be uploaded via a separate glb file in the backend. It contains only one 3D object. Its position and rotation are then determined by the values in the model. The collision area is created from the calculated bounding box of the object. By default, this is a sphere if the object name is _square, a box is used.

Source:

The position, rotation and collision area information can also be uploaded via a separate glb file in the backend. It contains only one 3D object. Its position and rotation are then determined by the values in the model. The collision area is created from the calculated bounding box of the object. By default, this is a sphere if the object name is _square, a box is used.

Type:
  • string

Methods

getElement(id) → {ExhibitionElementModel}

Description:
  • Searches the ExhibitionElementModels (artworks) for id and returns the model if it matches.

Source:
Parameters:
Name Type Description
id number
Returns:
Type
ExhibitionElementModel