Merge remote-tracking branch 'origin/Four-Way-Rack' into Four-Way-Rack
| | |
| | | generateMesh = (fn) => { |
| | | // fn(this.addObject); |
| | | const loader = new FBXLoader(); |
| | | const promise = new Promise((resolve) => { |
| | | loader.load('model/001-5.fbx', (mesh) => { |
| | | mesh.position.set(0, 10, 0); |
| | | mesh.scale.set(5, 5, 5); |
| | | mesh.name = '0100101'; |
| | | mesh.name = '1-1-1'; |
| | | // mesh.rotation.x = Utils.rotationParseNum(270); |
| | | mesh.traverse(function (child) { |
| | | if (child.isMesh) { |
| | | child.name = '0100101'; |
| | | child.name = '1-1-1'; |
| | | child.castShadow = true; |
| | | child.receiveShadow = true; |
| | | } |
| | | }); |
| | | this.addObject(mesh); |
| | | resolve(); |
| | | }) |
| | | }) |
| | | return promise; |
| | | } |
| | | |
| | | setNewSelectedMesh = (objName) => { |
| | |
| | | palletMesh.position.set(0, 70 + 100 * (lev - 1), 0); |
| | | addObject(palletMesh) |
| | | } |
| | | }); |
| | | }).then(() => { |
| | | shelfThree.setNewSelectedMesh(locNo); |
| | | }); |
| | | } |
| | | } |
| | | |