public render()

in src/component/image/ImageGLRenderer.ts [139:191]


    public render(
        perspectiveCamera: THREE.PerspectiveCamera,
        renderer: THREE.WebGLRenderer): void {

        const planes: { [key: string]: THREE.Mesh } = this._scene.planes;
        const planesOld: { [key: string]: THREE.Mesh } = this._scene.planesOld;
        const planesPeriphery: { [key: string]: THREE.Mesh } = this._scene.planesPeriphery;

        const planeAlpha: number = Object.keys(planesOld).length ? 1 : this._alpha;
        const peripheryAlpha: number = Object.keys(planesOld).length ? 1 : Math.floor(this._alpha);

        for (const key in planes) {
            if (!planes.hasOwnProperty(key)) {
                continue;
            }

            const plane: THREE.Mesh = planes[key];
            (<ProjectorShaderMaterial>plane.material).uniforms.opacity.value = planeAlpha;
        }

        for (const key in planesOld) {
            if (!planesOld.hasOwnProperty(key)) {
                continue;
            }

            const plane: THREE.Mesh = planesOld[key];
            (<ProjectorShaderMaterial>plane.material).uniforms.opacity.value = this._alphaOld;
        }

        for (const key in planesPeriphery) {
            if (!planesPeriphery.hasOwnProperty(key)) {
                continue;
            }

            const plane: THREE.Mesh = planesPeriphery[key];
            (<ProjectorShaderMaterial>plane.material).uniforms.opacity.value = peripheryAlpha;
        }

        renderer.render(this._scene.scenePeriphery, perspectiveCamera);
        renderer.render(this._scene.scene, perspectiveCamera);
        renderer.render(this._scene.sceneOld, perspectiveCamera);

        for (const key in planes) {
            if (!planes.hasOwnProperty(key)) {
                continue;
            }

            const plane: THREE.Mesh = planes[key];
            (<ProjectorShaderMaterial>plane.material).uniforms.opacity.value = this._alpha;
        }

        renderer.render(this._scene.scene, perspectiveCamera);
    }