A personal toolkit for Java/Processing projects
Haxademic is my personal Processing-based creative coding toolkit, built to run in Eclipse with Java and the latest version of Processing. It's a starting point for interactive visuals, installations, rendering and writing Processing "sketches" in a more robust environment. It loads a bunch of useful Java/Processing libraries and contains a ton of other useful tools that I've written.
While the code has been open-sourced, I don't plan on making it easy/viable for others to use - I don't have the time or desire to support it. This repository is more about sharing the interesting code within, and I fully endorse borrowing it however you see fit.
Below you'll find a long list of classes and utilities that I've built to make my life easier. I've tried to make as many basic demos as possible for all of these features. The demo package mostly mirrors the core directory and should give you an idea of how to implement these object on your own.
com.haxademic.core.app
PAppletHax - This is the base class for every Processing app that I build. It initializes tools for app-level concerns, rendering, multiple input devices, audio FFT, and debugging tools. Tons of additional tools and utilities can be found in the library.
P - This class holds static references and methods - primarily to the app instance so I don't have to pass it around everywhere.
AppWindow - This object helps set up properties related to the app window, which can mostly be configured in Config via AppSettings.
com.haxademic.core.app.config
AppSettings - Static constants to help set app properties and initialize special objects in PAppletHax. Used in tandem with Config.
Config - Loads properties from data/properties/run.properties (or an additional custom .properties file), using the same string constants in AppSettings. All of these properties can be overridden in PAppletHax in the automatically-called config() function on app initialization. Also helps access & parse command line arguments.
com.haxademic.core.data
ConvertUtil - A collection of basic Java type-conversion methods.
Patterns - A collection of pattern generators for step sequencer.
com.haxademic.core.data.constants
GLBlendModes - Fancy OpenGL blend modes with helper methods to set them on a given PGraphics context.
PBlendModes - Static constants list of Processing blend modes.
PRenderers - Static constants list of Processing renderers.
PShapeTypes - Static constants list of Processing shape types.
PStrokeCaps - Static constants list of Processing stoke cap types.
PTextAlign - Static constants list of Processing text alignment options.
com.haxademic.core.data.store
AppStore - A singleton data store and emitter. As values are updated, subscribers are notified. Uses IAppStoreListener as the callback interface for AppStore updates.
AppStoreDistributed - A WebSockets-enabled extension of AppStore to keep multiple machines in sync with a shared data structure.
com.haxademic.core.debug
PAppletHax app via P, the object allows us to toggle and add relatime properties to the DebugView HashMap and log values on-screen, rather than trying to watch Java console values fly by. Press / to toggle. Also includes a panel for key commands and extra developer-defined info.com.haxademic.core.draw.camera
com.haxademic.core.draw.color
ColorsHax - Some predefined easy-to-use color palettes.
ColorUtil - Handy color conversion methods.
EasingColor - An object that represents a single color with interpolation and helpful getter/setter methods. Has some overlap with ColorUtil - the two classes should possibly be merged.
ImageGradient - Loads an image and samples its colors horizontally via a normalized input float. Works well for gradients and comes with a library of presets.
com.haxademic.core.draw.context
OpenGLUtil - Lower-level helper methods to set OpenGL flags that aren't obviously available in Processing.
OrientationUtil - Helper methods to orient the graphics context rotation towards a specific 3d location. These utilities help point 3d objects toward each other.
PG - Lots of static helper methods to initialize and set properties on the specified PGraphics context. Used constantly throughout the core and demos.
PGraphics32 - A custom PGraphics object with 32-bit float texture enabled for use as a data texture in shaders.
com.haxademic.core.draw.filters.pgraphics
com.haxademic.core.draw.filters.pshader
com.haxademic.core.draw.image
AnimatedGifEncoder - Renders a gif file directly out of a Processing app. I've mostly abandoned this in favor of rendering a video, then using conversion tools like ffmpeg to more precisely convert to gif.
Base64Image - Encodes and decodes between a PImage and a base64-encoded string.
BlobFinder - Wraps v3ga's BlobDetection library with some GPU-accelerated enhancements.
BufferActivityMonitor - Gives us an "activity" rating of a moving image, like a webcam, video, or other PGraphics instance that animates. Useful for motion detection.
BufferColorObjectDetection - Finds the center of mass of a specific color (within a threshold) on an image. Useful for object tracking in controlled situations.
BufferMotionDetectionMap - Uses shaders for fast frame-diffing to detect motion between video/camera frames. Includes helpers to find random motion points in the motion map result.
BufferThresholdMonitor - Copies an image to a low-res buffer, runs a threshold filter, and counts white vs black pixels. Useful as a step in certain CV processes.
FrozenImageMonitor - Helps detect a frozen video stream (from a webcam, most likely). Camera feeds have some natural noise that will change over time, even if the subject doesn't. If the feed is frozen, this can be detected.
GridHelper - A UI-enabled grid-drawing tool to help align and design an app's graphics.
ImageCyclerBuffer - Uses GLSL transitions to create a slideshow from an array of PImages.
ImageSequenceMovieClip - Loads and plays back an image sequence like a Movie object does for video files.
__[ImageSequenceRecorder](https://github.com/cacheflowe/haxademic/blob/
No open issues yet, or sync has not completed.