### 設置攝像機
```
MyVirtualScene.api.camera.set({
'target': 物體ID,
// 'target': [100,120,0],
'step': 0.05,
'polar_angle': Math.PI/6,
'azimuthal_angle': -0.5*Math.PI,
'distance': 500,
});
```
* 以上各參數均可獨立進行調整,即:可以單獨設置某一項,或同時設置多項。
| 參數 | 說明 | 格式 | 備注 |
| --- | --- | --- | --- | --- |
| target | 焦點 | String 或 Array | 如果設為物體ID,則會聚焦該物體<br />如果設為xyz坐標,則會聚焦該坐標點 |
| step | 攝像機運動時的步進 | Number | 范圍:0 ~ 1 |
| polar_angle | 方位角 | Number | 范圍:Math.PI/2 |
| azimuthal_angle | 極角 | Number | 范圍:-Infinity ~ Infinity |
| distance | 攝像機距離焦點的距離 | Number | 范圍:0 ~ Infinity |
<br />
- 序言
- 基礎
- 如何使用
- 目錄結構
- 配置數據
- 結構
- global
- style_lib
- default
- emphasis
- status
- environ
- camera
- ground
- light
- ambient_light
- directional_light
- point_light
- 物體數據
- 結構
- 通用參數
- id
- name
- style
- advgeom
- visible
- status
- param
- property
- scale
- align
- position
- rotation
- label
- infobox
- icon
- linkline
- float
- intersect
- animate
- rotate
- shuttle
- pipeline
- flow
- route
- 多個動畫
- 基礎物體
- 平面 Plane
- 圓平面 Circle
- 環平面 Ring
- 立方體 Cube
- 球體 Sphere
- 圓柱體 Cylinder
- 圓環體 Torus
- 管道 Tube
- 曲面 Spline
- 墻 Wall
- 拔高體 Raise
- 正四面體 Tetrahedron
- 正八面體 Octahedron
- 正二十面體 Icosahedron
- 接口
- 先讀我
- 物體類
- visible
- position
- scale
- rotation
- icon
- label
- infobox
- intersect
- param
- status
- animate
- list
- remove
- add
- 攝像機類
- get
- set
- reset
- auto_rotate
- 聯系