Very cool! Thanks for sharing. Since JSUI uses the software renderer, I’ve taken a minute to quickly convert your code to work with jit.gl.sketch, which is hardware accelerated. I’ve attached to this post. The main differences are:
- define jit.window, jit.gl.render, jit.gl.sketch, in the JS code
– create a resetsketch() function to appropriately create and simulate the sketch.default2d() method
– create a JitterListener and callback function to simulate the onclick and ondrag behavior of JSUI, and reset the sketch if the window is resized
Hopefully this is of general use for people trying to port these sort of JSUI based applications to jit.gl.sketch.