Skip to content

Commit

Permalink
Add more to package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Zunawe committed Jun 17, 2018
1 parent 35dd244 commit 2740324
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ let spline = new BezierSpline([
])
```

You can access the control points of each curve with the `curves` property. Curves are described by vectors (including 1-dimensional vectors).
You can access the control points of each curve with the `curves` property. Curves are array-like with 4 elements, which are control points.

```js
let bezier0 = spline.curves[0]
Expand All @@ -35,7 +35,7 @@ bezier0[1] // The first generated control point
bezier0[2] // The second generated control point
bezier0[3] // The second knot

console.log(bezier0[0]) // vec2 [1, 3]
console.log(bezier0[0]) // [ 1, 3 ]
```

A large part of the point of this module is to be able to locate points on the spline by coordinate. For example, if we want to find where the spline above passes through `y = 3.14`:
Expand Down
2 changes: 1 addition & 1 deletion docs/BezierCurve.html
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCur
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 13:55:42 GMT-0600 (MDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 14:11:31 GMT-0600 (MDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/BezierSpline.html
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCur
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 13:55:42 GMT-0600 (MDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 14:11:31 GMT-0600 (MDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/curve.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCur
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 13:55:42 GMT-0600 (MDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 14:11:31 GMT-0600 (MDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,14 @@ <h2>Install</h2><pre class="prettyprint source lang-sh"><code>$ npm install bezi
[1, 3],
[0, 4],
[5, 5]
])</code></pre><p>You can access the control points of each curve with the <code>curves</code> property. Curves are described by vectors (including 1-dimensional vectors).</p>
])</code></pre><p>You can access the control points of each curve with the <code>curves</code> property. Curves are array-like with 4 elements, which are control points.</p>
<pre class="prettyprint source lang-js"><code>let bezier0 = spline.curves[0]
bezier0[0] // The first knot
bezier0[1] // The first generated control point
bezier0[2] // The second generated control point
bezier0[3] // The second knot

console.log(bezier0[0]) // vec2 [1, 3]</code></pre><p>A large part of the point of this module is to be able to locate points on the spline by coordinate. For example, if we want to find where the spline above passes through <code>y = 3.14</code>:</p>
console.log(bezier0[0]) // [ 1, 3 ]</code></pre><p>A large part of the point of this module is to be able to locate points on the spline by coordinate. For example, if we want to find where the spline above passes through <code>y = 3.14</code>:</p>
<pre class="prettyprint source lang-js"><code>spline.getPoints(1, 3.14)
[ [ 0.86, 3.1400000000000006 ] ]</code></pre><p>Or where <code>x = 0.5</code>:</p>
<pre class="prettyprint source lang-js"><code>spline.getPoints(0, 0.5)
Expand Down Expand Up @@ -97,7 +97,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCur
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 13:55:42 GMT-0600 (MDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 14:11:31 GMT-0600 (MDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BezierCur
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 13:55:42 GMT-0600 (MDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jun 17 2018 14:11:31 GMT-0600 (MDT)
</footer>

<script> prettyPrint(); </script>
Expand Down
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "bezier-spline",
"version": "1.0.0",
"description": "",
"keywords": [],
"description": "Creates splines using Bezier curves over an arbitrary number of dimensions.",
"keywords": ["spline", "bezier", "graphics", "path", "curve"],
"main": "src/index.js",
"files": [
"src/*"
Expand All @@ -18,8 +18,12 @@
"docs"
]
},
"author": "",
"author": "Bryce Wilson",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/Zunawe/bezier-spline"
},
"dependencies": {
"vecn": "^1.3.0"
},
Expand Down

0 comments on commit 2740324

Please sign in to comment.