首页 / 浏览问题 / 三维GIS / 问题详情
请问webgl添加wall如何让wall向下拉伸呢?
54EXP 2019年11月11日

请问如何让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,
    }
});

1个回答

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
                    }
                });

您好,该代码可实现向下拉伸
6,215EXP 2019年11月11日
解决啦,非常感谢~
你好,还想请问一下,webgl怎么设置wall的纹理贴图呢?

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

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

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