private void writeElement(BufferedWriter writer, Element cuboid) throws IOException { writer.write(space(3) + "\"name\": \"" + cuboid.toString() + "\","); writer.newLine(); writeBounds(writer, cuboid); writer.newLine(); if (!cuboid.isShaded()) { writeShade(writer, cuboid); writer.newLine(); } if (cuboid.getRotation() != 0) { writeRotation(writer, cuboid); writer.newLine(); } writeFaces(writer, cuboid); }
private void writeShade(BufferedWriter writer, Element cuboid) throws IOException { writer.write(space(3) + "\"shade\": " + cuboid.isShaded() + ","); }