Skip to content

Commit ae0ab6d

Browse files
committed
Add importing and links sections
1 parent 86ac1f3 commit ae0ab6d

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

README.md

+54
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,55 @@
11
# kld-contours
22

3+
- [Installation](#installation)
4+
- [Importing](#importing)
5+
- [API](#api)
6+
- [Links and Related Projects](#links-and-related-projects)
7+
8+
---
9+
310
A collection of classes to represent and manipulate various vector shapes
411

12+
# Installation
13+
14+
```
15+
npm install kld-contours
16+
```
17+
18+
# Importing
19+
20+
The following sections indicate how you can import the code for use in various environments.
21+
22+
## Node
23+
24+
```javascript
25+
import {CubicBezier2D, QuadraticBezier2D, Rectangle2D} = require("kld-contours");
26+
```
27+
28+
## ESM in Modern Browsers
29+
30+
```javascript
31+
import {CubicBezier2D, QuadraticBezier2D, Rectangle2D} from './node_modules/kld-contours/dist/index-esm.js';
32+
```
33+
34+
## Older Browsers
35+
36+
```html
37+
<script src="./node_modules/kld-contours/dist/index-umd.js"></script>
38+
<script>
39+
var CubicBezier2D = KldContours.CubicBezier2D;
40+
var QuadraticBezier2D = KldContours.QuadraticBezier2D;
41+
var Rectangle2D = KldContours.Rectangle2D;
42+
</script>
43+
```
44+
45+
## Bundlers
46+
47+
```javascript
48+
import {CubicBezier2D, QuadraticBezier2D, Rectangle2D} from "kld-contours";
49+
```
50+
51+
# API
52+
553
## BoundingBox2D
654

755
- overlaps
@@ -56,3 +104,9 @@ A collection of classes to represent and manipulate various vector shapes
56104

57105
- getBoundingBox
58106
- toPolygon2D
107+
108+
# Links and Related Projects
109+
110+
- [kld-affine](https://github.com/thelonious/kld-affine)
111+
- [kld-polynomial](https://github.com/thelonious/kld-polynomial)
112+
- [kld-intersections](https://github.com/thelonious/kld-intersections)

0 commit comments

Comments
 (0)