code: function(obj) {
      // Cell
      if (obj.hasOwnProperty('inside')) {
        return new Cell(obj.inside);
      } else {
        var back = deserialize(obj.back);
        var front = deserialize(obj.front);
  
        // 2D or 3D planes
        // var plane = obj.plane.hasOwnProperty('d') ?
        //   Plane3D.deserialize(obj.plane) :
        //   Plane2D.deserialize(obj.plane);
        var plane = Plane3D.deserialize(obj.plane);
  
        // 2D or 3D shp
        // var shp = obj.shp.s.hasOwnProperty('d') ?
        //   Polygon3D.deserialize(obj.shp) :
        //   Line2D.deserialize(obj.shp);
        var shp = Polygon3D.deserialize(obj.shp);
  
        // Create the node
        var v =  new Node(
          plane, back, front);
        v.shp = shp;
        v.complemented = obj.complemented;
        return v;
      }
    }
docs: Deserialize a BSP object that has been created by serialize().