Class

TempestStroke

TempestStroke(config, bpmopt, angleopt, timeropt, startTimeopt)

A behavior that allows specifying oscillatory motion on an arbitrary number of axes with a formula loosely based on orbital motion calculations. See the Tempest Stroke Tutorial.

Constructor

# 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

View Source behaviors/tempest-stroke.js, line 16

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.

View Source behaviors/tempest-stroke.js, line 69

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.

View Source behaviors/tempest-stroke.js, line 237

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.

View Source behaviors/tempest-stroke.js, line 223

# 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

View Source behaviors/tempest-stroke.js, line 303

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);