package com.adjl.locus;

import com.adjl.virtualcamera.VirtualCamera;

import processing.core.PApplet;
import processing.core.PConstants;

/**
 * @author Helena Josol
 */
public class Locus extends PApplet {

    private final int mBackground;
    private final int mFill;
    private final int mStrokeWeight;

    private LocusWorld mWorld;
    private LocusBeams mBeams;
    private VirtualCamera mCamera;
    private boolean mRunning;

    /**
     * TODO(adjl): Write Javadoc.
     */
    public Locus() {
        mBackground = color(0, 0, 0);
        mFill = color(0, 0, 0);
        mStrokeWeight = 2;
    }

    @Override
    public void setup() {
        size(displayWidth, displayHeight, PConstants.P3D);
        rectMode(PConstants.CENTER);
        noCursor();
        fill(mFill);
        strokeWeight(mStrokeWeight);
        mWorld = new LocusWorld(this);
        mBeams = new LocusBeams(this, mWorld);
        mCamera = new VirtualCamera(this, mWorld, 50.0f, 3.0f);
        mRunning = true;
    }

    @Override
    public void draw() {
        background(mBackground);
        mWorld.draw();
        if (mRunning) {
            mBeams.update();
        }
        mBeams.draw();
        mCamera.set();
    }

    @Override
    public void keyPressed() {
        mCamera.move(key);
    }

    public static void main(String[] args) {
        PApplet.main(new String[] { "--present", com.adjl.locus.Locus.class.getName() });
    }
}

@@ -136,40 +136,8 @@
 s;%0A%0A
-/**%0A * @author Helena Josol%0A */%0A
 publ
@@ -192,23 +192,27 @@
 nal 
-int mBackground
+float mCameraHeight
 ;%0A  
@@ -231,17 +231,26 @@
 nal 
-int mFill
+float mCameraSpeed
 ;%0A  
@@ -265,18 +265,20 @@
 e final 
-in
+floa
 t mStrok
@@ -286,17 +286,16 @@
 Weight;%0A
-%0A
     priv
@@ -302,26 +302,60 @@
 ate 
-LocusWorld mWorld;
+final int mBackground;%0A    private final int mFill;%0A
 %0A   
@@ -382,16 +382,47 @@
 mBeams;%0A
+    private LocusWorld mWorld;%0A
     priv
@@ -487,74 +487,114 @@
     
-/**%0A     * TODO(adjl): Write Javadoc.%0A     */%0A    public Locus() %7B
+public Locus() %7B%0A        mCameraHeight = 50.0f;%0A        mCameraSpeed = 3.0f;%0A        mStrokeWeight = 2.0f;
 %0A   
@@ -664,35 +664,8 @@
 0);%0A
-        mStrokeWeight = 2;%0A
     
@@ -1021,19 +1021,35 @@
 ld, 
-50.0f, 3.0f
+mCameraHeight, mCameraSpeed
 );%0A 

Set values in constructor