package com.haxademic.demo.net;

import com.haxademic.core.app.PAppletHax;
import com.haxademic.core.draw.context.DrawUtil;
import com.haxademic.core.net.DashboardPoster;

public class Demo_DashboardPoster
extends PAppletHax {
	public static void main(String args[]) { PAppletHax.main(Thread.currentThread().getStackTrace()[1].getClassName()); }
	
	protected DashboardPoster dashboardPoster;
	
	public void setupFirstFrame() {
		dashboardPoster = new DashboardPoster("test", "http://localhost/_open-source/haxademic/www/dashboard/", 60, 0.5f, 0.5f);
		dashboardPoster.setImage(p.g);
	}
	
	public void drawApp() {
		// background
		pg.beginDraw();
		DrawUtil.setDrawCenter(pg);
		pg.background((float)mouseX/width * 255,(float)mouseY/height * 255,0);
		pg.fill(255);
		
		// square
		pg.pushMatrix();
		pg.translate(p.width/2, p.height/2);
		pg.rotate(p.frameCount * 0.01f);
		pg.rect(0, 0, 100, 100);
		pg.popMatrix();
		
		// draw to screen
		pg.endDraw();
		p.image(pg, 0, 0);
 	}
	
}

@@ -163,16 +163,56 @@
 dPoster;
+%0Aimport com.haxademic.core.net.PostJSON;
 %0A%0Apublic
@@ -570,9 +570,9 @@
 /%22, 
-6
+2
 0, 0
@@ -1012,16 +1012,44 @@
  0, 0);%0A
+%09%09%0A%09%09PostJSON.DEBUG = true;%0A
  %09%7D%0A%09%0A%7D%0A

Update demo