Browse Source

documentation and declaration update

Raanan Weber 7 years ago
parent
commit
1dd4120150

+ 26 - 1
Viewer/src/eventManager.ts

@@ -1,6 +1,10 @@
 import { EventCallback, TemplateManager } from "./templateManager";
 
 
+/**
+ * The EventManager is in charge of registering user interctions with the viewer.
+ * It is used in the TemplateManager
+ */
 export class EventManager {
 
     private _callbacksContainer: { [key: string]: Array<{ eventType?: string, selector?: string, callback: (eventData: EventCallback) => void }> }
@@ -12,6 +16,15 @@ export class EventManager {
         })
     }
 
+    /**
+     * Register a new callback to a specific template.
+     * The best example for the usage can be found in the DefaultViewer
+     * 
+     * @param templateName the templateName to register the event to
+     * @param callback The callback to be executed
+     * @param eventType the type of event to register
+     * @param selector an optional selector. if not defined the parent object in the template will be selected
+     */
     public registerCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string) {
         if (!this._callbacksContainer[templateName]) {
             this._callbacksContainer[templateName] = [];
@@ -22,7 +35,16 @@ export class EventManager {
         });
     }
 
-    public unregisterCallback(templateName: string, callback?: (eventData: EventCallback) => void, eventType?: string, selector?: string) {
+    /**
+     * This will remove a registered event from the defined template.
+     * Each one of the variables apart from the template name are optional, but one must be provided.
+     * 
+     * @param templateName the templateName
+     * @param callback the callback to remove (optional)
+     * @param eventType the event type to remove (optional)
+     * @param selector the selector from which to remove the event (optional)
+     */
+    public unregisterCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string) {
         let callbackDefs = this._callbacksContainer[templateName] || [];
         this._callbacksContainer[templateName] = callbackDefs.filter(callbackDef => (!callbackDef.eventType || callbackDef.eventType === eventType) && (!callbackDef.selector || callbackDef.selector === selector));
     }
@@ -38,6 +60,9 @@ export class EventManager {
         });
     }
 
+    /**
+     * Dispose the event manager
+     */
     public dispose() {
         this._callbacksContainer = {};
     }

+ 13 - 0
Viewer/src/helper.ts

