Class sap.ui.vk.GraphicsCoreModule: sap/ui/vk/GraphicsCore


Loads the DVL library, wraps it, and makes the wrapper available for the application.

Example:

   var oGraphicsCore = new GraphicsCore();

Experimental API:Since 1.32.0 This class is experimental and might be modified or removed in future versions.

Constructor Summary
new sap.ui.vk.GraphicsCore(runtimeSettings, webGLContextAttributes)Constructor for a new GraphicsCore.
Method Summary
sap.ui.vk.GraphicsCore.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.vk.GraphicsCore with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.vk.GraphicsCore.getMetadata()Returns a metadata object for class sap.ui.vk.GraphicsCore.
buildSceneTree(contentResources)Builds a scene tree from the hierarchy of content resources.
collectGarbage()Collects and destroys unused objects and resources.
createViewStateManager(nodeHierarchy)Creates a new ViewStateManager object.
destroyScene(vkScene)Destroys the scene object.
destroyViewStateManager(viewStateManager)Destroys the ViewStateManager object created with the createViewStateManager method.
getApi(apiId)Gets one of APIs supported by the DVL library.
loadContentResourcesAsync(contentResources, onComplete)Loads content resources.
showDebugInfo(enable)Shows or hides debug information in the viewports.
updateSceneTree(vkScene, contentResources)Updates or rebuilds a scene tree from the hierarchy of content resources.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.vk.GraphicsCore(runtimeSettings, webGLContextAttributes)
Constructor for a new GraphicsCore.
Parameters:
{object}runtimeSettings The Emscripten runtime settings.
{int}runtimeSettings.totalMemory The size of Emscripten module memory in bytes.
{string}runtimeSettings.logElementId The ID of a textarea DOM element to write the log to.
{string}runtimeSettings.statusElementId The ID of a DOM element to write the status messages to.
{object}webGLContextAttributes The WebGL context attributes. See WebGL context attributes.
Method Detail
sap.ui.vk.GraphicsCore.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.vk.GraphicsCore 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.base.EventProvider.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.vk.GraphicsCore.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.vk.GraphicsCore.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
buildSceneTree(contentResources): sap.ui.vk.Scene
Builds a scene tree from the hierarchy of content resources. The content resources must be already loaded.
Parameters:
{sap.ui.vk.ContentResource[]}contentResources The array of content resources to build the scene from.
Returns:
{sap.ui.vk.Scene} The scene built from the content resources.
collectGarbage(): sap.ui.vk.GraphicsCore
Collects and destroys unused objects and resources.

Experimental API:since version 1.34.1. The behavior might change in the next version.

Experimental:
since version 1.34.1. The behavior might change in the next version.
Returns:
{sap.ui.vk.GraphicsCore}this to allow method chaining.
createViewStateManager(nodeHierarchy): sap.ui.vk.ViewStateManager
Creates a new ViewStateManager object.

GraphicsCore owns the new ViewStateManager object. The object must be destroyed with the destroyViewStateManager method;

Parameters:
{sap.ui.vk.NodeHierarchy}nodeHierarchy The NodeHierarchy object the view state manager is created for.
Returns:
{sap.ui.vk.ViewStateManager} The newly created ViewStateManager object.
destroyScene(vkScene): sap.ui.vk.GraphicsCore
Destroys the scene object.
Parameters:
{sap.ui.vk.Scene}vkScene The scene to destroy.
Returns:
{sap.ui.vk.GraphicsCore}this to allow method chaining.
destroyViewStateManager(viewStateManager): sap.ui.vk.GraphicsCore
Destroys the ViewStateManager object created with the createViewStateManager method.
Parameters:
{sap.ui.vk.ViewStateManager}viewStateManager The ViewStateManagerObject to destroy.
Returns:
{sap.ui.vk.GraphicsCore}this to allow method chaining.
getApi(apiId): object
Gets one of APIs supported by the DVL library.

Experimental API:since version 1.32.0. The behavior might change in the next version.

Parameters:
{sap.ui.vk.GraphicsCoreApi}apiId The API identifier.
Experimental:
since version 1.32.0. The behavior might change in the next version.
Returns:
{object} The object that implements the requested API or null if the API is not supported.
loadContentResourcesAsync(contentResources, onComplete): sap.ui.vk.GraphicsCore
Loads content resources.

Content resources can be downloaded from a URL or loaded from a local file.

Parameters:
{sap.ui.vk.ContentResource[]}contentResources The content resources to build the scene from.
{function}onComplete The callback function to call when all content resources are processed. The callback takes one parameter sourcesFailedToLoad - an array of the 'source' attribute values that are failed to be loaded.
Returns:
{sap.ui.vk.GraphicsCore}this to allow method chaining.
showDebugInfo(enable): sap.ui.vk.GraphicsCore
Shows or hides debug information in the viewports.

Experimental API:since version 1.32.0. The behavior might change in the next version.

Parameters:
{boolean}enabletrue to show debug information, false to hide debug information.
Experimental:
since version 1.32.0. The behavior might change in the next version.
Returns:
{sap.ui.vk.GraphicsCore}this to allow method chaining.
updateSceneTree(vkScene, contentResources): sap.ui.vk.Scene
Updates or rebuilds a scene tree from the hierarchy of content resources.

The content resources must be already loaded. Some changes in the content resource hierarchy can lead to rebuilding the scene completely. In this case a new scene is created.

Parameters:
{sap.ui.vk.Scene}vkScene The scene to update or null to force to create a new one.
{sap.ui.vk.ContentResource[]}contentResources The array of content resources to update or build the scene from.
Returns:
{sap.ui.vk.Scene} The scene updated or created.