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