@@ -1,3 +1,8 @@
+/**
+ * Is the provided string a URL?
+ * 
+ * @param urlToCheck the url to inspect
+ */
 export function isUrl(urlToCheck: string): boolean {
     if (urlToCheck.indexOf('http') === 0 || urlToCheck.indexOf('/') === 0 || urlToCheck.indexOf('./') === 0 || urlToCheck.indexOf('../') === 0) {
         return true;
@@ -5,11 +10,19 @@ export function isUrl(urlToCheck: string): boolean {
     return false;
 }
 
+/**
+ * Convert a string from kebab-case to camelCase
+ * @param s string to convert
+ */
 export function kebabToCamel(s) {
     return s.replace(/(\-\w)/g, function (m) { return m[1].toUpperCase(); });
 }
 
 //https://gist.github.com/youssman/745578062609e8acac9f
+/**
+ * Convert a string from camelCase to kebab-case
+ * @param str string to convert
+ */
 export function camelToKebab(str) {
     return !str ? null : str.replace(/([A-Z])/g, function (g) { return '-' + g[0].toLowerCase() });
 }

+ 3 - 0
Viewer/src/index.ts

@@ -33,6 +33,9 @@ function init(event) {
     InitTags();
 }
 
+/**
+ * Dispose all viewers currently registered
+ */
 function disposeAll() {
     viewerManager.dispose();
     mapperManager.dispose();

+ 5 - 0
Viewer/src/initializer.ts

@@ -1,6 +1,11 @@
 import { DefaultViewer } from './viewer/defaultViewer';
 import { mapperManager } from './configuration/mappers';
 
+/**
+ * Select all HTML tags on the page that match the selector and initialize a viewer
+ * 
+ * @param selector the selector to initialize the viewer on (default is 'babylon')
+ */
 export function InitTags(selector: string = 'babylon') {
     let elements = document.querySelectorAll(selector);
     for (let i = 0; i < elements.length; ++i) {

+ 1 - 1
Viewer/src/model/viewerModel.ts

@@ -79,7 +79,7 @@ export class ViewerModel implements IDisposable {
     private _loadedUrl: string;
     private _modelConfiguration: IModelConfiguration;
 
-    constructor(private _viewer: AbstractViewer, modelConfiguration: IModelConfiguration) {
+    constructor(protected _viewer: AbstractViewer, modelConfiguration: IModelConfiguration) {
         this.onLoadedObservable = new Observable();
         this.onLoadErrorObservable = new Observable();
         this.onLoadProgressObservable = new Observable();

+ 137 - 26
Viewer/src/templateManager.ts

@@ -2,6 +2,9 @@
 import { Observable, IFileRequest, Tools } from 'babylonjs';
 import { isUrl, camelToKebab, kebabToCamel } from './helper';
 
+/**
+ * A single template configuration object
+ */
 export interface ITemplateConfiguration {
     location?: string; // #template-id OR http://example.com/loading.html
     html?: string; // raw html string
@@ -27,6 +30,9 @@ export interface ITemplateConfiguration {
     }
 }
 
+/**
+ * The object sent when an event is triggered
+ */
 export interface EventCallback {
     event: Event;
     template: Template;
@@ -34,14 +40,36 @@ export interface EventCallback {
     payload?: any;
 }
 
+/**
+ * The template manager, a member of the viewer class, will manage the viewer's templates and generate the HTML.
+ * The template manager managers a single viewer and can be seen as the collection of all sub-templates of the viewer.
+ */
 export class TemplateManager {
 
-    public onInit: Observable<Template>;
-    public onLoaded: Observable<Template>;
-    public onStateChange: Observable<Template>;
+    /**
+     * Will be triggered when any template is initialized
+     */
+    public onTemplateInit: Observable<Template>;
+    /**
+     * Will be triggered when any template is fully loaded
+     */
+    public onTemplateLoaded: Observable<Template>;
+    /**
+     * Will be triggered when a template state changes
+     */
+    public onTemplateStateChange: Observable<Template>;
+    /**
+     * Will be triggered when all templates finished loading
+     */
     public onAllLoaded: Observable<TemplateManager>;
+    /**
+     * Will be triggered when any event on any template is triggered.
+     */
     public onEventTriggered: Observable<EventCallback>;
 
+    /**
+     * This template manager's event manager. In charge of callback registrations to native event types
+     */
     public eventManager: EventManager;
 
     private templates: { [name: string]: Template };
@@ -49,15 +77,19 @@ export class TemplateManager {
     constructor(public containerElement: HTMLElement) {
         this.templates = {};
 
-        this.onInit = new Observable<Template>();
-        this.onLoaded = new Observable<Template>();
-        this.onStateChange = new Observable<Template>();
+        this.onTemplateInit = new Observable<Template>();
+        this.onTemplateLoaded = new Observable<Template>();
+        this.onTemplateStateChange = new Observable<Template>();
         this.onAllLoaded = new Observable<TemplateManager>();
         this.onEventTriggered = new Observable<EventCallback>();
 
         this.eventManager = new EventManager(this);
     }
 
+    /**
+     * Initialize the template(s) for the viewer. Called bay the Viewer class
+     * @param templates the templates to be used to initialize the main template
+     */
     public initTemplate(templates: { [key: string]: ITemplateConfiguration }) {
 
         let internalInit = (dependencyMap, name: string, parentTemplate?: Template) => {
@@ -113,6 +145,13 @@ export class TemplateManager {
             if (!templates[name]) return Promise.resolve(false);
             // else - we have a template, let's do our job!
             let template = new Template(name, templates[name]);
+            template.onLoaded.add(() => {
+                this.onTemplateLoaded.notifyObservers(template);
+            });
+            template.onStateChange.add(() => {
+                this.onTemplateStateChange.notifyObservers(template);
+            });
+            this.onTemplateInit.notifyObservers(template);
             // make sure the global onEventTriggered is called as well
             template.onEventTriggered.add(eventData => this.onEventTriggered.notifyObservers(eventData));
             this.templates[name] = template;
@@ -137,11 +176,18 @@ export class TemplateManager {
         });
     }
 
-    // assumiung only ONE(!) canvas
+    /**
+     * Get the canvas in the template tree.
+     * There must be one and only one canvas inthe template.
+     */
     public getCanvas(): HTMLCanvasElement | null {
         return this.containerElement.querySelector('canvas');
     }
 
+    /**
+     * Get a specific template from the template tree
+     * @param name the name of the template to load
+     */
     public getTemplate(name: string): Template | undefined {
         return this.templates[name];
     }
@@ -156,6 +202,9 @@ export class TemplateManager {
         }
     }
 
+    /**
+     * Dispose the template manager
+     */
     public dispose() {
         // dispose all templates
         Object.keys(this.templates).forEach(template => {
@@ -164,11 +213,11 @@ export class TemplateManager {
         this.templates = {};
         this.eventManager.dispose();
 
-        this.onInit.clear();
+        this.onTemplateInit.clear();
         this.onAllLoaded.clear();
         this.onEventTriggered.clear();
-        this.onLoaded.clear();
-        this.onStateChange.clear();
+        this.onTemplateLoaded.clear();
+        this.onTemplateStateChange.clear();
     }
 
 }
@@ -191,14 +240,37 @@ Handlebars.registerHelper('eachInMap', function (map, block) {
     return out;
 });
 
+/**
+ * This class represents a single template in the viewer's template tree.
+ * An example for a template is a single canvas, an overlay (containing sub-templates) or the navigation bar.
+ * A template is injected using the template manager in the correct position.
+ * The template is rendered using Handlebars and can use Handlebars' features (such as parameter injection)
+ * 
+ * For further information please refer to the documentation page, https://doc.babylonjs.com
+ */
 export class Template {
 
-    public onInit: Observable<Template>;
+    /**
+     * Will be triggered when the template is loaded
+     */
     public onLoaded: Observable<Template>;
+    /**
+     * will be triggered when the template is appended to the tree
+     */
     public onAppended: Observable<Template>;
+    /**
+     * Will be triggered when the template's state changed (shown, hidden)
+     */
     public onStateChange: Observable<Template>;
+    /**
+     * Will be triggered when an event is triggered on ths template.
+     * The event is a native browser event (like mouse or pointer events)
+     */
     public onEventTriggered: Observable<EventCallback>;
 
+    /**
+     * is the template loaded?
+     */
     public isLoaded: boolean;
     /**
      * This is meant to be used to track the show and hide functions.
@@ -206,10 +278,19 @@ export class Template {
      */
     public isShown: boolean;
 
+    /**
+     * Is this template a part of the HTML tree (the template manager injected it)
+     */
     public isInHtmlTree: boolean;
 
+    /**
+     * The HTML element containing this template
+     */
     public parent: HTMLElement;
 
+    /**
+     * A promise that is fulfilled when the template finished loading.
+     */
     public initPromise: Promise<Template>;
 
     private _fragment: DocumentFragment;
@@ -218,7 +299,6 @@ export class Template {
     private loadRequests: Array<IFileRequest>;
 
     constructor(public name: string, private _configuration: ITemplateConfiguration) {
-        this.onInit = new Observable<Template>();
         this.onLoaded = new Observable<Template>();
         this.onAppended = new Observable<Template>();
         this.onStateChange = new Observable<Template>();
@@ -229,12 +309,6 @@ export class Template {
         this.isLoaded = false;
         this.isShown = false;
         this.isInHtmlTree = false;
-        /*
-        if (configuration.id) {
-            this.parent.id = configuration.id;
-        }
-        */
-        this.onInit.notifyObservers(this);
 
         let htmlContentPromise = this._getTemplateAsHtml(_configuration);
 
@@ -253,6 +327,13 @@ export class Template {
         });
     }
 
+    /**
+     * Some templates have parameters (like background color for example).
+     * The parameters are provided to Handlebars which in turn generates the template.
+     * This function will update the template with the new parameters
+     * 
+     * @param params the new template parameters
+     */
     public updateParams(params: { [key: string]: string | number | boolean | object }) {
         this._configuration.params = params;
         // update the template
@@ -268,10 +349,17 @@ export class Template {
         }
     }
 
+    /**
+     * Get the template'S configuration
+     */
     public get configuration(): ITemplateConfiguration {
         return this._configuration;
     }
 
+    /**
+     * A template can be a parent element for other templates or HTML elements.
+     * This function will deliver all child HTML elements of this template.
+     */
     public getChildElements(): Array<string> {
         let childrenArray: string[] = [];
         //Edge and IE don't support frage,ent.children
@@ -286,6 +374,12 @@ export class Template {
         return childrenArray;
     }
 
+    /**
+     * Appending the template to a parent HTML element.
+     * If a parent is already set and you wish to replace the old HTML with new one, forceRemove should be true.
+     * @param parent the parent to which the template is added
+     * @param forceRemove if the parent already exists, shoud the template be removed from it?
+     */
     public appendTo(parent: HTMLElement, forceRemove?: boolean) {
         if (this.parent) {
             if (forceRemove) {
@@ -309,6 +403,14 @@ export class Template {
 
     private _isShowing: boolean;
     private _isHiding: boolean;
+
+    /**
+     * Show the template using the provided visibilityFunction, or natively using display: flex.
+     * The provided function returns a promise that should be fullfilled when the element is shown.
+     * Since it is a promise async operations are more than possible.
+     * See the default viewer for an opacity example.
+     * @param visibilityFunction The function to execute to show the template. 
+     */
     public show(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template> {
         if (this._isHiding) return Promise.resolve(this);
         return Promise.resolve().then(() => {
@@ -328,6 +430,13 @@ export class Template {
         });
     }
 
+    /**
+     * Hide the template using the provided visibilityFunction, or natively using display: none.
+     * The provided function returns a promise that should be fullfilled when the element is hidden.
+     * Since it is a promise async operations are more than possible.
+     * See the default viewer for an opacity example.
+     * @param visibilityFunction The function to execute to show the template. 
+     */
     public hide(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template> {
         if (this._isShowing) return Promise.resolve(this);
         return Promise.resolve().then(() => {
@@ -347,10 +456,12 @@ export class Template {
         });
     }
 
+    /**
+     * Dispose this template
+     */
     public dispose() {
         this.onAppended.clear();
         this.onEventTriggered.clear();
-        this.onInit.clear();
         this.onLoaded.clear();
         this.onStateChange.clear();
         this.isLoaded = false;
@@ -380,7 +491,7 @@ export class Template {
         } else if (templateConfig.html !== undefined) {
             return Promise.resolve(templateConfig.html);
         } else {
-            let location = getTemplateLocation(templateConfig);
+            let location = this._getTemplateLocation(templateConfig);
             if (isUrl(location)) {
                 return new Promise((resolve, reject) => {
                     let fileRequest = Tools.LoadFile(location, (data: string) => {
@@ -452,12 +563,12 @@ export class Template {
             }
         }
     }
-}
 
-export function getTemplateLocation(templateConfig): string {
-    if (!templateConfig || typeof templateConfig === 'string') {
-        return templateConfig;
-    } else {
-        return templateConfig.location;
+    private _getTemplateLocation(templateConfig): string {
+        if (!templateConfig || typeof templateConfig === 'string') {
+            return templateConfig;
+        } else {
+            return templateConfig.location;
+        }
     }
 }

+ 5 - 3
Viewer/src/viewer/viewer.ts

@@ -122,7 +122,10 @@ export abstract class AbstractViewer {
      */
     public onInitDoneObservable: Observable<AbstractViewer>;
 
-    private _canvas: HTMLCanvasElement;
+    /**
+     * The canvas associated with this viewer
+     */
+    protected _canvas: HTMLCanvasElement;
 
     /**
      * The (single) canvas of this viewer
@@ -838,12 +841,11 @@ export abstract class AbstractViewer {
      * @returns a ViewerModel object that is not yet fully loaded.
      */
     public initModel(modelConfig: IModelConfiguration, clearScene: boolean = true): ViewerModel {
-        let model = this.modelLoader.load(modelConfig);
-
         if (clearScene) {
             this.models.forEach(m => m.dispose());
             this.models.length = 0;
         }
+        let model = this.modelLoader.load(modelConfig);
 
         this.lastUsedLoader = model.loader;
         model.onLoadErrorObservable.add((errorObject) => {

+ 38 - 0
Viewer/src/viewer/viewerManager.ts

@@ -1,12 +1,25 @@
 import { Observable } from 'babylonjs';
 import { AbstractViewer } from './viewer';
 
+/**
+ * The viewer manager is the container for all viewers currently registered on this page.
+ * It is possible to have more than one viewer on a single page.
+ */
 export class ViewerManager {
 
     private _viewers: { [key: string]: AbstractViewer };
 
+    /**
+     * A callback that will be triggered when a new viewer was added
+     */
     public onViewerAdded: (viewer: AbstractViewer) => void;
+    /**
+     * Will notify when a new viewer was added
+     */
     public onViewerAddedObservable: Observable<AbstractViewer>;
+    /**
+     * Will notify when a viewer was removed (disposed)
+     */
     public onViewerRemovedObservable: Observable<string>;
 
     constructor() {
@@ -15,21 +28,37 @@ export class ViewerManager {
         this.onViewerRemovedObservable = new Observable();
     }
 
+    /**
+     * Adding a new viewer to the viewer manager and start tracking it.
+     * @param viewer the viewer to add
+     */
     public addViewer(viewer: AbstractViewer) {
         this._viewers[viewer.getBaseId()] = viewer;
         this._onViewerAdded(viewer);
     }
 
+    /**
+     * remove a viewer from the viewer manager
+     * @param viewer the viewer to remove
+     */
     public removeViewer(viewer: AbstractViewer) {
         let id = viewer.getBaseId();
         delete this._viewers[id];
         this.onViewerRemovedObservable.notifyObservers(id);
     }
 
+    /**
+     * Get a viewer by its baseId (if the container element has an ID, it is the this is. if not, a random id was assigned)
+     * @param id the id of the HTMl element (or the viewer's, if none provided)
+     */
     public getViewerById(id: string): AbstractViewer {
         return this._viewers[id];
     }
 
+    /**
+     * Get a viewer using a container element
+     * @param element the HTML element to search viewers associated with
+     */
     public getViewerByHTMLElement(element: HTMLElement) {
         for (let id in this._viewers) {
             if (this._viewers[id].containerElement === element) {
@@ -38,6 +67,12 @@ export class ViewerManager {
         }
     }
 
+    /**
+     * Get a promise that will fullfil when this viewer was initialized.
+     * Since viewer initialization and template injection is asynchronous, using the promise will guaranty that
+     * you will get the viewer after everything was already configured.
+     * @param id the viewer id to find
+     */
     public getViewerPromiseById(id: string): Promise<AbstractViewer> {
         return new Promise((resolve, reject) => {
             let localViewer = this.getViewerById(id)
@@ -59,6 +94,9 @@ export class ViewerManager {
         this.onViewerAddedObservable.notifyObservers(viewer);
     }
 
+    /**
+     * dispose the manager and all of its associated viewers
+     */
     public dispose() {
         for (let id in this._viewers) {
             this._viewers[id].dispose();

+ 675 - 36
dist/preview release/viewer/babylon.viewer.d.ts

@@ -50,55 +50,231 @@ declare module BabylonViewer {
             } | undefined;
         };
     }
+    /**
+     * The object sent when an event is triggered
+     */
     export interface EventCallback {
+        /**
+         * The native javascript event triggered
+         */
         event: Event;
+        /**
+         * The template on which the event was triggered
+         */
         template: Template;
+        /**
+         * The selector provided
+         */
         selector: string;
+        /**
+         * Payload, if provided by the viewer
+         */
         payload?: any;
     }
+    /**
+     * The template manager, a member of the viewer class, will manage the viewer's templates and generate the HTML.
+     * The template manager managers a single viewer and can be seen as the collection of all sub-templates of the viewer.
+     */
     interface TemplateManager {
+        /**
+         * The element to which all the templates wil be appended
+         */
         containerElement: HTMLElement;
-        onInit: BABYLON.Observable<Template>;
-        onLoaded: BABYLON.Observable<Template>;
-        onStateChange: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when any template is initialized
+         */
+        onTemplateInit: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when any template is fully loaded
+         */
+        onTemplateLoaded: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when a template state changes
+         */
+        onTemplateStateChange: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when all templates finished loading
+         */
         onAllLoaded: BABYLON.Observable<TemplateManager>;
+        /**
+         * Will be triggered when any event on any template is triggered.
+         */
         onEventTriggered: BABYLON.Observable<EventCallback>;
+        /**
+         * This template manager's event manager. In charge of callback registrations to native event types
+         */
         eventManager: EventManager;
+        /**
+         * Initialize the template(s) for the viewer. Called bay the Viewer class
+         * @param templates the templates to be used to initialize the main template
+         */
         initTemplate(templates: {
             [key: string]: ITemplateConfiguration;
-        }): void;
+        }): Promise<void>;
+        /**
+        /**
+         * Get the canvas in the template tree.
+         * There must be one and only one canvas inthe template.
+         */
         getCanvas(): HTMLCanvasElement | null;
+        /**
+         * Get a specific template from the template tree
+         * @param name the name of the template to load
+         */
         getTemplate(name: string): Template | undefined;
+        /**
+         * Dispose the template manager
+         */
+        dispose(): void;
     }
 
+    /**
+     * This class represents a single template in the viewer's template tree.
+     * An example for a template is a single canvas, an overlay (containing sub-templates) or the navigation bar.
+     * A template is injected using the template manager in the correct position.
+     * The template is rendered using Handlebars and can use Handlebars' features (such as parameter injection)
+     *
+     * For further information please refer to the documentation page, https://doc.babylonjs.com
+    */
     interface Template {
+        /**
+         * The name of the template
+         */
         name: string;
-        onInit: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when the template is loaded
+         */
         onLoaded: BABYLON.Observable<Template>;
+        /**
+         * will be triggered when the template is appended to the tree
+         */
         onAppended: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when the template's state changed (shown, hidden)
+         */
         onStateChange: BABYLON.Observable<Template>;
+        /**
+         * Will be triggered when an event is triggered on ths template.
+         * The event is a native browser event (like mouse or pointer events)
+         */
         onEventTriggered: BABYLON.Observable<EventCallback>;
+        /**
+         * is the template loaded?
+         */
         isLoaded: boolean;
+        /**
+         * This is meant to be used to track the show and hide functions.
+         * This is NOT (!!) a flag to check if the element is actually visible to the user.
+         */
         isShown: boolean;
+        /**
+         * Is this template a part of the HTML tree (the template manager injected it)
+         */
+        isInHtmlTree: boolean;
+        /**
+         * The HTML element containing this template
+         */
         parent: HTMLElement;
+        /**
+         * A promise that is fulfilled when the template finished loading.
+         */
         initPromise: Promise<Template>;
+        /**
+         * Some templates have parameters (like background color for example).
+         * The parameters are provided to Handlebars which in turn generates the template.
+         * This function will update the template with the new parameters
+         *
+         * @param params the new template parameters
+         */
+        updateParams(params: {
+            [key: string]: string | number | boolean | object;
+        }): void;
+        /**
+         * Get the template'S configuration
+         */
         readonly configuration: ITemplateConfiguration;
+        /**
+         * A template can be a parent element for other templates or HTML elements.
+         * This function will deliver all child HTML elements of this template.
+         */
         getChildElements(): Array<string>;
-        appendTo(parent: HTMLElement): void;
+        /**
+         * Appending the template to a parent HTML element.
+         * If a parent is already set and you wish to replace the old HTML with new one, forceRemove should be true.
+         * @param parent the parent to which the template is added
+         * @param forceRemove if the parent already exists, shoud the template be removed from it?
+         */
+        appendTo(parent: HTMLElement, forceRemove?: boolean): void;
+        /**
+         * Show the template using the provided visibilityFunction, or natively using display: flex.
+         * The provided function returns a promise that should be fullfilled when the element is shown.
+         * Since it is a promise async operations are more than possible.
+         * See the default viewer for an opacity example.
+         * @param visibilityFunction The function to execute to show the template.
+         */
         show(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template>;
+        /**
+         * Hide the template using the provided visibilityFunction, or natively using display: none.
+         * The provided function returns a promise that should be fullfilled when the element is hidden.
+         * Since it is a promise async operations are more than possible.
+         * See the default viewer for an opacity example.
+         * @param visibilityFunction The function to execute to show the template.
+         */
         hide(visibilityFunction?: (template: Template) => Promise<Template>): Promise<Template>;
+        /**
+         * Dispose this template
+         */
         dispose(): void;
     }
 
+    /**
+     * The viewer manager is the container for all viewers currently registered on this page.
+     * It is possible to have more than one viewer on a single page.
+     */
     interface ViewerManager {
+        /**
+         * A callback that will be triggered when a new viewer was added
+         */
         onViewerAdded: (viewer: AbstractViewer) => void;
+        /**
+         * Will notify when a new viewer was added
+         */
         onViewerAddedObservable: BABYLON.Observable<AbstractViewer>;
+        /**
+         * Will notify when a viewer was removed (disposed)
+         */
         onViewerRemovedObservable: BABYLON.Observable<string>;
+        /**
+         * Adding a new viewer to the viewer manager and start tracking it.
+         * @param viewer the viewer to add
+         */
         addViewer(viewer: AbstractViewer): void;
+        /**
+         * remove a viewer from the viewer manager
+         * @param viewer the viewer to remove
+         */
         removeViewer(viewer: AbstractViewer): void;
+        /**
+         * Get a viewer by its baseId (if the container element has an ID, it is the this is. if not, a random id was assigned)
+         * @param id the id of the HTMl element (or the viewer's, if none provided)
+         */
         getViewerById(id: string): AbstractViewer;
+        /**
+         * Get a viewer using a container element
+         * @param element the HTML element to search viewers associated with
+         */
         getViewerByHTMLElement(element: HTMLElement): AbstractViewer | undefined;
+        /**
+         * Get a promise that will fullfil when this viewer was initialized.
+         * Since viewer initialization and template injection is asynchronous, using the promise will guaranty that
+         * you will get the viewer after everything was already configured.
+         * @param id the viewer id to find
+         */
         getViewerPromiseById(id: string): Promise<AbstractViewer>;
+        /**
+         * dispose the manager and all of its associated viewers
+         */
+        dispose(): void;
     }
     export let viewerManager: ViewerManager;
 
@@ -108,30 +284,90 @@ declare module BabylonViewer {
         FRAMING = 2,
     }
 
+    /*
+    * Select all HTML tags on the page that match the selector and initialize a viewer
+    *
+    * @param selector the selector to initialize the viewer on (default is 'babylon')
+    */
     export function InitTags(selector?: string): void;
 
+    /**
+     * The EventManager is in charge of registering user interctions with the viewer.
+     * It is used in the TemplateManager
+     */
     interface EventManager {
+        /**
+         * Register a new callback to a specific template.
+         * The best example for the usage can be found in the DefaultViewer
+         *
+         * @param templateName the templateName to register the event to
+         * @param callback The callback to be executed
+         * @param eventType the type of event to register
+         * @param selector an optional selector. if not defined the parent object in the template will be selected
+         */
         registerCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
-        unregisterCallback(templateName: string, callback?: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
-    }
-
-    interface PromiseObservable<T> extends BABYLON.Observable<T> {
-        notifyWithPromise(eventData: T, mask?: number, target?: any, currentTarget?: any): Promise<any>;
+        /**
+         * This will remove a registered event from the defined template.
+         * Each one of the variables apart from the template name are optional, but one must be provided.
+         *
+         * @param templateName the templateName
+         * @param callback the callback to remove (optional)
+         * @param eventType the event type to remove (optional)
+         * @param selector the selector from which to remove the event (optional)
+         */
+        unregisterCallback(templateName: string, callback: (eventData: EventCallback) => void, eventType?: string, selector?: string): void;
+        /**
+         * Dispose the event manager
+         */
+        dispose(): void;
     }
 
+    /**
+     * This is the mapper's interface. Implement this function to create your own mapper and register it at the mapper manager
+     */
     export interface IMapper {
         map(rawSource: any): ViewerConfiguration;
     }
+
     interface MapperManager {
+        /**
+         * The default mapper is the JSON mapper.
+         */
         DefaultMapper: string;
+        /**
+         * Get a specific configuration mapper.
+         *
+         * @param type the name of the mapper to load
+         */
         getMapper(type: string): IMapper;
+        /**
+         * Use this functio to register your own configuration mapper.
+         * After a mapper is registered, it can be used to parse the specific type fo configuration to the standard ViewerConfiguration.
+         * @param type the name of the mapper. This will be used to define the configuration type and/or to get the mapper
+         * @param mapper The implemented mapper
+         */
         registerMapper(type: string, mapper: IMapper): void;
+        /**
+         * Dispose the mapper manager and all of its mappers.
+         */
+        dispose(): void;
     }
     export let mapperManager: MapperManager;
 
     interface ConfigurationLoader {
-        loadConfiguration(initConfig?: ViewerConfiguration): Promise<ViewerConfiguration>;
-        getConfigurationType(type: string): void;
+        /**
+         * load a configuration object that is defined in the initial configuration provided.
+         * The viewer configuration can extend different types of configuration objects and have an extra configuration defined.
+         *
+         * @param initConfig the initial configuration that has the definitions of further configuration to load.
+         * @param callback an optional callback that will be called sync, if noconfiguration needs to be loaded or configuration is payload-only
+         * @returns A promise that delivers the extended viewer configuration, when done.
+         */
+        loadConfiguration(initConfig?: ViewerConfiguration, callback?: (config: ViewerConfiguration) => void): Promise<ViewerConfiguration>;
+        /**
+         * Dispose the configuration loader. This will cancel file requests, if active.
+         */
+        dispose(): void;
     }
     export let configurationLoader: ConfigurationLoader;
 
@@ -227,8 +463,6 @@ declare module BabylonViewer {
             autoStart?: boolean | string;
             playOnce?: boolean;
         }
-
-        // [propName: string]: any; // further configuration, like title and creator
     }
 
     export interface ISkyboxConfiguration {
@@ -404,10 +638,16 @@ declare module BabylonViewer {
     }
     /////>configuration
 
+    /**
+     * Animation play mode enum - is the animation looping or playing once
+     */
     export enum AnimationPlayMode {
         ONCE = 0,
         LOOP = 1,
     }
+    /**
+     * An enum representing the current state of an animation object
+     */
     export enum AnimationState {
         INIT = 0,
         PLAYING = 1,
@@ -415,20 +655,74 @@ declare module BabylonViewer {
         STOPPED = 3,
         ENDED = 4,
     }
-    export interface IModelAnimation extends BABYLON.IDisposable {
+    /**
+     * This interface can be implemented to define new types of ModelAnimation objects.
+     */
+    export interface IModelAnimation {
+        /**
+         * Current animation state (playing, stopped etc')
+         */
         readonly state: AnimationState;
+        /**
+         * the name of the animation
+         */
         readonly name: string;
+        /**
+         * Get the max numbers of frame available in the animation group
+         *
+         * In correlation to an arry, this would be ".length"
+         */
         readonly frames: number;
+        /**
+         * Get the current frame playing right now.
+         * This can be used to poll the frame currently playing (and, for exmaple, display a progress bar with the data)
+         *
+         * In correlation to an array, this would be the current index
+         */
         readonly currentFrame: number;
+        /**
+         * Animation's FPS value
+         */
         readonly fps: number;
+        /**
+         * Get or set the animation's speed ration (Frame-to-fps)
+         */
         speedRatio: number;
+        /**
+         * Gets or sets the aimation's play mode.
+         */
         playMode: AnimationPlayMode;
+        /**
+         * Start the animation
+         */
         start(): any;
+        /**
+         * Stop the animation.
+         * This will fail silently if the animation group is already stopped.
+         */
         stop(): any;
+        /**
+         * Pause the animation
+         * This will fail silently if the animation is not currently playing
+         */
         pause(): any;
+        /**
+         * Reset this animation
+         */
         reset(): any;
+        /**
+         * Restart the animation
+         */
         restart(): any;
+        /**
+         * Go to a specific
+         * @param frameNumber the frame number to go to
+         */
         goToFrame(frameNumber: number): any;
+        /**
+         * Dispose this animation
+         */
+        dispose(): any;
     }
 
     export enum ModelState {
@@ -439,110 +733,455 @@ declare module BabylonViewer {
         ERROR
     }
 
+    /**
+     * An instance of the class is in charge of loading the model correctly.
+     * This class will continously be expended with tasks required from the specific loaders Babylon has.
+     *
+     * A Model loader is unique per (Abstract)Viewer. It is being generated by the viewer
+     */
     export class ModelLoader {
-        constructor(viewer: AbstractViewer);
+        private _viewer;
+        private _loadId;
+        private _disposed;
+        private _loaders;
+        /**
+         * Create a new Model loader
+         * @param _viewer the viewer using this model loader
+         */
+        constructor(_viewer: AbstractViewer);
+        /**
+         * Load a model using predefined configuration
+         * @param modelConfiguration the modelConfiguration to use to load the model
+         */
         load(modelConfiguration: IModelConfiguration): ViewerModel;
         cancelLoad(model: ViewerModel): void;
+        /**
+         * dispose the model loader.
+         * If loaders are registered and are in the middle of loading, they will be disposed and the request(s) will be cancelled.
+         */
         dispose(): void;
     }
 
     export class ViewerModel {
-        constructor(viewer: AbstractViewer, modelConfiguration: IModelConfiguration);
+        /**
+         * The viewer associated with this viewer model
+         */
+        protected _viewer: AbstractViewer;
+        /**
+         * The loader used to load this model.
+         */
         loader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync;
+        private _animations;
+        /**
+         * the list of meshes that are a part of this model
+         */
         meshes: Array<BABYLON.AbstractMesh>;
+        /**
+         * This model's root mesh (the parent of all other meshes).
+         * This mesh also exist in the meshes array.
+         */
         rootMesh: BABYLON.AbstractMesh;
+        /**
+         * ParticleSystems connected to this model
+         */
         particleSystems: Array<BABYLON.ParticleSystem>;
+        /**
+         * Skeletons defined in this model
+         */
         skeletons: Array<BABYLON.Skeleton>;
+        /**
+         * The current model animation.
+         * On init, this will be undefined.
+         */
         currentAnimation: IModelAnimation;
+        /**
+         * Observers registered here will be executed when the model is done loading
+         */
         onLoadedObservable: BABYLON.Observable<ViewerModel>;
+        /**
+         * Observers registered here will be executed when the loader notified of a progress event
+         */
         onLoadProgressObservable: BABYLON.Observable<BABYLON.SceneLoaderProgressEvent>;
+        /**
+         * Observers registered here will be executed when the loader notified of an error.
+         */
         onLoadErrorObservable: BABYLON.Observable<{
             message: string;
             exception: any;
         }>;
+        /**
+         * Observers registered here will be executed every time the model is being configured.
+         * This can be used to extend the model's configuration without extending the class itself
+         */
         onAfterConfigure: BABYLON.Observable<ViewerModel>;
+        /**
+         * The current model state (loaded, error, etc)
+         */
         state: ModelState;
+        /**
+         * A loadID provided by the modelLoader, unique to ths (Abstract)Viewer instance.
+         */
         loadId: number;
+        private _loadedUrl;
+        private _modelConfiguration;
+        constructor(_viewer: AbstractViewer, modelConfiguration: IModelConfiguration);
+        /**
+         * Get the model's configuration
+         */
+        /**
+         * (Re-)set the model's entire configuration
+         * @param newConfiguration the new configuration to replace the new one
+         */
+        configuration: IModelConfiguration;
+        /**
+         * Update the current configuration with new values.
+         * Configuration will not be overwritten, but merged with the new configuration.
+         * Priority is to the new configuration
+         * @param newConfiguration the configuration to be merged into the current configuration;
+         */
+        updateConfiguration(newConfiguration: Partial<IModelConfiguration>): void;
         initAnimations(): void;
+        /**
+         * Add a new animation group to this model.
+         * @param animationGroup the new animation group to be added
+         */
         addAnimationGroup(animationGroup: BABYLON.AnimationGroup): void;
+        /**
+         * Get the ModelAnimation array
+         */
         getAnimations(): Array<IModelAnimation>;
-        getAnimationNames(): string[];
+        /**
+         * Get the animations' names. Using the names you can play a specific animation.
+         */
+        getAnimationNames(): Array<string>;
+        /**
+         * Get an animation by the provided name. Used mainly when playing n animation.
+         * @param name the name of the animation to find
+         */
+        protected _getAnimationByName(name: string): BABYLON.Nullable<IModelAnimation>;
+        /**
+         * Choose an initialized animation using its name and start playing it
+         * @param name the name of the animation to play
+         * @returns The model aniamtion to be played.
+         */
         playAnimation(name: string): IModelAnimation;
+        private _configureModel();
+        /**
+         * Dispose this model, including all of its associated assets.
+         */
         dispose(): void;
     }
 
     /////<viewer
     export abstract class AbstractViewer {
         containerElement: HTMLElement;
+        /**
+         * The corresponsing template manager of this viewer.
+         */
         templateManager: TemplateManager;
+        /**
+         * Babylon Engine corresponding with this viewer
+         */
         engine: BABYLON.Engine;
+        /**
+         * The Babylon Scene of this viewer
+         */
         scene: BABYLON.Scene;
+        /**
+         * The camera used in this viewer
+         */
         camera: BABYLON.ArcRotateCamera;
+        /**
+         * Babylon's scene optimizer
+         */
         sceneOptimizer: BABYLON.SceneOptimizer;
-        baseId: string;
+        /**
+         * The ID of this viewer. it will be generated randomly or use the HTML Element's ID.
+         */
+        readonly baseId: string;
+        /**
+         * Models displayed in this viewer.
+         */
         models: Array<ViewerModel>;
-        modelLoader: ModelLoader;
+        /**
+         * The last loader used to load a model.
+         */
         lastUsedLoader: BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync;
+        /**
+         * The ModelLoader instance connected with this viewer.
+         */
+        modelLoader: ModelLoader;
+        /**
+         * the viewer configuration object
+         */
         protected _configuration: ViewerConfiguration;
+        /**
+         * Babylon's environment helper of this viewer
+         */
         environmentHelper: BABYLON.EnvironmentHelper;
         protected _defaultHighpTextureType: number;
         protected _shadowGeneratorBias: number;
         protected _defaultPipelineTextureType: number;
+        /**
+         * The maximum number of shadows supported by the curent viewer
+         */
         protected _maxShadows: number;
-        readonly isHdrSupported: boolean;
+        /**
+         * is HDR supported?
+         */
+        private _hdrSupport;
+        /**
+         * is this viewer disposed?
+         */
         protected _isDisposed: boolean;
+        /**
+         * Returns a boolean representing HDR support
+         */
+        readonly isHdrSupported: boolean;
+        /**
+         * Will notify when the scene was initialized
+         */
         onSceneInitObservable: BABYLON.Observable<BABYLON.Scene>;
+        /**
+         * will notify when the engine was initialized
+         */
         onEngineInitObservable: BABYLON.Observable<BABYLON.Engine>;
+        /**
+         * will notify after every model load
+         */
         onModelLoadedObservable: BABYLON.Observable<ViewerModel>;
+        /**
+         * will notify when any model notify of progress
+         */
         onModelLoadProgressObservable: BABYLON.Observable<BABYLON.SceneLoaderProgressEvent>;
+        /**
+         * will notify when any model load failed.
+         */
         onModelLoadErrorObservable: BABYLON.Observable<{
             message: string;
             exception: any;
         }>;
+        /**
+         * will notify when a new loader was initialized.
+         * Used mainly to know when a model starts loading.
+         */
         onLoaderInitObservable: BABYLON.Observable<BABYLON.ISceneLoaderPlugin | BABYLON.ISceneLoaderPluginAsync>;
+        /**
+         * Observers registered here will be executed when the entire load process has finished.
+         */
         onInitDoneObservable: BABYLON.Observable<AbstractViewer>;
-        canvas: HTMLCanvasElement;
-        protected _registeredOnBeforerenderFunctions: Array<() => void>;
+        /**
+         * The canvas associated with this viewer
+         */
+        protected _canvas: HTMLCanvasElement;
+        /**
+         * The (single) canvas of this viewer
+         */
+        readonly canvas: HTMLCanvasElement;
+        /**
+         * registered onBeforeRender functions.
+         * This functions are also registered at the native scene. The reference can be used to unregister them.
+         */
+        protected _registeredOnBeforeRenderFunctions: Array<() => void>;
+        /**
+         * The configuration loader of this viewer
+         */
+        protected _configurationLoader: ConfigurationLoader;
         constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
+        /**
+         * get the baseId of this viewer
+         */
         getBaseId(): string;
+        /**
+         * Do we have a canvas to render on, and is it a part of the scene
+         */
         isCanvasInDOM(): boolean;
+        /**
+         * The resize function that will be registered with the window object
+         */
         protected _resize: () => void;
+        /**
+         * render loop that will be executed by the engine
+         */
         protected _render: () => void;
+        /**
+         * Update the current viewer configuration with new values.
+         * Only provided information will be updated, old configuration values will be kept.
+         * If this.configuration was manually changed, you can trigger this function with no parameters,
+         * and the entire configuration will be updated.
+         * @param newConfiguration
+         */
         updateConfiguration(newConfiguration?: Partial<ViewerConfiguration>): void;
         protected _configureEnvironment(skyboxConifguration?: ISkyboxConfiguration | boolean, groundConfiguration?: IGroundConfiguration | boolean): Promise<BABYLON.Scene> | undefined;
-        protected _configureScene(sceneConfig: ISceneConfiguration, optimizerConfig?: ISceneOptimizerConfiguration): void;
+        /**
+         * internally configure the scene using the provided configuration.
+         * The scene will not be recreated, but just updated.
+         * @param sceneConfig the (new) scene configuration
+         */
+        protected _configureScene(sceneConfig: ISceneConfiguration): void;
+        /**
+         * Configure the scene optimizer.
+         * The existing scene optimizer will be disposed and a new one will be created.
+         * @param optimizerConfig the (new) optimizer configuration
+         */
         protected _configureOptimizer(optimizerConfig: ISceneOptimizerConfiguration | boolean): void;
+        /**
+         * this is used to register native functions using the configuration object.
+         * This will configure the observers.
+         * @param observersConfiguration observers configuration
+         */
         protected _configureObservers(observersConfiguration: IObserversConfiguration): void;
+        /**
+         * (Re) configure the camera. The camera will only be created once and from this point will only be reconfigured.
+         * @param cameraConfig the new camera configuration
+         * @param model optionally use the model to configure the camera.
+         */
         protected _configureCamera(cameraConfig: ICameraConfiguration, model?: ViewerModel): void;
+        /**
+         * configure the lights.
+         *
+         * @param lightsConfiguration the (new) light(s) configuration
+         * @param model optionally use the model to configure the camera.
+         */
         protected _configureLights(lightsConfiguration?: {
             [name: string]: ILightConfiguration | boolean;
         }, model?: ViewerModel): void;
-        protected _configureModel(modelConfiguration: Partial<IModelConfiguration>, model?: ViewerModel): void;
+        /**
+         * configure all models using the configuration.
+         * @param modelConfiguration the configuration to use to reconfigure the models
+         */
+        protected _configureModel(modelConfiguration: Partial<IModelConfiguration>): void;
+        /**
+         * Dispoe the entire viewer including the scene and the engine
+         */
         dispose(): void;
-        protected abstract prepareContainerElement(): any;
+        /**
+         * This will prepare the container element for the viewer
+         */
+        protected abstract _prepareContainerElement(): any;
+        /**
+         * This function will execute when the HTML templates finished initializing.
+         * It should initialize the engine and continue execution.
+         *
+         * @returns {Promise<AbstractViewer>} The viewer object will be returned after the object was loaded.
+         */
         protected _onTemplatesLoaded(): Promise<AbstractViewer>;
+        /**
+         * Initialize the engine. Retruns a promise in case async calls are needed.
+         *
+         * @protected
+         * @returns {Promise<Engine>}
+         * @memberof Viewer
+         */
         protected _initEngine(): Promise<BABYLON.Engine>;
+        /**
+         * initialize the scene. Calling thsi function again will dispose the old scene, if exists.
+         */
         protected _initScene(): Promise<BABYLON.Scene>;
-        initModel(modelConfig: IModelConfiguration, clearScene?: boolean): ViewerModel
+        /**
+         * Initialize a model loading. The returns object (a ViewerModel object) will be loaded in the background.
+         * The difference between this and loadModel is that loadModel will fulfill the promise when the model finished loading.
+         *
+         * @param modelConfig model configuration to use when loading the model.
+         * @param clearScene should the scene be cleared before loading this model
+         * @returns a ViewerModel object that is not yet fully loaded.
+         */
+        initModel(modelConfig: IModelConfiguration, clearScene?: boolean): ViewerModel;
+        /**
+         * load a model using the provided configuration
+         *
+         * @param modelConfig the model configuration or URL to load.
+         * @param clearScene Should the scene be cleared before loading the model
+         * @returns a Promise the fulfills when the model finished loading successfully.
+         */
         loadModel(modelConfig?: any, clearScene?: boolean): Promise<ViewerModel>;
-        protected _initEnvironment(viewerModel?: ViewerModel): Promise<BABYLON.Scene>;
+        /**
+         * initialize the environment for a specific model.
+         * Per default it will use the viewer'S configuration.
+         * @param model the model to use to configure the environment.
+         * @returns a Promise that will resolve when the configuration is done.
+         */
+        protected _initEnvironment(model?: ViewerModel): Promise<BABYLON.Scene>;
+        /**
+         * Alters render settings to reduce features based on hardware feature limitations
+         * @param options Viewer options to modify
+         */
         protected _handleHardwareLimitations(): void;
+        /**
+         * Injects all the spectre shader in the babylon shader store
+         */
         protected _injectCustomShaders(): void;
+        /**
+         * This will extend an object with configuration values.
+         * What it practically does it take the keys from the configuration and set them on the object.
+         * I the configuration is a tree, it will traverse into the tree.
+         * @param object the object to extend
+         * @param config the configuration object that will extend the object
+         */
         protected _extendClassWithConfig(object: any, config: any): void;
     }
 
     export class DefaultViewer extends AbstractViewer {
         containerElement: HTMLElement;
-        camera: BABYLON.ArcRotateCamera;
+        /**
+         * Create a new default viewer
+         * @param containerElement the element in which the templates will be rendered
+         * @param initialConfiguration the initial configuration. Defaults to extending the default configuration
+         */
         constructor(containerElement: HTMLElement, initialConfiguration?: ViewerConfiguration);
-        initScene(): Promise<BABYLON.Scene>;
+        /**
+         * Overriding the AbstractViewer's _initScene fcuntion
+         */
+        protected _initScene(): Promise<BABYLON.Scene>;
+        /**
+         * This will be executed when the templates initialize.
+         */
         protected _onTemplatesLoaded(): Promise<AbstractViewer>;
+        private _initNavbar();
+        /**
+         * Preparing the container element to present the viewer
+         */
         protected _prepareContainerElement(): void;
+        /**
+         * This function will configure the templates and update them after a model was loaded
+         * It is mainly responsible to changing the title and subtitle etc'.
+         * @param model the model to be used to configure the templates by
+         */
+        protected _configureTemplate(model: ViewerModel): void;
+        /**
+         * This will load a new model to the default viewer
+         * overriding the AbstractViewer's loadModel.
+         * The scene will automatically be cleared of the old models, if exist.
+         * @param model the configuration object (or URL) to load.
+         */
         loadModel(model?: any): Promise<ViewerModel>;
-        initEnvironment(viewerModel?: ViewerModel): Promise<BABYLON.Scene>;
-        showOverlayScreen(subScreen: string): Promise<Template>;
-        hideOverlayScreen(): Promise<Template>;
-        showLoadingScreen(): Promise<Template>;
-        hideLoadingScreen(): Promise<Template>;
+        private _onModelLoaded;
+        /**
+         * Show the overlay and the defined sub-screen.
+         * Mainly used for help and errors
+         * @param subScreen the name of the subScreen. Those can be defined in the configuration object
+         */
+        showOverlayScreen(subScreen: string): Promise<string> | Promise<Template>;
+        /**
+         * Hide the overlay screen.
+         */
+        hideOverlayScreen(): Promise<string> | Promise<Template>;
+        /**
+         * Show the loading screen.
+         * The loading screen can be configured using the configuration object
+         */
+        showLoadingScreen(): Promise<string> | Promise<Template>;
+        /**
+         * Hide the loading screen
+         */
+        hideLoadingScreen(): Promise<string> | Promise<Template>;
+        /**
+         * An extension of the light configuration of the abstract viewer.
+         * @param lightsConfiguration the light configuration to use
+         * @param model the model that will be used to configure the lights (if the lights are model-dependant)
+         */
+        protected _configureLights(lightsConfiguration: {
+            [name: string]: boolean | ILightConfiguration;
+        } | undefined, model: ViewerModel): void;
     }
 }