[page:LineSegments] →

摄像机辅助工具([name])

它将会显示摄像机,包括摄像机的视锥体。
它使用[page:LineSegments](线段)来显示摄像机视锥体。

示例

[example:webgl_camera WebGL / camera]
[example:webgl_geometry_extrude_splines WebGL / extrude / splines]
var camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 ); var helper = new THREE.CameraHelper( camera ); scene.add( helper );

构造器

[name]( [param:Camera camera] )

[page:Camera camera] -- 将会被CameraHelper可视化的相机。

为特定的摄像机创建一个新的 [Name]。

属性

请参阅其基类[page:LineSegments]来查看共有属性。

[property:Camera camera]

将会被可视化的摄像机。

[property:object pointMap]

它包括了用于可视化相机的点。 This contains the points used to visualize the camera.

[property:object matrix]

对[page:Object3D.matrixWorld camera.matrixWorld]的引用。

[property:object matrixAutoUpdate]

请参阅[page:Object3D.matrixAutoUpdate]。在这里将其设置为*false*,因为辅助工具使用的是 相机的[page:Object3D.matrixWorld matrixWorld]。

方法

请参阅其基类[page:LineSegments]来查看共有方法。

[method:null update]()

基于摄像机的projectionMatrix(投影矩阵)来更新辅助工具。

源代码

[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]