Creates a new Sempiternal animautomaton.
The id of an HTMLCanvasElement on the page that this animation will render to.
Optional
ops: Partial<SempiternalOps>An object containing one or more valid {SempiternalOps} properties.
If true: every other ring will rotate in the opposite direction.
If not null: the canvas will be painted this colour.
Default: null
The radius (px) of each circle.
An array of 7-character hex code colour strings (e.g. ["#ffffff"]). (Must be 7 characters for opacity to work properly.)
The current iteration of this animation.
Default: 0
A number between 0 and 1 representing the animation's progress through its loop THIS frame.
Default: 0
This function will be called iff timingFunction = "custom"
Custom timing functions must take in an offset to apply to currProgress, and return a value between 0 and 1.
Number of milliseconds this animation's loop will take. Lower = faster.
Default: 1000
A value between 0 and 1 indicating what percentage behind in the loop each successive ring will be.
Represents which Context2D drawing function to call.
Default: fill
Number of requested renders per second (not guaranteed!).
Default: 60
High resolution timestamp (ms) of when this animation was last mutated.
Default: 0
A number between 0 and 1 representing the animation's progress through its loop LAST frame.
Default: 0
This animation will pause after this many loops.
Default: Infinity (i.e. animation continues forever)
A number between 0 and 1.
The base transparcency to apply to colours when drawing.
Default: 1
Each differentiable section will have this much less opacity than the previous section (minimum 0).
Default: 0
Controls the pulse in opacity (see HexPulse)
The (x,y) value of the geometric centre of the canvas.
Default: {x: Math.floor(canvas.width / 2), y: Math.floor(canvas.height / 2)}
Uses this.context to draw the current frame of the animation, as determined by this.currProgress. Called by this.animate.
Sets one or more configurable properties of this Animautomaton.
An object containing one or more valid {SempiternalOps} properties.
Controls the pulse in opacity (see HexPulse)
The number of circle radii each 'ring' is from the origin.
A number between 0 and 1.
This animation will be still in its starting position for this proportion of its duration.
Default: 0
Number of rotations to complete in one loop. Must be an integer.
The number of circles per side of the hexagon, also the number of 'rings'.
Transformation to apply to this animation's progress.
Default: sinusoidal
Given two points {from} and {to}, calculates the control points necessary to draw a Bezier curve from {from} to {to} that is part of a circle with center of {originOffset}
An object containing the Bezier control points.
Draws a line from the current position of this.context to the position given by vector v.
Moves this.context to position vector v
Draws a radius 2 circle at the position given. Used for debugging.
Sets one or more configurable properties of this Animautomaton.
An object containing one or more valid {SempiternalOps} properties.
Abstract parent class containing shared properties and methods for all animautomatons.