Cesium3DTileCustomContent

new Cesium.Cesium3DTileCustomContent(options)

2023/12/05 wanghan feat:2266 三维钻孔分析下沉,提供接口支持渲染地矿自定义瓦片类型 自定义渲染类型
Name Type Description
options Object Object with the following properties:
Name Type Description
key String optional 自定义content类型的关键字,也是要注册到Cesium3DTileContent类型的枚举值,对于二进制文件,枚举值就是header中的magic number值,对于 JSON 文件,枚举值是供内部使用的唯一名称,如钻孔类型的key为”drll”。
binaryFormat Boolean optional 自定义content是否支持二进制格式。
option.parseContentFunction function optional 根据当前自定义content类型创建对应Content内容的方法,需提供解析对应类型的方法。
Example:
var tileset = scene.primitives.add(new Cesium.Cesium3DTileset({
     url : 'http://localhost:8002/tilesets/Seattle/tileset.json',
     customContentRegister:{
          DRILL: new Cesium.Cesium3DTileCustomContent {
                    key: 'drll',
                    binaryFormat: true,
                    parseContentFunction: function (tileset, tile, resource, arrayBuffer, byteOffset) {
                        return new GM3DTileDrillContent(tileset, tile, resource, arrayBuffer, byteOffset, Cesium.Cesium3DTileContentFactory);
                 }
          },
     }
}));