#
luxiaotao1123
2021-12-28 e66a6ede214be7025397d7300a45ad5b2766b72d
#
1个文件已修改
11 ■■■■ 已修改文件
static/js/app.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/js/app.js
@@ -30,7 +30,7 @@
        this.direction = new THREE.Vector3();
        this.raycaster = null;
        this.prevTime = performance.now();//上一次render的时间
        this.backgroundType = false;
        this.backgroundType = true;
        this.start = function () {
            this.initMain();
@@ -76,12 +76,11 @@
            }
        }
        this.initRenderer = function () {
            this.renderer = new THREE.WebGLRenderer();
            this.renderer = new THREE.WebGLRenderer({
                antialias: true,
                logarithmicDepthBuffer: true
            });
            // this.renderer.toneMapping = THREE.CineonToneMapping;    // 色调
            this.renderer.setSize(window.innerWidth, window.innerHeight);
            this.renderer.setPixelRatio( window.devicePixelRatio );
            this.renderer.shadowMap.enabled = true;
@@ -298,8 +297,10 @@
            // const helper = new THREE.PolarGridHelper( 2000, 100 );
            const helper = new THREE.GridHelper( 8000, 300 );
            helper.position.y = - 0;
            const helper = new THREE.GridHelper( 8000, 300);
            helper.position.x = 1200;
            helper.position.y = - 1;
            helper.position.z = -2000;
            helper.material.opacity = 0.25;
            helper.material.transparent = true;
            this.addObject( helper );