build/module/lib/diagram/Diagram3D.js
/**
     *
     * @param canvas The canvas elementId or the HTML canvas element.
     * @param camera Provides the camera (eye, look, and up) parameters.
     * @param prism Provides the viewport (near, far, fov, and aspect) parameters.
     */
@param canvas The canvas elementId or the HTML canvas element.
@param camera Provides the camera (eye, look, and up) parameters.
@param prism Provides the viewport (near, far, fov, and aspect) parameters.
@param canvas The canvas elementId or the HTML canvas element . @param camera Provides the camera ( eye look and up ) parameters . @param prism Provides the viewport ( near far fov and aspect ) parameters .
function Diagram3D(canvas, camera, prism) {
        if (typeof canvas === 'string') {
            var canvasElement = document.getElementById(canvas);
            this.ctx = canvasElement.getContext('2d');
            pointerEvents(canvasElement, 'none');
            position(canvasElement, 'absolute');
        }
        else if (canvas instanceof HTMLCanvasElement) {
            this.ctx = canvas.getContext('2d');
            pointerEvents(canvas, 'none');
            position(canvas, 'absolute');
        }
        else {
            throw new Error("canvas must either be a canvas Id or an HTMLCanvasElement.");
        }
        this.ctx.strokeStyle = "#FFFFFF";
        this.ctx.fillStyle = '#FFFFFF';
        this.ctx.font = '24px Helvetica';
        if (isDefined(camera)) {
            if (isDefined(prism)) {
                this.camera = camera;
                this.prism = prism;
            }
            else {
                this.camera = camera;
                this.prism = prism;
            }
        }
    }
function Diagram3D ( canvas , camera , prism ) { if ( typeof canvas === 'string' ) { var canvasElement = document . getElementById ( canvas ) ; this . ctx = canvasElement . getContext ( '2d' ) ; pointerEvents ( canvasElement , 'none' ) ; position ( canvasElement , 'absolute' ) ; } else if ( canvas instanceof HTMLCanvasElement ) { this . ctx = canvas . getContext ( '2d' ) ; pointerEvents ( canvas , 'none' ) ; position ( canvas , 'absolute' ) ; } else { throw new Error ( "canvas must either be a canvas Id or an HTMLCanvasElement." ) ; } this . ctx . strokeStyle = "#FFFFFF" ; this . ctx . fillStyle = '#FFFFFF' ; this . ctx . font = '24px Helvetica' ; if ( isDefined ( camera ) ) { if ( isDefined ( prism ) ) { this . camera = camera ; this . prism = prism ; } else { this . camera = camera ; this . prism = prism ; } } }
@param canvas The canvas elementId or the HTML canvas element.
@param canvas The canvas elementId or the HTML canvas element .