PShape Groups

edited December 2015 in How To...

Hi all,

I've made this sketch using PShape groups. There are 2 layers in the sketch each layer is a group of PShapes containing around 20 or so PShapes. Both layers are made during setup. The background layer is drawn without any change each time, the foreground layer is scaled and rotated in realtime based on the frequencies of whatever music is being played at that time (the entire group is scaled and rotated the same way, the members of the PShape group are NOT accessed one by one).

Seems like something that should easily run at 60 fps realtime right? But as soon as you run in HD (1920 x 1080 in JAVA2D mode), thing slow down a lot. It runs smoothly at 800 x 600 (the default size of each PShape is dependent on the size of the sketch).

Is there anything I can do to speed things up? Lets call the layers: l1 and l2 each with around 20 PShapes. What happens when I say l1.scale() or l1.rotate()? Does it try to access every single PShape?


Sign In or Register to comment.