官网入门教程:https://cesium.com/learn/cesiumjs-learn/cesiumjs-quickstart/
直接引用官网cesium.js及其样式文件
将下面的代码保存为一个html文件即可看到3D球体。推荐用nginx或其他web服务器发布html访问。
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<style type="text/css">
body,html,.main-part{
background-color: blue;
height: 100%;
width: 100%;
margin: 0;
overflow: hidden;
}
</style>
<script src="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Cesium.js"></script>
<link href="https://cesium.com/downloads/cesiumjs/releases/1.83/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
</head>
<body>
<div class="main-part" id="cesiumContainer"></div>
<script>
viewer = new Cesium.Viewer('cesiumContainer');
</script>
</body>
</html>
效果图: