#
luxiaotao1123
2024-04-09 feab805274b79f2bbe76033782027f79cbc99566
#
1个文件已修改
12 ■■■■ 已修改文件
zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zy-asrs-flow/src/pages/map/drawer/shelf/shelfThree.js
@@ -50,11 +50,11 @@
    }
    getFullWidth = () => {
        return this.dom.offsetWidth;
        return this.dom?.offsetWidth;
    }
    getFullHeight = () => {
        return this.dom.offsetHeight;
        return this.dom?.offsetHeight;
    }
    addObject = (object) => {
@@ -90,7 +90,7 @@
        renderer.toneMapping = THREE.ACESFilmicToneMapping;
        renderer.setPixelRatio(window.devicePixelRatio);
        renderer.setSize(this.getFullWidth(), this.getFullHeight());
        this.dom.appendChild(renderer.domElement);
        this.dom?.appendChild(renderer.domElement);
        return renderer;
    }
@@ -136,7 +136,7 @@
    initStats = () => {
        const stats = new Stats();
        this.dom.appendChild(stats.dom);
        this.dom?.appendChild(stats.dom);
        if (!help) {
            stats.domElement.style.display = 'none';
        }
@@ -183,7 +183,7 @@
                this.handleClick(objName, x, y);
            }
        }
        this.dom.addEventListener("click", this.handleClickEvent, false);
        this.dom?.addEventListener("click", this.handleClickEvent, false);
    }
    generateMesh = (fn) => {
@@ -234,7 +234,7 @@
            this.controls.dispose();
            this.controls = null;
        }
        this.dom.removeEventListener("click", this.handleClickEvent);
        this.dom?.removeEventListener("click", this.handleClickEvent);
        this.camera = null;
        this.objects = [];
        while (this.dom?.firstChild) {