1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
| function StoreCrn(option, object) {
| console.log(option);
| this.crnLength = option.crnBody.length||50;//库位长度
| this.crnWidth = option.crnBody.width||50;//库位宽
| this.crnHeight = option.crnBody.height||500;//库位高
|
| // 立柱
| var a = new THREE.Mesh(new THREE.BoxBufferGeometry(this.crnLength, this.crnHeight, this.crnWidth), new THREE.MeshBasicMaterial({
| color: 0x00ffff,
| transparent: true,
| opacity: .8
| }))
| a.position.x = option.crnBody.position.x;
| a.position.y = option.crnBody.position.y + this.crnHeight/2;
| a.position.z = option.crnBody.position.z - this.crnWidth/2;
| object.addObject(a);
| // 载货台
| var b = new THREE.Mesh(new THREE.BoxBufferGeometry(10,10,10), new THREE.MeshBasicMaterial({
| color: 0x0000ff,
| transparent: true,
| opacity: 1
| }))
| b.position.x = option.crnLoad.position.x;
| b.position.y = 0;
| b.position.z = 0;
| object.addObject(b);
| // 叉牙
| var c = new THREE.Mesh(new THREE.BoxBufferGeometry(5,5,5), new THREE.MeshBasicMaterial({
| color: 0xff00ff,
| transparent: true,
| opacity: 1
| }))
| c.position.x = option.crnFork.position.x;
| c.position.y = 0;
| c.position.z = 0;
| object.addObject(c);
|
| }
|
|