<commit_before>package com.haxademic.sketch.test;

import processing.core.PApplet;
import processing.core.PGraphics;

import com.haxademic.core.app.P;
import com.haxademic.core.app.PAppletHax;
import com.haxademic.core.draw.mesh.PGraphicsKeystone;
import com.haxademic.core.draw.util.OpenGLUtil;

@SuppressWarnings("serial")
public class PGraphicsKeystoneTest
extends PAppletHax {

	protected PGraphics pg;
	protected PGraphicsKeystone _pgPinnable;

	public static void main(String args[]) {
		_isFullScreen = true;
		_hasChrome = false;
		PApplet.main(new String[] { PGraphicsKeystoneTest.class.getName() });
	}

	protected void overridePropsFile() {
		_appConfig.setProperty( "fps", "60" );
		_appConfig.setProperty( "width", "432" );
		_appConfig.setProperty( "height", "927" );
		_appConfig.setProperty( "fills_screen", "false" );
		_appConfig.setProperty( "fullscreen", "false" );
	}

	public void setup() {
		super.setup();	
		buildCanvas();
		drawTestPattern();
	}

	protected void buildCanvas() {
		pg = p.createGraphics( p.width, p.height, P.OPENGL );
		pg.smooth(OpenGLUtil.SMOOTH_MEDIUM);
		_pgPinnable = new PGraphicsKeystone( p, pg, 12 );
	}

	protected void drawTestPattern() {
		// redraw pgraphics grid
		pg.beginDraw();
		pg.clear();
		pg.noStroke();
		for( int x=0; x < pg.width; x+= 50) {
			for( int y=0; y < pg.height; y+= 50) {
				if( ( x % 100 == 0 && y % 100 == 0 ) || ( x % 100 == 50 && y % 100 == 50 ) ) {
					pg.fill(0);
				} else {
					pg.fill(255);
				}
				pg.rect(x,y,50,50);
			}
		}
		pg.endDraw();
	}

	public void drawApp() {
		p.background(0);
		// draw pinned pgraphics
		_pgPinnable.update(p.g, true);
	}

}<commit_msg>Make a little more flexible<commit_after>package com.haxademic.sketch.test;

import processing.core.PApplet;
import processing.core.PGraphics;

import com.haxademic.core.app.P;
import com.haxademic.core.app.PAppletHax;
import com.haxademic.core.draw.mesh.PGraphicsKeystone;
import com.haxademic.core.draw.util.OpenGLUtil;

@SuppressWarnings("serial")
public class PGraphicsKeystoneTest
extends PAppletHax {

	protected PGraphics _pg;
	protected PGraphicsKeystone _pgPinnable;

	public static void main(String args[]) {
		_isFullScreen = true;
		_hasChrome = false;
		PApplet.main(new String[] { PGraphicsKeystoneTest.class.getName() });
	}

	protected void overridePropsFile() {
		_appConfig.setProperty( "fps", "60" );
		_appConfig.setProperty( "width", "1432" );
		_appConfig.setProperty( "height", "927" );
		_appConfig.setProperty( "fills_screen", "false" );
		_appConfig.setProperty( "fullscreen", "false" );
	}

	public void setup() {
		super.setup();	
		buildCanvas();
	}

	protected void buildCanvas() {
		_pg = p.createGraphics( p.width / 2, p.height / 2, P.OPENGL );
		_pg.smooth(OpenGLUtil.SMOOTH_MEDIUM);
		_pgPinnable = new PGraphicsKeystone( p, _pg, 12 );
	}

	protected void drawTestPattern( PGraphics pg ) {
		// redraw pgraphics grid
		pg.beginDraw();
		pg.clear();
		pg.noStroke();
		for( int x=0; x < pg.width; x+= 50) {
			for( int y=0; y < pg.height; y+= 50) {
				if( ( x % 100 == 0 && y % 100 == 0 ) || ( x % 100 == 50 && y % 100 == 50 ) ) {
					pg.fill(0);
				} else {
					pg.fill(255);
				}
				pg.rect(x,y,50,50);
			}
		}
		pg.endDraw();
	}

	public void drawApp() {
		p.background(0);
		// draw pinned pgraphics
		drawTestPattern( _pg );
		_pgPinnable.update(p.g, true);
	}

}
{'fraction_non_alphanumeric': 0.15311572700296736, 'fraction_numerical': 0.026409495548961423, 'mean_word_length': 3.801994301994302, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7147371', 'n_tokens_mistral': 1455, 'n_tokens_neox': 1269, 'n_words': 263}