Cesium 场景保存参考结构

针对 Cesium 3D 地图场景保存的参考结构

参考 CesiumLab 中场景导出的结构

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
{
    "asset": {
        "type": "ESObjectsManager",
        "version": "0.1.0",
        "createdTime": "2022-06-17T05:54:41.744Z",
        "modifiedTime": "2026-01-23T06:12:48.185Z",
        "name": "图层管理"
    },
    "viewers": [
        {
            "id": "earthui-active-viewer-id",
            "type": "ESCesiumViewer",
            "name": "ESCesiumViewer_r-id",
            "currentTime": 1769140800000,
            "simulationTime": 1769097600000,
            "terrainShader": {
                "slope": {
                    "show": false
                },
                "aspect": {
                    "show": false
                },
                "elevationRamp": {
                    "show": false,
                    "minHeight": -414,
                    "maxHeight": 8777,
                    "color": [
                        [
                            1,
                            0,
                            0,
                            1
                        ],
                        [
                            0,
                            1,
                            0,
                            1
                        ],
                        [
                            0,
                            0,
                            1,
                            1
                        ],
                        [
                            1,
                            1,
                            0,
                            1
                        ],
                        [
                            1,
                            0,
                            1,
                            1
                        ],
                        [
                            1,
                            1,
                            1,
                            1
                        ],
                        [
                            0,
                            1,
                            1,
                            1
                        ]
                    ]
                },
                "elevationContour": {
                    "show": false,
                    "color": [
                        1,
                        0,
                        0,
                        1
                    ],
                    "spacing": 150,
                    "width": 2
                }
            }
        }
    ],
    "sceneTree": {
        "root": {
            "children": [
                {
                    "name": "全球影像",
                    "sceneObj": {
                        "id": "ad6ca6fd-ab5c-407f-950e-57cb8bd579d4",
                        "type": "ESImageryLayer",
                        "name": "全球影像",
                        "url": "https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",
                        "maximumLevel": 18
                    },
                    "children": []
                },
                {
                    "name": "未命名瓦片1",
                    "sceneObj": {
                        "id": "12b71e51-d549-4532-8b95-e46610cf61e0",
                        "type": "ES3DTileset",
                        "name": "未命名瓦片1",
                        "url": "http://localhost/test-fcfh/tileset.json",
                        "maximumScreenSpaceError": 14,
                        "czmEnvironmentMapManager": {
                            "atmosphereScatteringIntensity": 2
                        },
                        "czmBackFaceCulling": false,
                        "materialParams": {
                            "baseColor": [
                                0,
                                0.5,
                                1
                            ]
                        }
                    },
                    "children": []
                }
            ]
        }
    },
    "viewCollection": [],
    "lastView": {
        "position": [
            113.04417065612215,
            28.260342953933232,
            367.3143323635307
        ],
        "rotation": [
            359.9999999999969,
            -45.00328002503869,
            360
        ]
    }
}
Licensed under CC BY-NC-SA 4.0
Gear(夕照)的博客。记录开发、生活,以及一些不足为道的思考……