@Override
 public ParticleBitmapModel createFromStream(
     final ExtendedDataInputStream istream, final float levelPercent) throws IOException {
   final boolean leveled = istream.readBooleanBit();
   final boolean scaleRandomKeepRatio = istream.readBooleanBit();
   final int bitmapId = istream.readInt();
   final float hotX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float hotY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleRandomX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float scaleRandomY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotation = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float redColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float greenColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float blueColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float alphaColor = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float redColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float greenColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float blueColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float alphaColorRandom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureTop = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureLeft = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureBottom = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float textureRight = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float halfWidth = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float halfHeight = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationX = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationY = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final float rotationZ = AttributesReaderWriter.readFloat(istream, leveled, levelPercent);
   final ParticleBitmapModel model =
       new ParticleBitmapModel(
           bitmapId,
           hotX,
           hotY,
           scaleX,
           scaleY,
           scaleRandomX,
           scaleRandomY,
           scaleRandomKeepRatio,
           rotation,
           rotationRandom,
           redColor,
           greenColor,
           blueColor,
           alphaColor,
           redColorRandom,
           greenColorRandom,
           blueColorRandom,
           alphaColorRandom,
           rotationX,
           rotationY,
           rotationZ);
   model.setTextureCoords(textureTop, textureLeft, textureBottom, textureRight);
   model.setHalfSize(halfWidth, halfHeight);
   return model;
 }