geom-merge
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

geom-merge

Merge a list of geometries (simplicial complex) into one geometry and concat all other attributes.

Installation

npm install geom-merge

Usage

import merge from "geom-merge";
import { cube, sphere } from "primitive-geometry";

const geometry = merge([cube, sphere]);

API

merge(geometries): geometry

Parameters

  • geometries: Array<geometry> – array of geometry objects

Returns

geometry: { positions: TypedArray|Array, cells: TypedArray|Array, ...otherAttributesMerged: TypedArray|Array } - new geometry with merged attributes and cells from provided geometries.

Note 1: Each geometry object requires at least positions and cells. Other properties like uvs or normals will be merged as well if available in all geometries.

Note 2: This module doesn't perform CSG operations

License

MIT. See license file.

Install

npm i geom-merge

DownloadsWeekly Downloads

1

Version

2.0.0

License

MIT

Unpacked Size

5.28 kB

Total Files

4

Last publish

Collaborators

  • vorg