xyj3d API 文档 - v1.0.0
    正在准备搜索索引...

    函数 toMaterial

    • 把颜色 / 颜色字符串 / 材质描述对象统一转成 Cesium.Material

      注意:Cesium.PolylineCollection 是按 polyline.material.type 分组建 shader 的 (PolylineBucket.updateShader 里直接读 material.shaderSource)。 如果这里塞进去的是 Cesium.Color,type 是 undefined,bucket 的 material 就不是 Material,渲染时抛 Cannot read properties of undefined (reading 'search')。

      参数

      参数名称类型默认值描述信息
      materialstring—材质

      返回 Material

      材质对象