ZhangXianQiang
2024-04-17 dda78e2eb4a04f55d01de2645b4a6abc821cc8f9
src/views/screen/components/screen-map-three/experience/index.js
@@ -1,5 +1,5 @@
import { Scene, GridHelper,AxesHelper } from 'three';
import Stats from "three/examples/jsm/libs/stats.module";
import World from "./world/world";
import Camera from "./camera";
@@ -19,11 +19,14 @@
    this.renderer = new Renderer(this);
    this.world = new World(this);
    const size = 10;
    const divisions = 10;
    // const size = 200;
    // const divisions = 200;
    const gridHelper = new GridHelper(size, divisions);
    this.scene.add(gridHelper);
    // const gridHelper = new GridHelper(size, divisions);
    // this.scene.add(gridHelper);
    this.stats = new Stats();
    document.querySelector('.map-container').appendChild(this.stats.dom);
    
@@ -37,5 +40,6 @@
    this.camera.update();
    this.world.update();
    this.renderer.update();
    this.stats.update();
  }
}