cameras
Installation
SKILL.md
Phaser Kameras
Verwandte Skills: ../scale-and-responsive/SKILL.md, ../render-textures/SKILL.md
Jede Szene besitzt einen
CameraManagerunterthis.camerasund mindestensthis.cameras.main. Kameras bestimmen, welcher Ausschnitt der Welt gerendert wird.
Schnellstart
const camera = this.cameras.main;
camera.setBounds(0, 0, mapWidth, mapHeight);
camera.startFollow(player, true, 0.12, 0.12);
camera.setDeadzone(120, 80);
this.cameras.main.shake(180, 0.006);
this.cameras.main.fadeOut(250, 0, 0, 0);