constructor (parentElement, parameters)
    {
        this.parentElement = parentElement;
        this.parameters = {};
        if (IsDefined (parameters)) {
            this.parameters = parameters;
        }

        this.canvas = document.createElement ('canvas');
        this.parentElement.appendChild (this.canvas);

        this.viewer = new Viewer ();
        this.viewer.Init (this.canvas);

        let width = this.parentElement.clientWidth;
        let height = this.parentElement.clientHeight;
        this.viewer.Resize (width, height);

        if (this.parameters.projectionMode) {
            this.viewer.SetProjectionMode (this.parameters.projectionMode);
        }

        if (this.parameters.backgroundColor) {
            this.viewer.SetBackgroundColor (this.parameters.backgroundColor);
        }

        if (this.parameters.edgeSettings) {
            this.viewer.SetEdgeSettings (this.parameters.edgeSettings);
        }

        if (this.parameters.environmentSettings) {
            this.viewer.SetEnvironmentMapSettings (this.parameters.environmentSettings);
        }

        this.model = null;
        this.modelLoader = new ThreeModelLoader ();

        window.addEventListener ('resize', () => {
            this.Resize ();
        });
    }
@param {HTMLElement} parentElement The parent element for the viewer canvas. It must be an
existing DOM element and it will be the container for the canvas. The size of the viewer will
be automatically adjusted to the size of the parent element.
@param {object} parameters Parameters for embedding.
@param {Camera} [parameters.camera] Camera to use. If not specified, the default camera will
be used and the model will be fitted to the window.
@param {ProjectionMode} [parameters.projectionMode] Camera projection mode.
@param {RGBAColor} [parameters.backgroundColor] Background color of the canvas.
@param {RGBColor} [parameters.defaultColor] Default color of the model. It has effect only
if the imported model doesn't specify any color.
@param {RGBColor} [parameters.defaultLineColor] Default line color of the model. It has effect only
if the imported model doesn't specify any color.
@param {EdgeSettings} [parameters.edgeSettings] Edge settings.
@param {EnvironmentSettings} [parameters.environmentSettings] Environment settings.
@param {function} [parameters.onModelLoaded] Callback that is called when the model with all
of the textures is fully loaded.