BoxHelper 边框助手

—> LineSegments —> Object3D

展示对象在世界坐标轴对齐的编辑框。对象必须具有GeometryBufferGeometry 才能工作, 因此它不适用于Sprites。

function BoxHelper( object, color ) { } var geometry = new THREE.TorusKnotGeometry(5, 1, 64, 10, -1, 3), material = new THREE.MeshBasicMaterial({color: 0x663399, side: THREE.DoubleSide, wireframe: true}), mesh = new THREE.Mesh( geometry, material ); scene.add(mesh); var helper = new THREE.BoxHelper(mesh, 0xffffff); scene.add(helper);

Constructor

object color
Object3D Hexadecimal value, default: 0xffff00
3D对象 十六进制的颜色值

Methods

setFromObject( object ) : this
object Object3D 3D对象

更新边框助手里的几何体。

update( ) : null

更新相框。