# new TempestStroke(config, bpmopt, angleopt, timeropt, startTimeopt)
Create a new tempest stroke with the specified config.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
config |
Object | |||
bpm |
Number |
<optional> |
60 | |
angle |
Number |
<optional> |
0 | |
timer |
Object |
<optional> |
null | |
startTime |
Number |
<optional> |
null |
Example
ayva.do(new TempestStroke({
stroke: {
from: 0,
to: 1,
},
twist: {
from: 0.25,
to: 0.75,
phase: 1,
},
}));
Members
# static granularity
How many slices to divide a stroke (180 degrees) into. This controls how often a bpm provider is called per stroke.
Methods
# getStartMoves(ayva, mixinConfigopt)
Returns an array of moves that will move to the start position of this Tempest Stroke. The speed of the moves default to 1 unit per second.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ayva |
Ayva | ||
mixinConfig |
Object |
<optional> |
configuration options to add or override for each move. |
- Deprecated:
- since version 0.13.0. Use start() generator instead.
array of moves
# generator start(ayva, mixinopt)
Generates moves that will move to the start position of this Tempest Stroke. The speed of the moves default to 1 unit per second.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ayva |
Ayva | ||
mixin |
Object |
<optional> |
configuration options to add or override for each move. |
# transition(config, bpm, duration)
Creates a new TempestStroke that starts with a transition from this TempestStroke.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
config |
Object | String | stroke config or name of library config |
|
bpm |
Number | function | 60 | beats per minute of next stroke (or function that provides bpm) |
duration |
Number | 1 | how long the transition should take in seconds |
Example
const orbit = new TempestStroke('orbit-grind');
// Create a transition from an orbit-grind to a 30 BPM vortex-tease that takes 5 seconds.
const vortex = orbit.transition('vortex-tease', 30, 5);
ayva.do(vortex);