本文整理汇总了TypeScript中THREE.Mesh.lookAt方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Mesh.lookAt方法的具体用法?TypeScript Mesh.lookAt怎么用?TypeScript Mesh.lookAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类THREE.Mesh
的用法示例。
在下文中一共展示了Mesh.lookAt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: generateFaultPlane
private generateFaultPlane(orientation, size, color, opacity) {
let circleRadius = size
let circleShape = new three.Shape()
circleShape.moveTo(0, circleRadius)
circleShape.quadraticCurveTo(circleRadius, circleRadius, circleRadius, 0)
circleShape.quadraticCurveTo(circleRadius, -circleRadius, 0, -circleRadius)
circleShape.quadraticCurveTo(-circleRadius, -circleRadius, -circleRadius, 0)
circleShape.quadraticCurveTo(-circleRadius, circleRadius, 0, circleRadius)
let geometry = new three.ShapeGeometry(circleShape)
let material = new three.MeshLambertMaterial({
color: color,
vertexColors: three.VertexColors,
side: three.DoubleSide,
transparent: true,
opacity: opacity
})
let plane = new three.Mesh(geometry, material)
plane.lookAt(new three.Vector3(orientation[0], orientation[1], orientation[2]))
return plane
}