這是 **配置數據** 的結構體樣例
```
{
'global': {
'proj_url': './VSF/',
'bg_style': 'background-color: #000; background-image: linear-gradient(#333, #111); ',
},
'designer_data': {
'folder': [
{
'title': '基礎',
'id': 'a',
'parent': '',
},
{
'title': '高級',
'id': 'b',
'parent': '',
},
],
},
'style_lib': {
'default': {
'__DEFAULT__': {
'face': '{color: "#00BFFF", transparent:0, opacity:0.3, depthTest: 0, }',
'texture': '',
'line': '{color: "#00BFFF", }',
},
'CommonStyle_01-obj': {
'face': '{color: "#00FFFF", transparent:0, opacity:0.3, depthTest: 0, }',
'texture': '',
'line': '{color: "#00FFFF", }',
},
},
'emphasis': {
'__DEFAULT__': {
'face': '{emissive: "#FFFFFF", opacity:0.5, }',
'texture': '',
'line': '',
},
'CommonStyle_01': {
'face': '{emissive: "#FFFFFF", opacity:0.4, }',
'texture': '',
'line': '',
},
'CommonStyle_02': {
'face': '{emissive: "#000000", opacity:0.5, }',
'texture': '',
'line': '',
},
},
'status': {
'success': {
'face': '{color: "#7FFF00", opacity:0.6, }',
'texture': '',
'line': '{color: "#7FFF00", }',
},
'info': {
'face': '{color: "#00BFFF", opacity:0.6, }',
'texture': '',
'line': '{color: "#00BFFF", }',
},
'question': {
'face': '{color: "#FFFF00", opacity:0.6, }',
'texture': '',
'line': '{color: "#FFFF00", }',
},
'warning': {
'face': '{color: "#FF9326", opacity:0.6, }',
'texture': '',
'line': '{color: "#FF9326", }',
},
'danger': {
'face': '{color: "#FF0000", opacity:0.6, }',
'texture': '',
'line': '{color: "#FF0000", }',
},
},
},
'environ': {
'use_label' : true,
'use_infobox' : true,
'use_icon' : true,
'use_2Dscale' : 1,
'use_stats' : 1,
'use_axis_helper': 1,
'animate_coef' : 1,
'group_navbar': {
'in_use': false,
'category': [
{
'id': 'test',
'label': '測試',
'active': 1,
'row': 1,
},
],
'style': 'top:15px; right:15px;',
},
'fog': {
'in_use': false,
'color': '#777777',
'min': 0,
'max': 2000,
},
},
'camera': {
'polar_angle': {
'default': Math.PI/4,
'max': Math.PI/2.01,
'min': Math.PI/18,
'in_use': true,
},
'azimuthal_angle': {
'default': -Math.PI/180*60,
'max': Infinity,
'min': -Infinity,
'in_use': true,
},
'distance': {
'default': 1400,
'max': 9999,
'min': 10,
'in_use': true,
},
'look_at': {
'type': 'center', // center,position
'position': {
'x': 0, 'y': 0, 'z': 0,
},
'offset': {
'x': 0, 'y': 0, 'z': 0,
},
},
'auto_rotate': {
'in_use': true,
'speed': 0.07,
},
},
'ground': {
'size' : {
'x': 300, 'y': 300,
},
'position_offset': {
'x': 0, 'y': 0, 'z': -0.5,
},
'style': {
'color': {
'face': {
'texture': '',
// 'normal': '{ transparent:true, opacity:0.4, wireframe:false, depthTest: false, }',
'normal': '{ color: "#000000", transparent:0, opacity:0.4, side:2, depthTest: false, }',
},
'line': '{color: "#000000", linewidth: 1, }',
// 'line': '{color: "#444", linewidth: 1, }',
},
},
},
'light': {
'ambient_light': {
'color': '#FFFFFF',
'intensity': 1,
},
'directional_light': [
{
'color': '#FFFFFF',
'intensity': 0.2,
'position' : {
'x': 100, 'y': 0, 'z': 100,
},
'size': {
'width': 1000,
'height': 1000,
},
'depth': {
'near': 0.1,
'far': 9999,
},
},
],
'point_light': [
{
'color': '#FFFFFF',
'intensity': 0.05,
'distance': 500,
'position' : {
'x': 100, 'y': 100, 'z': 300,
},
}
],
},
};
```
| 參數 | 名稱 | 說明 |
| --- | --- | --- |
| global | 全局配置 | |
| designer_data | 可視化構建專用 | |
| style_lib | 樣式庫 | |
| environ | 環境配置 | |
| camera | 攝像機 | |
| ground | 地面 | |
| light | 光源 | |
- 序言
- 簡介
- 為何選擇
- 框架特點
- 運行性能
- 開始使用
- 目錄結構
- 運行環境
- 如何使用
- 可視化設計
- 簡介
- 如何使用
- 基礎
- 目錄結構
- 配置數據
- 結構
- global
- style_lib
- default
- emphasis
- status
- environ
- camera
- ground
- light
- ambient_light
- directional_light
- point_light
- designer_data
- 物體數據
- 結構
- 通用參數
- 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
- update
- query
- 攝像機類
- get
- set
- reset
- auto_rotate
- 雜項
- 聯系