#
luxiaotao1123
2021-12-31 d11d1de794f544d88ed6dbdb5fe86e27d7e017f4
static/js/app.js
@@ -1,7 +1,10 @@
import {OrbitControls} from './lib/OrbitControls.js';
import { PointerLockControls } from './lib/PointerLockControls.js';
import Stats from './lib/stats.module.js';
import { OutlinePass } from './lib/OutlinePass.js';
import { EffectComposer } from './lib/EffectComposer.js';
import { RenderPass } from './lib/postprocessing/RenderPass.js';
import { ShaderPass } from './lib/postprocessing/ShaderPass.js';
import { OutlinePass } from './lib/postprocessing/OutlinePass.js';
import {MTLLoader} from './lib/MTLLoader.js';
import {OBJLoader} from './lib/OBJLoader.js';
import {StoreShelf} from './object/StoreShelf.js';
@@ -49,6 +52,7 @@
         this.initLight();
         this.initReSize(this);
         this.initOutLine();
         this.initComposer();
         this.initObjectSelect();
         this.initPointLockControl(this);
         this.initFloor();
@@ -192,6 +196,12 @@
         this.outlinePass.visibleEdgeColor.set('#B31985');//包围线颜色
         this.outlinePass.hiddenEdgeColor.set('#190a05');//被遮挡的边界线颜色
      }
      this.initComposer = function(){
         this.composer = new EffectComposer(this.renderer);
         const renderPass = new RenderPass( this.scene, this.camera );
         this.composer.addPass( renderPass );
         this.composer.addPass(this.outlinePass);
      }
      this.initObjectSelect = function(){
         new ObjectSelect(this.scene, this.camera, this.outlinePass);
      }