查询官网的文档可以看到“This object is normally not instantiated directly, use Cesium3DTileset.fromUrl.”这句话,所以在调用3dtiles数据时应该使用Cesium3DTileset.fromUrl这个方法,相应代码修改如下: var tileset = new Cesium.Cesium3DTileset.fromUrl({ url: "../public/mars3d-max-shihua-3dtiles-master...
import {onMounted, ref} from 'vue' import * as Cesium from 'cesium' onMounted(() => { const viewer = new Cesium.Viewer('cesiumContainer', {}) var tileset = new Cesium.Cesium3DTileset({ url: "../public/mars3d-max-shihua-3dtiles-master/tileset.json", }); viewer.scene.primitives....
查询官网的文档可以看到“This object is normally not instantiated directly, use Cesium3DTileset.fromUrl.”这句话,所以在调用3dtiles数据时应该使用Cesium3DTileset.fromUrl这个方法,相应代码修改如下: var tileset = new Cesium.Cesium3DTileset.fromUrl({ url: "../public/mars3d-max-shihua-3dtiles-master...