ExhibitionProvider

ExhibitionProvider

This provider (singleton) handles the communication with the backend. It loads all relevant data and prepares the data in various model objects and provides them to the application for building the 3D scene and the content layers.

Constructor

new ExhibitionProvider()

Source:

Extends

  • EventTarget

Members

(private) dataCompleter_ :Completer

Description:
  • Completer is a helper which returns a promise. Its solved if the general exhibition data is loaded.

Source:

Completer is a helper which returns a promise. Its solved if the general exhibition data is loaded.

Type:
  • Completer

(private) dracoLoader_ :THREE.DRACOLoader

Source:
Type:
  • THREE.DRACOLoader

excludedItemIds

Description:
  • Setter

Source:

Setter

excludedItemIds

Description:
  • Getter

Source:

Getter

(private) excludedItemIds_ :Array.<number>

Description:
  • List of defined exhibit ids that should not be displayed in the mobile view due to their size or structure to improve mobile performance.

Source:

List of defined exhibit ids that should not be displayed in the mobile view due to their size or structure to improve mobile performance.

Type:
  • Array.<number>

(private) gltfLoader_ :THREE.GLTFLoader

Source:
Type:
  • THREE.GLTFLoader

info

Description:
  • Getter

Source:

Getter

(private) infoCompleter_ :Completer

Description:
  • Completer is a helper which returns a promise. Its solved if the visitor info data is loaded.

Source:

Completer is a helper which returns a promise. Its solved if the visitor info data is loaded.

Type:
  • Completer

(private) info_ :Array.<{type:string, text:string}>

Description:
  • List of info objects for generating the artwork info layer. Will be filled with backend data.

Source:

List of info objects for generating the artwork info layer. Will be filled with backend data.

Type:
  • Array.<{type:string, text:string}>

items

Description:
  • Getter

Source:

Getter

(private) items_ :Array.<ExhibitionItemModel>

Description:
  • List of all exhibit model items

Source:

List of all exhibit model items

Type:

(private) loadProgress :number

Description:
  • Loading progress of the exhibition. Is used for the main loader at the beginning.

Source:

Loading progress of the exhibition. Is used for the main loader at the beginning.

Type:
  • number

physicBodyReferences :Map.<number, string>

Description:
  • List to assign Cannon body ids (number) to THREE objects names (string)

Source:

List to assign Cannon body ids (number) to THREE objects names (string)

Type:
  • Map.<number, string>

reflectionTexture

Description:
  • Getter

Source:

Getter

(private) reflectionTexture_ :THREE.Texture

Description:
  • Save the reflection texture used for all 3D objects.

Source:

Save the reflection texture used for all 3D objects.

Type:
  • THREE.Texture

(private) textureLoader_ :THREE.TextureLoader

Source:
Type:
  • THREE.TextureLoader

(private) videoData_ :Map.<string, Object>

Description:
  • Saves the already loaded Vimeo video data in a list

Source:

Saves the already loaded Vimeo video data in a list

Type:
  • Map.<string, Object>

visitor

Description:
  • Getter

Source:

Getter

(private) visitor_ :ExhibitionVisitorModel

Description:
  • Represents a model with the preferences of the visitor generated from the tags of the viewed artworks.

Source:

Represents a model with the preferences of the visitor generated from the tags of the viewed artworks.

Type:

Methods

addPreference(itemId, elementId)

Description:
  • Adds a new visitor preference

Source:
Parameters:
Name Type Description
itemId number

Id of the exhibit

elementId number

Id of the artwork in the exhibit

(private) generateItems_(result)

Description:
Source:
Parameters:
Name Type Description
result Array.<Object>

load() → {Promise}

Description:
  • Load the general structure of the exhibition from the backend via the POST service /get-exhibition-data. For local development, the URL parameter backend=0 can be used to replace the request by loading the public/json/exhibition.json.

Source:
Returns:
Type
Promise

loadInfo() → {Promise}

Description:
  • Load the visitor info from the backend via the POST service /get-info-data. For local development, the URL parameter backend=0 can be used to replace the request by loading the public/json/visitor-info.json.

Source:
Returns:
Type
Promise

loadReflectionTexture(progressCallbackopt) → {Promise}

Description:
  • Loads all texture files for a THREE cube texture (used as a reflection) and returns a loading Promise

Source:
Parameters:
Name Type Attributes Default Description
progressCallback function <optional>
null
Returns:
Type
Promise

loadSceneObject(filePath, progressCallbackopt) → {Promise}

Description:
  • Loads a glb file and returns a loading Promise

Source:
Parameters:
Name Type Attributes Default Description
filePath string
progressCallback function <optional>
null
Returns:
Type
Promise

loadTextureFile(filePath, progressCallbackopt) → {Promise}

Description:
  • Loads a texture file and returns a loading Promise

Source:
Parameters:
Name Type Attributes Default Description
filePath string
progressCallback function <optional>
null
Returns:
Type
Promise

loadVideoData(mediaId) → {Promise}

Description:
  • Loads Vimeo video info to a video id via the POST service /get-video-data.

Source:
Parameters:
Name Type Description
mediaId string
Returns:
Type
Promise

ready() → {Promise}

Description:
  • Can be called to receive a Promise that is triggered when the main exhibition data loading process is completed.

Source:
Returns:
Type
Promise