1.0.0 • Published 10 years ago
merge-meshes v1.0.0
merge-meshes
Merges multiple meshes into one
Install
$ npm install merge-meshes
Usage
var mergeMeshes = require('merge-meshes');
var meshA = {
cells: [
[0, 1, 2]
],
positions: [
[ 0, 0, 0],
[ 1, 0, 0],
[ 0, 1, 0],
]
}
var meshB = {
cells: [
[0, 1, 2],
],
positions: [
[ 0, 0, 0],
[-1, 0, 0],
[ 0, 1, 0]
]
}
var mesh = mergeMeshes([meshA, meshB]);
console.log(mesh);
/*
{
cells: [
[0, 1, 2],
[3, 4, 5]
],
positions: [
[ 0, 0, 0],
[ 1, 0, 0],
[ 0, 1, 0],
[ 0, 0, 0],
[-1, 0, 0],
[ 0, 1, 0]
]
}
*/
1.0.0
10 years ago