class sap.ui.vk.threejs.ContentManager

Visiblity: protected
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vk/threejs/ContentManager
Application Component: CA-UI5-VTK

Provides a content manager object that uses the three.js library to load 3D files.

When registering a content manager resolver with sap.ui.vk.ContentConnector.addContentManagerResolver you can pass a function that will load a model and merge it into the three.js scene.

The loader function takes two parameters:

The loader function returns a Promise object. If the loading the model succeeds the promise object resolves with a value with the following structure:

Documentation links:


Constructor

Constructor for a new ContentManager.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

This class does not have its own settings, but all settings applicable to the base type sap.ui.vk.ContentManager can be used.

new sap.ui.vk.threejs.ContentManager(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new ContentManager object. Generated automatically if no ID is given.

mSettings? object

Initial settings for the new ContentManager object.


Methods Overview

Method Description
collectGarbage

Collects and destroys unused objects and resources.

createOrthographicCamera

Creates an Orthographic camera

createPerspectiveCamera

Creates a Perspective camera

destroyContent

Destroys the content.

sap.ui.vk.threejs.ContentManager.extend

Creates a new subclass of class sap.ui.vk.threejs.ContentManager with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.vk.ContentManager.extend.

sap.ui.vk.threejs.ContentManager.getMetadata

Returns a metadata object for class sap.ui.vk.threejs.ContentManager.

loadContent

Starts downloading and building or updating the content from the content resources.

This method is asynchronous.

collectGarbage

Collects and destroys unused objects and resources.

createOrthographicCamera

Creates an Orthographic camera

createPerspectiveCamera

Creates a Perspective camera

destroyContent

Destroys the content.

Param Type DefaultValue Description
content any

The content to destroy.

sap.ui.vk.threejs.ContentManager.extend

Creates a new subclass of class sap.ui.vk.threejs.ContentManager with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.vk.ContentManager.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

sap.ui.vk.threejs.ContentManager.getMetadata

Returns a metadata object for class sap.ui.vk.threejs.ContentManager.

loadContent

Starts downloading and building or updating the content from the content resources.

This method is asynchronous.

Param Type DefaultValue Description
content any

The current content to update. It can be null if this is an initial loading call.

contentResources sap.ui.vk.ContentResource[]

The content resources to load or update.