Camera

此类描述json相机相关字段 (默认节点,建议直接套用)

AllCameraDemo

Camera AllCameraDemo ()

相机示例

sample:
{
"name": "mainCamera",
"type": "camera",
"visible": "1",
"position": "0,5,70",
"scale": "1,1,1",
"rotation": "0,0,0",
"children": [],
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
   {
      "eyePos": "768,0,1536",
      "centerPos": "0,0,0",
      "upDirection": "0,1,0"
    }
}
},
{
"name": "mainCamera2”,
"type": "camera",
"visible": "1",
"position": "0,5,70",
"scale": "1,1,1",
"rotation": "0,0,0",
"children": [],
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 100.0,
   "zFar": 5000.0,
   "cameraDefaultLookAt":
     {
        "eyePos": "768,0,1536",
        "centerPos": "0,0,0",
        "upDirection": “0,0,1”
      }
}
}

version 8

cameraDefaultLookAt

默认相机节点属性配置(number 类型)

sample:
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
    {
       "eyePos": "768,0,1536",
       "centerPos": "0,0,0",
       "upDirection": "0,1,0"
     }
}

cameraNodeSuppl  

相机节点属性配置(number 类型)

sample:
"cameraNodeSuppl": 
{
   "fov": 56,
   "zNear": 20.0,
   "zFar": 1000.0,
   "cameraDefaultLookAt":
   {
      "eyePos": "768,0,1536",
      "centerPos": "0,0,0",
      "upDirection": "0,1,0"
   }
}

centerPos  

相机焦点位置

sample:
详见:"cameraDefaultLookAt"字段

eyePos  

默认相机位置

sample:
详见:"cameraDefaultLookAt"字段

fov  

待定

sample:
详见:"cameraDefaultLookAt"字段

name  

camera,Camera节点名使用其type (string 类型)

sample:
"nodeList":[
{
   "name":"mianCamera"
}
]

position  

位置 (string 类型)

sample:
"nodeList":[
{
   "position":"1,1,1"
}
]

rotation  

旋转 (string 类型)

sample:
"nodeList":[
{
   "rotation":"90,0,0"
}
]

scale  

大小 (string 类型)

sample:
"nodeList":[
{
   "scale":"1,1,1"
}
]

type  

当前节点类型 (string 类型)

sample:
"nodeList":[
{
   "type":"camera"
}
]

upDirection  

相机朝向

sample:
详见:"cameraDefaultLookAt"字段

visible  

是否显示 (1 显示 0 隐藏)(number 类型)

sample:
"nodeList":[
{
   "visible":0
}
]

zFar  

Z轴最远距离

sample:
详见:"cameraNodeSuppl"字段

zNear  

Z轴最近距离

sample:
详见:"cameraNodeSuppl"字段