Geo3D建筑材质切换+屋顶纹理

一、简介

基于Threejs开发封装建筑渲染管线,利用简单二维建筑矢量面轮廓程序化生成3D建筑,支持材质一键切换,支持多样化建筑墙面材质和屋顶材质,支持建筑透明,支持地形高程适配,支持按空间范围裁剪挖洞等。

二、效果

三、代码

///建筑///
const buildingPipline = new Geo3D.BuildingPipline({
    themeName: Geo3D.ThemeName.Theme_Realistic,
    pbfUrl: map.staticPath + '/static/' + 'shijingshan.bpf',
    heightProp: 'height',
    bottomHeight: 67,
    extent: extentCoords as Geo3D.Point[],
    exclude: excludeCoords as Geo3D.Point[],
    scene: scene
})
buildingPipline.add();

GUI//
const vm = {
    simpleTheme: () => {
        Geo3D.ThemeUtil.setTheme(Geo3D.ThemeName.Theme_Simple);
    },
    realTheme: () => {
        Geo3D.ThemeUtil.setTheme(Geo3D.ThemeName.Theme_Realistic);
    },
};
const gui = new GUI();
gui.domElement.style.transform = 'scale(1.5)';
gui.domElement.style.transformOrigin = 'right top';
//@ts-ignore
gui.add(vm, "simpleTheme").name("白模");
//@ts-ignore
gui.add(vm, "realTheme").name("实景");

你可能感兴趣的:(WebGL,GIS,3d,材质,webgl)