lib/bsp.js
function(obj) {
    if (obj instanceof Cell) {
      return {
        inside: obj.inside
      };
    } else {
      return {
        back : serialize(obj.back),
        front : serialize(obj.front),
        plane: obj.plane,
        shp: obj.shp,
        complemented: obj.complemented,
      };
    }
  }
function(obj) {
    if (obj instanceof Cell) {
      return {
        inside: obj.inside
      };
    } else {
      return {
        back : serialize(obj.back),
        front : serialize(obj.front),
        plane: obj.plane,
        shp: obj.shp,
        complemented: obj.complemented,
      };
    }
  }
function ( obj ) { if ( obj instanceof Cell ) { return { inside : obj . inside } ; } else { return { back : serialize ( obj . back ) , front : serialize ( obj . front ) , plane : obj . plane , shp : obj . shp , complemented : obj . complemented , } ; } }
Serialize to a non-circular Javascript object
Serialize to a non - circular Javascript object