ExhibitionVisitorModel

ExhibitionVisitorModel

Model contains the preferences of the visitor generated from the tags of the viewed artworks.

Constructor

new ExhibitionVisitorModel(profile)

Source:
Parameters:
Name Type Description
profile Map.<string, number>

Extends

  • EventTarget

Members

(private) currentPreference_ :ExhibitionVisitorPreverenceModel

Description:
  • Last added preference model

Source:

Last added preference model

Type:

history :Array.<ExhibitionVisitorPreverenceModel>

Description:
  • List of all preference models that have influenced the visitor in the past

Source:

List of all preference models that have influenced the visitor in the past

Type:

profile :Map.<string, number>

Description:
  • Presents a list of all known tags and their value/importance to the user based preferences.

Source:

Presents a list of all known tags and their value/importance to the user based preferences.

Type:
  • Map.<string, number>

Methods

addPreference(itemId, elementId, tags) → {ExhibitionVisitorPreverenceModel}

Description:
  • Adds a new Preference

Source:
Parameters:
Name Type Description
itemId number

Id of the exhibit

elementId number

Id of the artwork inside the exhibit

tags Map.<string, number>

List of belonging tags of the artwork

Returns:
Type
ExhibitionVisitorPreverenceModel

caluculateEqualityFactor(tags)

Description:
  • Calculates a value between 0 and 1 for the display of the importance of each tag depending on the total number of all known tags.

Source:
Parameters:
Name Type Description
tags Map.<string, number>

completeCurrentPreference()

Description:
  • This method is called after leaving an activation area of a exhibit to stop the visit time. The visit time influences the calculation of the value/importance of the different tags.

Source:

currentPreferenceHasTag(tag) → {boolean}

Description:
  • Checks if the current preference contains a specific tag.

Source:
Parameters:
Name Type Description
tag string
Returns:
Type
boolean

updateProfile(delta, changeAmount) → {Map.<string, number>}

Description:
  • This method is called in the main render process of the WebGLRenderer to recalculate the values of the visitor profile.

Source:
Parameters:
Name Type Description
delta number
changeAmount number
Returns:
Type
Map.<string, number>