@@ -0,0 +1,1138 @@
+package com.haxademic.demo.camera;%0A%0Aimport com.haxademic.core.app.PAppletHax;%0Aimport com.haxademic.core.camera.CameraUtil;%0Aimport com.haxademic.core.draw.context.DrawUtil;%0A%0Apublic class Demo_CameraUtil_setCameraDistance %0Aextends PAppletHax %7B%0A%09public static void main(String args%5B%5D) %7B PAppletHax.main(Thread.currentThread().getStackTrace()%5B1%5D.getClassName()); %7D%0A%0A%09protected String DIST = %22DIST%22;%0A%09protected String NEAR = %22NEAR%22;%0A%09%0A%09public void setupFirstFrame() %7B%0A%09%09p.prefsSliders.addSlider(DIST, 4000, 100, 20000, 100, false);%0A%09%09p.prefsSliders.addSlider(NEAR, 100, 100, 10000, 10, false);%0A%09%7D%0A%0A%09public void drawApp() %7B%0A%09%09p.background(0);%0A%09%09DrawUtil.setCenterScreen(p);%0A%09%09DrawUtil.setDrawCenter(p);%0A%09%09%0A%09%09int maxDist = (int) p.prefsSliders.value(DIST);%0A%09%09int minDist = (int) p.prefsSliders.value(NEAR);%0A%09%09CameraUtil.setCameraDistance(p.g, minDist, maxDist);%0A%09%09%0A%09%09p.fill(255);%0A%09%09p.stroke(0);%0A%09%09p.strokeWeight(1);%0A%09%09int zStep = 500;%0A%09%09for (int i=0; i %3C 20000; i += zStep) %7B%0A%09%09%09p.pushMatrix();%0A%09%09%09p.translate(0, 0, -i);%0A%09%09%09p.rotateX(i);%0A%09%09%09p.rotateY(i);%0A%09%09%09p.box(i/3);%0A%09%09%09p.popMatrix();%0A%09%09%7D%0A%09%09%0A%09%09CameraUtil.resetCamera(p.g);%0A%09%09p.camera();%0A%09%7D%0A%7D%0A

Test to increase camera distance