#
luxiaotao1123
2021-12-11 5b941c4a6c6c6b494f65486ca87c46c978cb53e1
static/js/app.js
@@ -29,6 +29,7 @@
         this.initLight();
         this.initFloor();
         this.initModel();
         this.initModel0();
         this.initStoreObjects(this);
      }
      this.animate = function () {
@@ -56,7 +57,7 @@
         // this.camera.position.z = 600;
         // //相机的朝向
         // this.camera.lookAt(0, 0, 0);
         this.camera.position.set( - 550, 2070, 4550 );
         this.camera.position.set( - 350, 1070, 1550 );
         this.camera.lookAt( this.scene.position );
         //将相机放到场景中
         this.scene.add(this.camera);
@@ -185,6 +186,7 @@
            initStore();
            if (Store3DData !== null) {
               for(var group of Store3DData.data.store.groups) {
                  let crn = new StoreCrn(group.crn, object);
                  for (var line of group.lines) {
                     let shelf = new StoreShelf(line);
                     object.addObject(shelf);
@@ -258,6 +260,9 @@
            }
         }
      }
      this.initModel0 = function () {
      }
      this.getExistedGoodType=function(state){
         for (let i=0;i<this.goodTypes.length;i++) {
            let type=this.goodTypes[i];
@@ -301,11 +306,11 @@
                  .setMaterials( materials )
                  .setPath( '../static/model/obj/' )
                  .load( '货叉.obj', function ( object ) {
                     // object.position.z = -500;
                     // object.position.x = -2060;
                     object.position.z = 0;
                     object.position.x = 0;
                     object.position.y = 0;
                     object.position.z = -500;
                     object.position.x = -2060;
                     // object.position.z = 0;
                     // object.position.x = 0;
                     // object.position.y = 0;
                     object.scale.set(0.025, 0.025, 0.025);
                     object.rotateY(- Math.PI / 2)
                     that.addObject( object );