请问webgl添加wall如何让wall向下拉伸呢?

0 投票

请问如何让wall向下拉伸包围管线呢?代码原理是这样的,wblgl在三维场景中画矩形,然后根据每条边(line)添加wall,代码如下:

var redwall = viewer.entities.add({
    name: 'RedWall' + i,
    wall: {
        positions: Cesium.Cartesian3.fromDegreesArrayHeights(line),
        minimumHeights: [50, 50],
        material: Cesium.Color.RED,
    }
});

11月 11 分类:  19次浏览 | 用户: 亚特兰蒂斯丹丹 初出茅庐 (28 分)

1个回答

0 投票
var a = viewer.entities.add({
                    name : 'Green wall from surface with outline'+8,
                    wall : {
                        positions : Cesium.Cartesian3.fromDegreesArrayHeights([-107.0, 43.0, 100,
                                                        -97.0, 43.0, 100,
                                                        -97.0, 40.0, 100,
                                                        -107.0, 40.0, 10,
                                                        -107.0, 43.0, 100]),
                        minimumHeights :[-1000,-1000,-1000,-1000,-1000],
                        material : Cesium.Color.GREEN,
                        outline : true
                    }
                });

您好,该代码可实现向下拉伸
11月 11 用户: 赵爽 登峰造极 (5,398 分)
解决啦,非常感谢~
你好,还想请问一下,webgl怎么设置wall的纹理贴图呢?

直接对material设置一个图片就可以了

可以参照https://www.jianshu.com/p/8ae3624347cb

嗯嗯,可以啦,谢谢~
...