Miss any of our Open RFC calls?Watch the recordings here! »

@thi.ng/geom-subdiv-curve

0.1.48 • Public • Published

geom-subdiv-curve

npm version npm downloads Twitter Follow

This project is part of the @thi.ng/umbrella monorepo.

About

Freely customizable, iterative nD subdivision curves for open / closed geometries.

Based in principle on:

Supplied / implemented subdivision schemes:

  • Split @ midpoints (open / closed)
  • Split @ thirds (open / closed)
  • Chaikin (open / closed)
  • Cubic (closed only)
Chaikin (closed) Chaikin (open)
chaikin closed chaikin open

Status

STABLE - used in production

Installation

yarn add @thi.ng/geom-subdiv-curve
// ES module
<script type="module" src="https://unpkg.com/@thi.ng/geom-subdiv-curve?module" crossorigin></script>
 
// UMD
<script src="https://unpkg.com/@thi.ng/geom-subdiv-curve/lib/index.umd.js" crossorigin></script>

Package sizes (gzipped, pre-treeshake): ESM: 640 bytes / CJS: 721 bytes / UMD: 764 bytes

Dependencies

API

Generated API docs

import * as gsc from "@thi.ng/geom-subdiv-curve";
 
gsc.subdivide([[0,0], [100,0], [100,100], [0,100]], gsc.SUBDIV_CHAIKIN_CLOSED, 4)

Authors

Karsten Schmidt

License

© 2016 - 2020 Karsten Schmidt // Apache Software License 2.0

Install

npm i @thi.ng/geom-subdiv-curve

DownloadsWeekly Downloads

183

Version

0.1.48

License

Apache-2.0

Unpacked Size

36.9 kB

Total Files

16

Last publish

Collaborators

  • avatar