Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bohnacker committed Jan 29, 2020
1 parent b1d0ad8 commit b1dbb32
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stretch Transform

Stretch Transform is a geometric transformation that distorts a plane in a rubbery way.
Stretch Transform is a geometric transformation that distorts a plane or 3D space in a rubbery way.

![Cover](/images/cover.png)

Expand All @@ -10,7 +10,7 @@ For a more detailed explanation of this project read [this](https://hartmut-bohn

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

#### Table of Contents
### Table of Contents

- [StretchTransform](#stretchtransform)
- [addAnchor](#addanchor)
Expand Down Expand Up @@ -38,15 +38,15 @@ For a more detailed explanation of this project read [this](https://hartmut-bohn

new StretchTransform() create an empty StretchTransform.

#### addAnchor
### addAnchor

Adds an Anchor.

**Parameters**

- `p` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] that will be used for origin and target position

#### addAnchor
### addAnchor

Adds an Anchor.

Expand All @@ -57,7 +57,7 @@ Adds an Anchor.
- `xTarget` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** X coordinate for target position
- `yTarget` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Y coordinate for target position

#### addAnchor
### addAnchor

Adds an Anchor.

Expand All @@ -66,7 +66,7 @@ Adds an Anchor.
- `pOrigin` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] for origin position
- `pTarget` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array [x, y] for target position

#### addAnchor
### addAnchor

Adds an Anchor.

Expand All @@ -75,33 +75,33 @@ Adds an Anchor.
- `x` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** X coordinate for origin and target position
- `y` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Y coordinate for origin and target position

#### removeAnchor
### removeAnchor

Removes an Anchor.

**Parameters**

- `i` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor

#### removeAnchor
### removeAnchor

Removes an Anchor.

**Parameters**

- `anchor` **Anchor** Anchor to remove

#### getAnchorCount
### getAnchorCount

Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** of anchors added to the MultiTransform

#### getAnchor
### getAnchor

**Parameters**

- `i` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor to return.

#### getAnchorByPos
### getAnchorByPos

**Parameters**

Expand All @@ -111,7 +111,7 @@ Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
specified position

#### getAnchorByOriginPos
### getAnchorByOriginPos

**Parameters**

Expand All @@ -121,7 +121,7 @@ Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
specified position

#### getAnchorByTargetPos
### getAnchorByTargetPos

**Parameters**

Expand All @@ -131,25 +131,25 @@ Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the found anchor or -1 if nothing was found at the
specified position

#### setAnchorOrigin
### setAnchorOrigin

**Parameters**

- `i` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor.
- `p` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** New origin position [x, y, z]. Z coordinate is optional.

#### setAnchorTarget
### setAnchorTarget

**Parameters**

- `i` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Index of the anchor.
- `p` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** New target position [x, y, z]. Z coordinate is optional.

#### getWeightingExponent1
### getWeightingExponent1

Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**

#### setWeightingExponent1
### setWeightingExponent1

Exponent of the weighting function. Defines how the relations from one anchor
to all others are cumulated. The closer the other anchor lies, the
Expand All @@ -159,11 +159,11 @@ stronger it is weighted.

- `val` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Usually something between 0 and 2. Default = 1.

#### getWeightingExponent2
### getWeightingExponent2

Returns **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**

#### setWeightingExponent2
### setWeightingExponent2

Exponent of the weighting function when applying all anchor matrices to a
point.
Expand All @@ -172,7 +172,7 @@ point.

- `val` **[Number](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)** Usually 1 or higher. Default = 2.

#### transform
### transform

Main function of the class. Transforms a point on the plane and returns
its new position.
Expand All @@ -184,7 +184,7 @@ its new position.

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Transformed point as an Array [x, y]

#### transform
### transform

Main function of the class. Transforms a point on the plane and returns
its new position.
Expand All @@ -195,7 +195,7 @@ its new position.

Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)** Transformed point as an Array [x, y]

#### updateAnchorMatrices
### updateAnchorMatrices

It's usually not necessary to call this method. If anchors and parameters
are always set with the given methods (setAnchorOrigin(), ...), this
Expand Down

0 comments on commit b1dbb32

Please sign in to comment.