首頁 / 浏覽問題 / 三維GIS / 問題詳情
entities 屬性polygon、wall牆面如何添加多張紋理圖片
72EXP 2022年08月30日

wall 牆面屬性如何添加多張紋理圖片,使用wall 繪制了(le/liǎo)一(yī / yì /yí)個(gè) 正方形 房子(zǐ)如何給房子(zǐ)四面添加上(shàng)不(bù)同的(de)紋理圖片;

polygon 房頂面如何給添加單張紋理圖片呢

   var ploywall = viewer.entities.add({
            crossguid: crossguid,
            name: 'gltf',
            polygon: {     // 面
              hierarchy: Cesium.Cartesian3.fromDegreesArrayHeights(nodePositionArr),
              perPositionHeight: true,     //按照指定高度狀态
              shadows: Cesium.ShadowMode.ENABLED,
              material: Cesium.Color.PERU,
              // heightReference:Cesium.HeightReference.NONE,
              distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 5000),
              fill: true,    // 是(shì)否被提供的(de)材質填充
              closeTop: true,      //關閉向上(shàng)拉伸狀态
              closeBottom: true,   //關閉向下拉伸狀态
              // 是(shì)否顯示
              show: true,
              outline: false,
            },
            wall: {   //牆
              height: 100,
              positions: Cesium.Cartesian3.fromDegreesArrayHeights(nodePositionArr),
              shadows: Cesium.ShadowMode.ENABLED,
              material: Cesium.Color.SIENNA,
              maximumHeights: maximumHeights,
              minimumHeights: minimumHeights,
              distanceDisplayCondition: new Cesium.DistanceDisplayCondition(0, 5000),
              fill: true,     // 是(shì)否被提供的(de)材質填充
              show: true,    // 是(shì)否顯示
            }
          });

問題關閉原因: 未解決

1個(gè)回答

您好,

您參考一(yī / yì /yí)下博客https://blog.csdn.net/weixin_45782925/article/details/122895050

或者在(zài)API中搜索WallGeometry,查看相關方法。

4,151EXP 2022年08月30日
...