cesium贴图

entiyty方式加载的

var outlineOnly = viewer.entities.add({
  name : 'Yellow box outline',
  position: Cesium.Cartesian3.fromDegrees(-100.0, 40.0, 300000.0),
  box : {
    dimensions : new Cesium.Cartesian3(400000.0, 300000.0, 500000.0),
    outline : true,
    outlineColor : Cesium.Color.YELLOW,
    // material:new Cesium.Material.fromType('Image', {
    //   image : '../../static/4.png',
    // })
    material: new Cesium.ImageMaterialProperty({
      image : '../../static/4.png'
    })

  },

});

primitive方式加载的

 var arrowMaterial = new Cesium.Material.fromType('Image', {
     image : './4.png',
     repeat : {
         x : -1,
         y : 1
     }
 });
let instance = new Cesium.BoxGeometry({
     maximum : new Cesium.Cartesian3(250000.0, 250000.0, 250000.0),
     minimum : new Cesium.Cartesian3(-250000.0, -250000.0, -250000.0)
 });
 let pr=new Cesium.Primitive({
     geometryInstances : new Cesium.GeometryInstance({
         geometry: instance,
         modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
             Cesium.Cartesian3.fromDegrees(-75.59777, 40.03883)), new Cesium.Cartesian3(0.0, 0.0, 1000000.0), new Cesium.Matrix4()),
     }),
     appearance : new Cesium.MaterialAppearance({
         material : arrowMaterial
     })
 })

 

着色器方式加载的:

https://blog.csdn.net/A873054267/article/details/103953662?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522158916491219726869061882%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=158916491219726869061882&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_v2~rank_v25-8-103953662.nonecase&utm_term=%E7%9D%80%E8%89%B2%E5%99%A8

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值