@Override
    public void simpleInitApp() {
        header = new BitmapText(this.guiFont);
        header.setText("Adjust FOV with R/F or with mouse scroll");
        guiNode.attachChild(header);
        fov = new BitmapText(this.guiFont);
        guiNode.attachChild(fov);

        viewPort.setBackgroundColor(new ColorRGBA(0.7f, 0.8f, 1f, 1f));
        flyCam.setMoveSpeed(100);

        // We add light so we see the scene
        AmbientLight al = new AmbientLight();
        al.setColor(ColorRGBA.White.mult(1.3f));
        rootNode.addLight(al);

        DirectionalLight dl = new DirectionalLight();
        dl.setColor(ColorRGBA.White);
        dl.setDirection(new Vector3f(2.8f, -2.8f, -2.8f).normalizeLocal());
        rootNode.addLight(dl);

        assetManager.registerLocator("https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/town.zip",
                HttpZipLocator.class);
        Spatial sceneModel = assetManager.loadModel("main.scene");
        sceneModel.setLocalScale(2f);

        rootNode.attachChild(sceneModel);

        inputManager.addMapping(FOV_IN, new KeyTrigger(KeyInput.KEY_R));
        inputManager.addMapping(FOV_OUT, new KeyTrigger(KeyInput.KEY_F));
        inputManager.addListener(this, FOV_IN, FOV_OUT);
    }
Tests the setting of the FOV and aspect ratios.

@author Markil 3
jme3-examples/src/main/java/jme3test/renderer/TestAspectFov.java