im using phaser 3 fix the following code:
// Import necessary modules
import Player from "./Player.js";
import Enemy from "./Enemy.js";

// Define and export the MainScene class
export default class MainScene extends Phaser.Scene {
  constructor() {
    super({ key: "MainScene" });
  }

  preload() {
    // Load assets
    Player.preload(this);
    Enemy.preload(this);
    this.load.image("tiles", "assets/images/RPG Nature Tileset.png");
    this.load.tilemapTiledJSON("map", "assets/images/map.json");
    this.load.atlas("orc", "assets/images/orc.png", "assets/images/orc_atlas.json");
    this.load.json("orc_anim", "assets/images/orc_anim.json");
  }

  create() {
    // Create tilemap and layers
    const map = this.make.tilemap({ key: "map" });
    const tileset = map.addTilesetImage("RPG Nature Tileset", "tiles", 32, 32, 0);
    const layer1 = map.createLayer("Tile Layer 1", tileset, -256, -256);
    const layer2 = map.createLayer("Tile Layer 2", tileset, -256, -256);
    layer1.setCollisionByProperty({ collides: true });
    this.matter.world.convertTilemapLayer(layer1);
  
    // Create player and input keys
    this.player = new Player({ scene: this, x: 0, y: 0, texture: "knight", frame: "knight_idle_1" });
    this.player.inputKeys = this.input.keyboard.addKeys({
      up: Phaser.Input.Keyboard.KeyCodes.W,
      down: Phaser.Input.Keyboard.KeyCodes.S,
      left: Phaser.Input.Keyboard.KeyCodes.A,
      right: Phaser.Input.Keyboard.KeyCodes.D,
    });

    // Set camera to follow player and handle resize  There should be exactly 6 paragraphs separated by the markdown divider: ***.
user