toJSON(obj, options = {}) {
        var json = Object3DSerializer.prototype.toJSON.call(this, obj);

        // json.drawMode = obj.drawMode;
        json.geometry = new GeometriesSerializer().toJSON(obj.geometry);

        if (options.saveMaterial) {
            json.material = new MaterialsSerializer().toJSON(obj.material);
        } else {
            json.material = null;
        }

        return json;
    }
MeshSerializer
@author tengge / https://github.com/tengge1