-
Notifications
You must be signed in to change notification settings - Fork 0
TransformationFunctions.js
-
linearDistanceAbsolute(absoluteOrigin, mousePosition) ⇒
number
-
linearDistance(absoluteOrigin, mousePosition) ⇒
number
-
simpleBellCurve(absoluteOrigin, mousePosition) ⇒
number
-
Smoother way to do transformations than linear ones. Also based on distance, but because of the way this function works the return value stays longer at a value near to the maximum than a negative linear function.
-
advBellCurve(absoluteOrigin, mousePosition, [min], [max], [slope]) ⇒
number
-
Smoother way to do transformations than linear ones, advanced and optimized for real use. Also based on distance, but because of the way this function works the return value stays longer at a value near to the maximum than a negative linear function.
-
scaleBellCurve(absoluteOrigin, mousePosition) ⇒
string
-
composes a complete smooth scaling transformation based on the mouse pointer's distance to the transformation's origin
-
combined3d(absoluteOrigin, mousePosition) ⇒
string
-
composes a complete smooth and light 3d transformation including scaling and perspective based on the mouse pointer's distance to the transformation origin
Kind: global function
Returns: number
- absolute euclidean distance between the origin of
the transformation and the mouse position in px
Param | Type | Description |
---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin |
mousePosition | Array.<number> |
absolute mouse position |
Kind: global function
Returns: number
- Relative euclidean distance between the origin of
the transformation and the mouse position in px.
Values from 0 to 1 if element is perfectly
centered. If not, the value can be up to 2
Param | Type | Description |
---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin |
mousePosition | Array.<number> |
absolute mouse position |
Smoother way to do transformations than linear ones. Also based on distance, but because of the way this function works the return value stays longer at a value near to the maximum than a negative linear function.
Kind: global function
Returns: number
- value between 0 and 1
Smoother way to do transformations than linear
ones. Also based on distance, but because of the
way this function works the return value stays
longer at a value near to the maximum than a
negative linear function. Value always bigger
than 0 and the maximum is 1.
Param | Type | Description |
---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin |
mousePosition | Array.<number> |
absolute mouse position |
Smoother way to do transformations than linear ones, advanced and optimized for real use. Also based on distance, but because of the way this function works the return value stays longer at a value near to the maximum than a negative linear function.
Kind: global function
Returns: number
- value between min and max
Param | Type | Default | Description |
---|---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin | |
mousePosition | Array.<number> |
absolute mouse position | |
[min] | number |
0.5 |
minimum value for the returned values |
[max] | number |
1 |
maximum value for the returned values |
[slope] | number |
3 |
natural number. The bigger, the longer the returned value stays near to the maximum |
composes a complete smooth scaling transformation based on the mouse pointer's distance to the transformation's origin
Kind: global function
Returns: string
- valid CSS tranformation-property
Param | Type | Description |
---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin |
mousePosition | Array.<number> |
absolute mouse position |
composes a complete smooth and light 3d transformation including scaling and perspective based on the mouse pointer's distance to the transformation origin
Kind: global function
Returns: string
- valid CSS tranformation-property
Param | Type | Description |
---|---|---|
absoluteOrigin | Array.<number> |
absolute transformation origin |
mousePosition | Array.<number> |
absolute mouse position |
Attention: don't edit these files directly! They are auto-generated and pushed by Travis CI. Add your changes in the jsdoc comments in the code files.