cesium藍色立方體 -建築物

主要依靠於貼圖,使用的圖片,羣裏還收集到其他幾個貼圖,一併放上來吧

   //已成功

    var arrowMaterial = new Cesium.Material.fromType('Image', {
        image : './building.png',
        //image : './03.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,
            transparent:true
        })
    })
    viewer.scene.primitives.add(pr);

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章