()
| 781 | }, |
| 782 | methods: { |
| 783 | light () { |
| 784 | // 增加光线 |
| 785 | this.scene.map.AmbientLight = new AMap.Lights.AmbientLight([1, 1, 1], 0.3); |
| 786 | this.scene.map.DirectionLight = new AMap.Lights.DirectionLight([0, -1, 2], [1, 1, 1], 0.7); |
| 787 | let angle = 90; |
| 788 | const that = this |
| 789 | function changeLightDirection () { |
| 790 | angle += 3; |
| 791 | const dir = [ |
| 792 | Math.cos(angle / 180 * Math.PI), |
| 793 | -Math.sin(angle / 180 * Math.PI), |
| 794 | 2 |
| 795 | ]; |
| 796 | that.scene.map.DirectionLight.setDirection(dir); |
| 797 | requestAnimationFrame(changeLightDirection); |
| 798 | } |
| 799 | changeLightDirection(); |
| 800 | }, |
| 801 | |
| 802 | drawCityBuildingLayer () { |
| 803 | this.CityBuildingLayer = new L7.CityBuildingLayer({ |
nothing calls this directly
no test coverage detected