yuliang 6 months ago
parent
commit
91b1aea8e9
  1. 14
      src/example/example1.js
  2. 6
      src/modules/cl2/Cl23dObject.ts
  3. 2
      src/modules/cl2/Cl2Entity.ts
  4. 6
      src/modules/clx/Clx3dObject.ts
  5. 2
      src/modules/clx/ClxEntity.ts

14
src/example/example1.js

@ -205,27 +205,27 @@ export default {
}, },
{ {
id: '6Vu3dX1V7Si0ISWIiCkoEh', t: 'gstore', v: true, strokeWidth: 0.1, id: '6Vu3dX1V7Si0ISWIiCkoEh', t: 'gstore', v: true, strokeWidth: 0.1,
tf: [[1.5, 0.1, 0.63], [0, 90, 0], [1, 0.01, 1]], tf: [[1.5, 0, 0.63], [0, 90, 0], [1, 0, 1]],
dt: { in: [], out: [], center: [], storeWidth: 1.1 } dt: { in: [], out: [], center: [], storeWidth: 1.1 }
}, },
{ {
id: '592UY0EMScbwIyQqgs8aAs', t: 'gstore', v: true, strokeWidth: 0.1, id: '592UY0EMScbwIyQqgs8aAs', t: 'gstore', v: true, strokeWidth: 0.1,
tf: [[3.9, 0.1, 0.63], [0, 90, 0], [1, 0.01, 1]], tf: [[3.9, 0, 0.63], [0, 90, 0], [1, 0, 1]],
dt: { in: [], out: [], center: [] } dt: { in: [], out: [], center: [] }
}, },
{ {
id: '38TYyVWMGLf8OogQMIiSOz', t: 'gstore', v: true, strokeWidth: 0.1, id: '38TYyVWMGLf8OogQMIiSOz', t: 'gstore', v: true, strokeWidth: 0.1,
tf: [[7.1, 0.1, 2.865], [0, 0, 0], [1, 0.01, 1]], tf: [[7.1, 0, 2.865], [0, 0, 0], [1, 0, 1]],
dt: { in: [], out: [], center: [] } dt: { in: [], out: [], center: [] }
}, },
{ {
id: '1hAaZ1xtvukZowAKeWAcqs', t: 'gstore', v: true, strokeWidth: 0.1, id: '1hAaZ1xtvukZowAKeWAcqs', t: 'gstore', v: true, strokeWidth: 0.1,
tf: [[7.1, 0.1, 4.35], [0, 0, 0], [1, 0.01, 1]], tf: [[7.1, 0, 4.35], [0, 0, 0], [1, 0, 1]],
dt: { in: [], out: [], center: [] } dt: { in: [], out: [], center: [] }
}, },
{ {
id: '28GxDYUqDwZc2WsOgMU2wi', t: 'gstore', v: true, strokeWidth: 0.1, id: '28GxDYUqDwZc2WsOgMU2wi', t: 'gstore', v: true, strokeWidth: 0.1,
tf: [[7.1, 0.1, 6.75], [0, 90, 0], [1, 0.01, 1]], tf: [[7.1, 0, 6.75], [0, 90, 0], [1, 0, 1]],
dt: { in: [], out: [], center: [] } dt: { in: [], out: [], center: [] }
}, },
{ {
@ -325,12 +325,12 @@ export default {
}, },
{ {
id: 'ptr1', t: 'cl2', v: true, id: 'ptr1', t: 'cl2', v: true,
tf: [[5.65, 0.1, 2.13], [0, -90, 0], [1, 1, 1]], tf: [[5.65, 0, 2.13], [0, -90, 0], [1, 1, 1]],
dt: { in: [], out: [], center: [], ptrWidth: 1.5, ptrDepth: 1.5, ptrHeight: 1.98 } dt: { in: [], out: [], center: [], ptrWidth: 1.5, ptrDepth: 1.5, ptrHeight: 1.98 }
}, },
{ {
id: 'clx1', t: 'clx', v: true, id: 'clx1', t: 'clx', v: true,
tf: [[1.5, 0.1, 2.13], [0, 0, 0], [1, 1, 1]], tf: [[1.5, 0, 2.13], [0, 0, 0], [1, 1, 1]],
dt: { in: [], out: [], center: [], clxWidth: 1.65, clxDepth: 1.65, clxHeight: 3.393 } dt: { in: [], out: [], center: [], clxWidth: 1.65, clxDepth: 1.65, clxHeight: 3.393 }
}, },
{ {

6
src/modules/cl2/Cl23dObject.ts

@ -368,12 +368,12 @@ export default class Cl23dObject extends THREE.Object3D {
if (pz > -1) { if (pz > -1) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = -0.05 + bh - a.y child.position.y = bh - a.y
} }
} else if (a.y < 0.1 ) { } else if (a.y < 0.11 ) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = -0.05 + 0.15 - a.y child.position.y = 0.11 - a.y
} }
} }
} }

2
src/modules/cl2/Cl2Entity.ts

@ -54,7 +54,7 @@ export default class Cl2Entity extends BaseEntity {
this.isLoading = true this.isLoading = true
// 将物品拾取到机械臂上 // 将物品拾取到机械臂上
const mesh = this.pickupItem(item) const mesh = this.pickupItem(item)
mesh.position.set(0, -0.05, -0.15) mesh.position.set(0, 0, -0.15)
mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0) mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0)
ptrForkMesh.add(mesh) ptrForkMesh.add(mesh)
})) }))

6
src/modules/clx/Clx3dObject.ts

@ -646,12 +646,12 @@ export default class Clx3dObject extends THREE.Object3D {
if (a.z > -1) { if (a.z > -1) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = -0.05 + bh - a.y child.position.y = bh - a.y
} }
} else if (a.y < 0.1 ) { } else if (a.y < 0.11 ) {
for (let i = 0; i < children.length; i++) { for (let i = 0; i < children.length; i++) {
const child = children[i] const child = children[i]
child.position.y = -0.05 + 0.15 - a.y child.position.y = 0.11 - a.y
} }
} }
} }

2
src/modules/clx/ClxEntity.ts

@ -50,7 +50,7 @@ export default class ClxEntity extends BaseEntity {
this.isLoading = true this.isLoading = true
// 将物品拾取到机械臂上 // 将物品拾取到机械臂上
const mesh = this.pickupItem(item) const mesh = this.pickupItem(item)
mesh.position.set(0, -0.05, -0.2) mesh.position.set(0, 0, -0.2)
mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0) mesh.rotation.set(0, THREE.MathUtils.degToRad(90), 0)
ptrForkMesh.add(mesh) ptrForkMesh.add(mesh)
})) }))

Loading…
Cancel
Save