// always right in front of the player.
WireframeCuboid shape = new WireframeCuboid(
playerCoords.copy().add(2.75, -1.0, -0.25),
playerCoords.copy().add(3.25, 0.0, 0.25));
shape.setLineStyle(new Color(Math.random(), Math.random(), Math.random(), 0.8), 3.0F, true);
ShapeRotate rotate = new ShapeRotate(0.0, 0.1, 0.8, 0.2); // wonky axis
shape.addTransform(rotate);
libShapeDraw.addShape(shape);
// Start the looping animation and keep a reference to the ShapeRotate
// so we can stop it later.
//
// Each spawned Shape get its own ShapeRotate transform with its own
// animation rate.
//
// If you're animating a large number of Shapes, or if you want
// animations to be in sync with each other, you can simply re-use a
// single ShapeRotate for multiple Shapes. This shared instance
// technique can also be used for Colors and other animateable objects.
shapeRotations.add(rotate);
rotate.animateStartLoop(360.0, false, (long) (3000 + Math.random()*10000));
}