package hype;

import processing.core.PGraphics;

public class HGroup extends HDrawable {

	public HGroup() {
		transformsChildren(true).stylesChildren(true);
	}

	@Override
	public HGroup createCopy() {
		HGroup copy = new HGroup();
		copy.copyPropertiesFrom(this);
		return copy;
	}

	@Override
	public void paintAll(PGraphics g, boolean usesZ, float alphaPc) {
		if(this.alphaPc <=0) return;

		// Perform a trimmed down version of super.paintAll()
		g.pushMatrix();
			if(usesZ) g.translate(x, y, z);
			else g.translate(x, y);
			g.rotate(rotationZRad);

			alphaPc *= this.alphaPc;

			HDrawable child = firstChild;
			while(child != null) {
				child.paintAll(g, usesZ, alphaPc);
				child = child.next();
			}
		g.popMatrix();
	}

	@Override
	public void draw(PGraphics g,boolean b,float x,float y,float f) {}
}

@@ -1,8 +1,531 @@
+ /*%0A *%0A * HYPE_Processing%0A * http://www.hypeframework.org/ & https://github.com/hype/HYPE_Processing%0A * %0A * Copyright (c) 2013-2015 Joshua Davis & James Cruz%0A * %0A * Distributed under the BSD License. See LICENSE.txt for details.%0A * %0A * All rights reserved.%0A *%0A * ----- *%0A * HGroup - updated by GD on 26/1/16 to enable X,Y and Z rotations *%0A * Tested using processing 3.0.1 (It may break on newer versions of processing) *%0A * If you find any issues or make anything cool with this, let me know on twitter at @Garth_D *%0A */%0A%0A
 package 
@@ -530,17 +530,16 @@
 e hype;%0A
-%0A
 import p
@@ -606,17 +606,18 @@
 able %7B%0A%0A
-%09
+  
 public H
@@ -626,18 +626,20 @@
 oup() %7B%0A
-%09%09
+    
 transfor
@@ -677,21 +677,23 @@
 (true);%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 @Overrid
@@ -690,25 +690,26 @@
   @Override%0A
-%09
+  
 public HGrou
@@ -725,18 +725,20 @@
 opy() %7B%0A
-%09%09
+    
 HGroup c
@@ -757,18 +757,20 @@
 roup();%0A
-%09%09
+    
 copy.cop
@@ -792,18 +792,20 @@
 (this);%0A
-%09%09
+    
 return c
@@ -809,21 +809,22 @@
 n copy;%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A 
 @Overrid
@@ -817,33 +817,34 @@
   %7D%0A%0A @Override%0A
-%09
+  
 public void pain
@@ -897,26 +897,23 @@
 ) %7B%0A
-%09%09if(this.
+    if (
 alphaPc
- 
 %3C=0)
@@ -921,19 +921,18 @@
 return;%0A
+ 
 %0A
-%09%09
 // Perfo
@@ -977,18 +977,19 @@
 ntAll()%0A
-%09%09
+   
 g.pushMa
@@ -1000,20 +1000,31 @@
 ();%0A
-%09%09%09
+%0A    
 if
+ 
 (usesZ)
+ %7B%0A     
  g.t
@@ -1046,15 +1046,119 @@
 z);%0A
-%09%09%09else
+      g.rotateX(rotationXRad);%0A      g.rotateY(rotationYRad);%0A      g.rotateZ(rotationZRad);%0A    %7D else %7B%0A     
  g.t
@@ -1173,19 +1173,22 @@
 (x, y);%0A
-%09%09%09
+      
 g.rotate
@@ -1203,20 +1203,27 @@
 nZRad);%0A
-%0A%09%09%09
+    %7D%0A%0A    
 alphaPc 
@@ -1229,13 +1229,8 @@
  *= 
-this.
 alph
@@ -1234,20 +1234,20 @@
 lphaPc;%0A
-%0A%09%09%09
+    
 HDrawabl
@@ -1272,16 +1272,18 @@
 ld;%0A
-%09%09%09
+    
 while
+ 
 (chi
@@ -1296,20 +1296,22 @@
 null) %7B%0A
-%09%09%09%09
+      
 child.pa
@@ -1341,12 +1341,14 @@
 c);%0A
-%09%09%09%09
+      
 chil
@@ -1369,15 +1369,18 @@
 ();%0A
-%09%09%09%7D%0A%09%09
+    %7D%0A    
 g.po
@@ -1394,13 +1394,15 @@
 ();%0A
-%09%7D%0A%0A%09
+  %7D%0A%0A  
 @Ove
@@ -1411,9 +1411,10 @@
 ide%0A
-%09
+  
 publ
@@ -1438,16 +1438,17 @@
 phics g,
+ 
 boolean 
@@ -1453,16 +1453,17 @@
 n b,
+ 
 float x,
 floa
@@ -1462,16 +1462,17 @@
 t x,
+ 
 float y,
 floa
@@ -1467,16 +1467,17 @@
 float y,
+ 
 float f)
@@ -1478,12 +1478,15 @@
 oat f) %7B
+%0A  
 %7D%0A%7D%0A

Update HGroup.java