const { ensureManifoldness } = require('@jscad/io-utils')
const mimeType = 'application/amf+xml'
function serialize (CSG, m) {
CSG = ensureManifoldness(CSG)
var result = '\n\n'
for (var k in m) {
result += '' + m[k] + '\n'
}
result += '\n'
result += '\n'
return [result]
}
function CSGVectortoAMFString (v) {
return '' + v._x + '' + v._y + '' + v._z + ''
}
function CSGVertextoAMFString (vertex) {
return '' + CSGVectortoAMFString(vertex.pos) + '\n'
}
/*
CSG.Vector3D.prototype.toAMFString = function () {
return '' + this._x + '' + this._y + '' + this._z + ''
}
CSG.Vertex.prototype.toAMFString = function () {
return '' + this.pos.toAMFString() + '\n'
} */
module.exports = {
serialize,
mimeType
}