|
|
|
@ -362,11 +362,45 @@ export default class Clx3dObject extends THREE.Object3D { |
|
|
|
return mergeGeometries(geometries) |
|
|
|
} |
|
|
|
|
|
|
|
// 创建clx叉的背板
|
|
|
|
private static createClxForkBasePlate(): THREE.BufferGeometry { |
|
|
|
// 606.5
|
|
|
|
const width = 0.3 |
|
|
|
const depth = 1.188 |
|
|
|
const dd = 0.05 |
|
|
|
const fdx = 0.06 |
|
|
|
const fdy = 0.03 |
|
|
|
|
|
|
|
const shape = new THREE.Shape(); |
|
|
|
shape.moveTo(-0.744 + 0.1, -0.5); |
|
|
|
shape.lineTo(-0.744 + 0.1, 0.5); |
|
|
|
shape.lineTo(-0.744 + 0.2, 0.5); |
|
|
|
shape.lineTo(-0.744 + 0.2, -0.5); |
|
|
|
shape.closePath() |
|
|
|
|
|
|
|
const curve = new THREE.CatmullRomCurve3( |
|
|
|
[new THREE.Vector3(0, 0.02, 0), new THREE.Vector3(0, 1.287, 0)], |
|
|
|
false, // 闭合曲线
|
|
|
|
'catmullrom', |
|
|
|
0 |
|
|
|
) |
|
|
|
const options = { |
|
|
|
steps: 1, |
|
|
|
bevelSegments: 0.05, |
|
|
|
bevelEnabled: true, |
|
|
|
extrudePath: curve // 设置挤出轨迹
|
|
|
|
} |
|
|
|
const geometry = new THREE.ExtrudeGeometry(shape, options) |
|
|
|
|
|
|
|
return geometry |
|
|
|
} |
|
|
|
|
|
|
|
private static clxPedestalGeometry: THREE.BufferGeometry = null |
|
|
|
private static clxPillarGeometry: THREE.BufferGeometry = null |
|
|
|
private static clxForkGeometry: THREE.BufferGeometry = null |
|
|
|
private static clxGemelGeometryL: THREE.BufferGeometry = null |
|
|
|
private static clxGemelGeometryR: THREE.BufferGeometry = null |
|
|
|
private static clxForkBasePlateGeometry: THREE.BufferGeometry = null |
|
|
|
|
|
|
|
constructor(item: ItemJson, option?: RendererCudOption) { |
|
|
|
super() |
|
|
|
|