|  |  | 
 |  |  | import {MTLLoader} from "../lib/MTLLoader.js"; | 
 |  |  | import {OBJLoader} from "../lib/OBJLoader.js"; | 
 |  |  | import {Color} from "../three.module.js"; | 
 |  |  |  | 
 |  |  | const xOffset = -1735; | 
 |  |  | const yOffset = -289; | 
 |  |  | 
 |  |  |                 .setMaterials( materials ) | 
 |  |  |                 .setPath( '../static/model/obj/' ) | 
 |  |  |                 .load( '堆垛机本体.obj', function ( obj ) { | 
 |  |  |                     obj.traverse (function (child) { | 
 |  |  |                         if (child instanceof THREE.Mesh) { | 
 |  |  |                             child.material = new THREE.MeshLambertMaterial({ | 
 |  |  |                                 color: 0xCD6839 | 
 |  |  |                             }); | 
 |  |  |                         } | 
 |  |  |                     }); | 
 |  |  |  | 
 |  |  |                     obj.scale.set(0.03, 0.03, 0.03); | 
 |  |  |                     obj.rotateY(- Math.PI / 2); | 
 |  |  |                     obj.name = option.crnNo + "-body"; | 
 |  |  | 
 |  |  |                 .setMaterials( materials ) | 
 |  |  |                 .setPath( '../static/model/obj/' ) | 
 |  |  |                 .load( '载货台.obj', function ( obj ) { | 
 |  |  |                     obj.traverse (function (child) { | 
 |  |  |                         if (child instanceof THREE.Mesh) { | 
 |  |  |                             child.material = new THREE.MeshLambertMaterial({ | 
 |  |  |                                 color: 0xD2691E | 
 |  |  |                             }); | 
 |  |  |                         } | 
 |  |  |                     }); | 
 |  |  |  | 
 |  |  |                     obj.scale.set(0.03, 0.03, 0.03); | 
 |  |  |                     obj.rotateY(- Math.PI / 2); | 
 |  |  |                     obj.name = option.crnNo + "-load"; | 
 |  |  | 
 |  |  |                 .setMaterials( materials ) | 
 |  |  |                 .setPath( '../static/model/obj/' ) | 
 |  |  |                 .load( '货叉.obj', function ( obj ) { | 
 |  |  |                     obj.traverse (function (child) { | 
 |  |  |                         if (child instanceof THREE.Mesh) { | 
 |  |  |                             child.material = new THREE.MeshLambertMaterial({ | 
 |  |  |                                 color: 0x363636 | 
 |  |  |                             }); | 
 |  |  |                         } | 
 |  |  |                     }); | 
 |  |  |  | 
 |  |  |                     obj.scale.set(0.03, 0.03, 0.03); | 
 |  |  |                     obj.rotateY(- Math.PI / 2); | 
 |  |  |                     obj.name = option.crnNo + "-fork"; |