MCPcopy Create free account
hub / github.com/MankaiHuang/screen-visualization / light

Function light

public/iframe/lib/js/mixinsMap.js:783–800  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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({

Callers

nothing calls this directly

Calls 1

changeLightDirectionFunction · 0.85

Tested by

no test coverage detected