代码
Cesium 1.87+增加了customShader自定义着色器,实现建筑泛光效果示例代码如下:
<template>
<div id="cesiumContainer"></div>
</template>
<script>
export default {
name: "Test4",
data() {
return {};
},
mounted() {
let defaultRect = Cesium.Rectangle.fromDegrees(90, 20, 130, 50);
Cesium.Camera.DEFAULT_VIEW_RECTANGLE = defaultRect;
window.viewer = new Cesium.Viewer("cesiumContainer", {
animation: false,
shouldAnimate: true,
baseLayerPicker: false,
fullscreenButton: false,
geocoder: false,
homeButton: false,
sceneModePicker: false,
selectionIndicator: false,
timeline: false,
navigationHelpButton: false,
infoBox: true,
navigationInstructionsInitiallyVisible: false,
imageryPr