Properties and Methods By Class

introduction class AFrame class ACues class Easies class Easy constructor(obj): the obj argument the leg object class EBase EFactory.js/create(obj): the obj argument class Easer class EaserByElm class MEBase class MEaser class MEaserByElm class PBase class Prop class Bute class PrAtt class HtmlBute const P: PBase instances by name class Func class CFunc class ColorFunc class SRFunc const F: Func instances by name more const Objects const PFactory: initialization functions const U:  units const Is: boolean functions const Ez: a factotem const E:  mostly pertaining to class Easy integer indexes for argument masking const Ease: CSS and jQuery-style presets class EBezier class ECalc

Intro: Basic Class Structure

Note: ACues and Incremental are not fully functional as of release 1.0. Look for them in a 1.1 release. For examples of cue-based and incremental animations, visit my homepage at sidewayss.com. Cue-based animations are for first-time visitors only.

The outermost class is AFrame. It has the play() method and contains the animation objects in its targets property.

targets contains instances of Easies or ACues.

class Easies contains a Set of Easy instances. Easies emulates a Set of Easys for the iterator, has(), add(), delete(), clear(), values(), and size. Each Easy has a linked list of legs, each with its own timing function.

Easies.prototype.targets is an array of MEaser instances. M is for "multi". Each MEaser has an easies property filled with references to Easys contained in this.easies.

Easy.prototype.targets is a Set of Easers.

class EBase and its subclasses run the calculations and apply the values during animation.

Easer and EaserByElm inherit from EBase. The "ByElm" class is for single elements and loopByElm

class MEBase inherits from EBase. It is the multi-ease subclass

class MEaser and MEaserByElm inherit from MEBase.

class PBase and its sub-classes: Prop, Bute, and HtmlBute PrAtt wrap CSS properties and SVG/HTML attributes.

class Func and its sub-classes: Func, ColorFunc, and SRFunc wrap CSS/SVG functions

class AFrame
Public
properties
targetsSet(Easies, ACues)get returns shallow copy as array
zeronumber, read-onlythe animation zero-timestamp in milliseconds
nownumber, read-onlythe current, relative animation timestamp
elapsednumber, read-onlymilliseconds elapsed since the start of animation
useNowbooluse performance.now() instead of timeStamp
oneShotbooltrue sets onArrival = E.empty
frameZeroboolestablish zero time in the first animation frame
initZeroboolinitialize elements when zero is established
syncZerofunctionruns when zero is established
perifunctionruns once per #animate()
postfunctionruns on arrival
keepPostbooldefault = false = one-shot this.post
statusint,  read-onlythis.#status, int enum generated from Easy.status
atOriginbool, read-onlythis.#status == E.original
atInitialbool, read-onlythis.#status == E.initial
hasArrivedbool, read-onlythis.#status == E.arrived
isPausingbool, read-onlythis.#status == E.pausing
isPlayingbool, read-onlythis.#status == E.playing
isEmptybool, read-onlythis.#status == E.empty
fpsobject, read-onlytest results/data for baseline test
gpuobject, read-onlyditto for gpu test
methods
newCues()ACuesadds a new ACues target
newEasies()Easiesadds a new Easies target
addTarget()undefinedadds a previously created target of either type
cutTarget()boolremoves a target, returns true if deleted
clearTargets()undefinedclears all targets
play()Promiseplays the animation
pause()int status enumpauses  the animation, promise.resolve(E.pausing)
stop()int status enumcancels the animation, promise.resolve(E.original)
cancel()int status enumcancels the animation, promise.resolve(status)
arrive()int status enumjumps to the end of the animation, E.arrived
init()int status enuminitializes the animation, E.initial
fpsBaseline()Promiseestimates a baseline browser frame rate
gpuTest()Promiseruns a user-defined gpu stress test animation
static methods
fpsRound()numberrounds to nearest "commonly used" frame rate
class ACues
Public
properties
cuesarray: [{}]read-write
prefunction
perifunctionalias callback, defaults to default()
postfunctionread-write
elmsarray: [Element]elements for default()
propPropthe property to set in default()
validateboolvalidate user cues or not, default = true
isACuesbool, read-onlyalways true
methods
default()functionthe default callback/peri function
newCue()
addCue()
splice()
push()
unshift()
insert()
"Protected"
methods
_next()
_resume()
_zero()
_reset()
_runPost()
class Easies
Public
constructor(arr)Easiesvalidates arr as arrayish, converts it to set
Set emulation
sizeintthis.#easies.size
has()boolthis.#easies.has()
add()undefinedthis.#easies.add()
delete()boolthis.#easies.delete() plus
clear()undefinedclears #easies, #backup, #targets, #easy2Targets
values()iteratorthis.#easies.values()
[Symbol.iterator]()iteratorthis.#easies.values()
properties
easiesarrayshallow copy of the internal set #easies
targetsarrayshallow copy of the internal set #targets
statusint from enumMath.max(...this.#easies.map(ez = ez.status))
oneShotbool
perifunctioncalled once per frame
postfunctioncalled once the Easies has finished
isEasiesbool, read-onlyalways true
instance methods
newTarget()Measercreates new MEaser, adds it to #targets, easy2Targets
addTarget()Measeradds existing MEaser to #targets, easy2Targets
cutTarget()booldid the target exist? was it deleted?
clearTargets()undefinedclears #targets and the Sets in #easy2Targets.values()
init()undefined
restore()undefined
static methods
createFromTargets()Easiescreates an Easies instance from [MEaser]
"Protected"
methods
_zeroundefinedwrite-only, initializes easies for fresh playback
_resume()undefinedresumes after animation paused, AFrame.play()
_reset()undefined
_runPost()undefined
_next()boolruns every frame, returns (this.status != E.arrived)
class Easy
Public
properties
timeint msthe base duration of one one-way play
waitint mstime to wait before starting the clock
loopWaitint mstime between end of play and start of next
tripWaitint mstime between outbound and auto-inbound
durationint ms, read-only full duration of one play, including round trip
delayint ms, read-only this.wait + this._firstLeg.wait
firstTimeint ms, read-only the duration of the first play
loopTimeint ms, read-only the duration of each play after the first
tripTimeint ms, read-onlythe duration of the return aka inbound trip
playsintmin = 1, number of times to play animation
oneShotboolclears targets upon arrival
roundTripboolenables flipTrip, autoTrip, tripWait
flipTripbooldefaults to true, flips the curve for inbound
autoTripbooldefaults to true, auto-return to start
(!autoTrip && roundTrip && plays > 1) is not allowed
autoTrippingbool,   read-onlyreturns (autoTrip && roundTrip)
startfloat,  read-onlydefaults to 0
endfloat,  read-onlydefaults to 1
distancefloat,  read-onlyunsigned distance between start and end
targetsarray: [Easer]get returns a shallow copy
prefunctioncalled just prior start of animation
perifunctioncalled once per frame
postfunctioncalled when animation arrives
onAutoTripfunctioncalled when inbound trip begins
onLoopfunctioncalled with next play begins
initial_eobject, read-onlythe initial state of this.e
isEasybool,   read-onlyalways true
methods
arrive()undefined
restore()undefined
init()undefined
initRoundTrip()undefined
newTarget()EBase subclasscreates and optionally adds an Easer to #targets
addTarget()undefinedadds an Easer to #targets
cutTarget()boolremoves a target
clearTargets()undefinedclears the targets collection
"Protected"
properties
_firstLegleg objectstarting point for the linked list of legs
_legleg objectthe currently animating leg
_nownumberthe current relative time
_valuenumberfor E.increment
_inboundboolshared shorthand for e.status == E.inbound
methods
_validate()static boolvalidates that an object is of class Easy
_duration()numbermore flexible than, and used by, this.duration
_zero()undefinedinitializes prior to animation
_resume()undefinedprepares to resume post-pause
_reset()undefineduser-initiated reset or AFrame.prototype.stop()
_easeMe()this.e.statuscalled by Easies.prototype._easeEm() during animation
_calc()undefinedcalled by easeMe(), overridden in incremental.js
_nextLeg()this._legcalled by easeMe(), shared with incremental.js
_trip()undefinedcalled by _nextLeg(), shared with incremental.js
_listEstringreturns lists of E.xxx constants for error messages
_finishLegs()boolshared with other constructor()-related modules
_setTimeCount()numbershared with incremental.js
Easy.prototype.constructor(obj) - the obj argument
user properties
timeint msrequired for non-incremental
waitint msdefault: 0
loopWaitint mswait time before starting a looped playback
tripWaitint msauto-trip pause, before heading inbound
roundTripbooldefault: 0
autoTripboolwait time before starting a looped playback
flipTripboolauto-trip pause, before heading inbound
startnumberdefault: 0
endnumberdefault: 1, no distance property: unlike Easer
midnumbertwo-legged shorthand: mid-point value = leg1.end
splitint msmid-point in time = leg1.time
gapint msduration of pause at mid-point = leg2.wait
typeint: E.typedefault: linear = leg.type, not an Easy property
ioint enumE.in, E.out, and all two-legged combinations thereof
pownumberthese four are mutually exclusive:
bezierarray or EBezier[0-1, 0-1, 0-1, 0-1] 0-1 is a soft range for the y values
stepsarrayin steps(): leg["steps"].slice()
incrementnumberthe amount to add to Easy.prototype._value every frame
jumpnumberE.start .end .none .both, just like CSS, for steps
timingint, array, Easyduration, array of times per step, Easy for easing time
valuesarrayarray of values per step, optional
easyEasyEasy for easing values
legsarray: [{}]user-specified legs
playsintdefaults to .loops + 1 || .repeats + 1 || 1
oneShotboolclears targets upon arrival
countintincrement count (vs time)
prefunctionruns pre-animation
perifunctionruns every frame
postfunctionruns post-animation
onLoopfunctionruns upon starting a new play
the Easy leg object
user properties, a subset of obj user properties
time int ms required for non-incremental
wait int ms default: 0
start number default: 0
end number default: 1, no distance property: unlike Easer
type int: E.type default: linear = leg.type, not an Easy property
io int enum E.in and E.out only
pow number these four are mutually exclusive:
bezier array or EBezier [0-1, 0-1, 0-1, 0-1] 0-1 is a soft range for the y values
steps array in steps(): leg["steps"].slice()
increment number the amount to add to Easy.prototype._value every frame
jump number E.start .end .none .both, just like CSS, for steps
timing int, array, Easy duration, array of times per step, Easy for easing time
values array array of values per step, optional
easy Easy Easy for easing values
some of the system-defined properties
unit number 0-1 end unit interval for this leg, 0-1 is soft range
comp number 0-1 the complement of the unit = 1 - unit
part number this leg's part of the whole, signed
prev leg object previous leg in list, dummied up for _firstLeg, #lastLeg
next leg object next leg in list
ease function the easing function to call, see easings.js
class EBase
Public
properties
loopByElmbooleanread-only, is feature on or off?
elmCountintread-only, number of elements
elmIndexintread-only, current element index for loopByElm
autoTripboolean or arrayor undefined or array with some undefined
playsint or arrayoverrides Easy if not undefined, ditto array
eKeyint or arrayE.value|unit|comp or array thereof for Measer
evaluatorfunctionsets #evaluate, overrides built-in code
perifunctionevery frame animation callback
onLoopfunctiononce per play animation callback
onLoopByElmfunctiononce per element animation callback
isEaserboolread-only, always true
isMEaserbooltrue if instance of MEBase, else undefined
methods
meTrip()for MEaser only
mePlays()
meEKey()
restore()
init()
setInitial()
calcInitial()
"Protected"
properties
_eValfunctionthis.#evaluate ?? this.#Eval or this.#MEval
_setfunctionthis.#setElm, this.#setElms, or this.#runPeri
methods
_validate()static boolvalidates that an object is of class EBase
_zero()initializes the object prior to animation
_autoTripping()returns bool or array [bool]
_playings()returns int or array [int]
_nextElm()increments #iElm for loopByElm
_parseElm()
_initByElm()
EFactory.js/create(obj): the obj argument
User properties
elmselement(s)or string id(s), alias elm, elements, element
propPBasethe property to animate
funcFuncthe function to use
unitsstring enumoptional, falls back to prop to func
maskarray: [int]argument mask: array of arg indexes, etc.
easiesarray: [Easy]for MEBase and subclasses
eKeystring enumthe easy.e property to calculate: E.value, E.unit, E.comp
evaluatorfunctionuser evaluate() function
factorNumber, [Number]alias f, distance, dist, end (see endToDist())
addendNumber, [Number]alias a, start
maxNumber, [Number]maximum value(s)
minNumber, [Number]minimum value(s)
loopByElmbooltoggles the loop by element feature
autoTripboolalias bAbE, indicates 2D arrays are by argument by element
playsint > 1
perifunctiononce per frame callback
onLoopfunctiononce per replay animation callback
onLoopByElmfunctiononce per element animation callback
setint enumE.net = "unstructured", E.set = override the current value, E.let or undefined = only override masked arguments
currentValue[], [[]]alias cV, user-supplied initial values for the elements
dontGetValuesbooldo not get the current DOM values!
byElmboolalias byElement, indicates 1D arrays are by element
byArgByElmboolalias bAbE, indicates 2D arrays are by argument by element
colorjsColoralias o.cjs, instance of Color.js class Color
displaySpacestringspaceId for color.display({space:spaceId})
pseudoboolfor pseudo-animations without elements
class Easerextends EBase1 property, >1 elements
_apply()
_calc()ECalc
class EaserByElmextends EBase1 element or loopByElm
_apply()
_calc()array: [ECalc]length = #cElms
isByElmbool, read-onlyalways true
class MEBaseextends EBasethe multi-ease Easer
Public
properties
easiesarray: [Easy]read-only
easy2Maskmapread-only
loopEasyEasyfor looping, see Easies.prototype._next()
autoTrippingarray: [Boolean]read-only
playingsarray: [Int]read-only
durationNumberread-only, in milliseconds
delayNumberMath.min(...this.#easies.map(ez => ez.delay))
methods
init()
"Protected" methods
_validate()static boolvalidates that an object is of class EBase
_zero()initializes the object prior to animation
class MEaserextends MEBase1 prop, >1 elms, >1 Easys
_apply()
_calc()array: [ECalc]length = o.lz aka o.easies.length
class MEaserByElmextends MEBase1 element or loopByElm
_apply()
_calc()array: [[ECalc]]by element by ez of #easies: [elm[ez]]
isByElmbool, read-onlyalways true
class PBase
Public
properties
namestring, read-onlyCSS/SVG function name
keystring, read-onlycamelCase name for obj.key notation and error msgs
funcFunccurrent default function for this property
unitsstring enumcurrent default units for this property
methods
join()stringjoins an array of args with func and separators
joinUn()stringjoin() for "unstructured" properties, functions
get()string, [string]wraps getOne() || getMany() for convenience
getOne()stringgets the value for one element
getMany()[string]gets the values for more than one element
getn()number, [number]same as get() but soft-converts to number
getUn()object, [object]returns parsed DOM value(s), for "unstructured"
getUnToObj()[object]getUn() customized for EFactory create()
computed()string, [string]goes directly to getComputedStyle()
parse()[string]parses a multi-argument value into an array
set()undefined
setOne()undefined
setMany()undefined
setIt()undefined
setEm()undefined
setOneUn()undefined
"Protected"
properties
_ustringwrite-only, backdoor to #units
methods
_unitz()
_mask()
_maskAll()
_2Num()
_validate()static boolvalidates that an object is of class PBase
_seps()static array
prehistoric methods that should be revived
let()undefinedSets only the masked arguments, leaving the rest of the current DOM value intact
net()undefinedSets only the masked numbers, leaving the rest of the current DOM value intact - for "unstructured"
class Propextends PBaserepresents a CSS property
count()unsigned intargument count, falls back to this.func.count
required()unsigned intrequired arg count, falls back to func.required
cut()alias remove()removes a property from element(s)
isPropbool, read-onlyalways true
class Buteextends PBaserepresents an SVG attribute ("Attr" is taken)
count()unsigned intargument count, falls back to this.func.count
required()unsigned intrequired arg count, falls back to func.required
cut()alias remove()removes an attribute from element(s)
getOne()stringoverrides of PBase:
setIt()undefined
setEm()undefined
isDef()bool
_unitz()string
isButebool, read-onlyalways true
class PrAttextends PBasefor SVG attributes that are supported in CSS
count()unsigned intargument count, falls back to this.func.count
required()unsigned intrequired arg count, falls back to func.required
cut()alias remove()removes property and/or attribute from element(s)
isPrAttbool, read-onlyalways true
class HtmlButeextends PBaserepresents an HTML attribute
count()unsigned intalways returns 1
required()unsigned intditto
cut()n/a for now
getOne()overrides of PBase:
setIt()
setEm()
isHtmlButebool, read-onlyalways true
const P
Public methods
visible()undefinedsets visibility as a boolean - for 1 or more elements:
displayed()undefinedsets display as a boolean
events()undefinedsets pointer-events as a boolean
isVisible()boolgets visibility as a boolean - for 1 element:
isDisplayed()boolgets display as a boolean
hasEvents()boolgets pointer-events as a boolean
enabled()undefinedan inverted-pseudo-disable()
PBase instances by name (incomplete relative to CSS, SVG, HTML)
Prop - CSS properties
miscellaneous, some don't animate
P.flex, P.flexFlow, P.alignItems, P.alignSelf, P.justifyContent, P.fontFamily, P.fontWeight, P.textAnchor, P.overflow, P.overflowX, P.overflowY, P.left, P.right, P.top, P.bottom, P.position, P.cursor, P.pointerEvents, P.display, P.mask, P.vectorEffect
background properties get aliases in format: bgName. for example: P.bgColor
P.backgroundAttachment, P.backgroundClip, P.backgroundOrigin, P.backgroundBlendMode, P.backgroundRepeat
"unstructured", no units, flexible arguments
P.border, P.borderImage, P.boxShadow, P.clipPath, P.offsetPath, P.shapeOutside, P.background, P.backgroundImage, P.backgroundSize, P.backgroundPosition, P.backgroundPositionX, P.backgroundPositionY
filter and transform can take one or more functions = "unstructured"
P.filter, P.transform, P.transSVG (SVG transform is a separate object)
color properties, they use color functions and optionally Color.js
P.color, P.accentColor, P.backgroundColor, P.borderColor, P.borderLeftColor, P.borderRightColor, P.borderTopColor, P.borderBottomColor
<length-percentage> properties
P.transformOrigin, P.maxHeight, P.maxWidth, P.minHeight, P.minWidth, P.padding, P.margin, P.paddingTop, P.paddingBottom, P.paddingLeft, P.paddingRight, P.marginTop, P.marginBottom, P.marginLeft, P.marginRight, P.borderTop, P.borderBottom, P.borderLeft, P.borderRight, P.borderRadius, P.borderWidth, P.borderTopWidth, P.borderBottomWidth, P.borderLeftWidth, P.borderRightWidth
Bute - SVG attributes
miscellaneous, none animate
P.class, P.href, P.lengthAdjust, P.preserveAspectRatio, P.type
"unstructured", no units, flexible arguments
P.d, P.points
<number> attributes
P.viewBox, P.baseFrequency, P.stdDeviation, P.surfaceScale, P.azimuth, P.elevation, P.k1, P.k2, P.k3, P.rotate, P.scale, P.seed, P.values
<length-percentage> attributes
P.dx, P.dy, P.startOffset, P.textLength, P.x1, P.x2, P.y1, P.y2
PrAtt - overlapping CSS/SVG properties/attributes
miscellaneous, none animate
P.fontStyle, P.visibility
color properties, they use color functions and optionally Color.js
P.fill, P.stroke, P.stopColor
numeric attributes of various types
P.x, P.y, P.r, P.cx, P.cy, P.height, P.width, P.strokeWidth, P.opacity, P.fillOpacity, P.strokeOpacity, P.stopOpacity, P.fontSize, P.fontSizeAdjust, P.fontStretch
HtmlBute - HTML attributes
P.value
class Func
Public
properties
namestring, read-onlyCSS/SVG function name
keystring, read-onlycamelCase name for obj.key notation and error msgs
unitsstring enumread-write
prefixstringread-only
countintread-only, argument count
requiredintread-only, required argument count
"UnitType"boolisUn for "unstructured", the rest are ._abC = "protected"
isFuncboolread-only, always true
methods
apply()stringthis.prefix + val + E.rp
join()stringEz._join(arr, u, this.#separator)
"Protected"
properties
_ustringread-only, backdoor to #units
methods
_seps()arraysets and returns an array of string argument-separators
class CFunc extends Func for space-specific color functions like lab() and rgb()
Astatic const int3, the zero-based index of the color alpha argument
alphaUnitsstring enumunits for color alpha argument
hueUnitsstring enumunits for color functions with hue: hsl, hwb, lch, oklch
class ColorFunc extends CFunc for the color() function
spacestringCSS color space id
prefixoverrides Funcextra leading argument: color(spaceId ...)
class SRFunc extends Func, for <shape-radius>: circle(), ellipse()
read-only properties: units, count, required (and #separator) are set by constructor()
const F
Public method
joinCSSpolygon()stringjoins an array of numbers into a CSS polygon() value
Func instances by name
Func
transform
F.translate, F.translateX, F.translateY, F.translate3d, F.rotate, F.rotateX, F.rotateY, F.rotateZ, F.rotate3d, F.matrix, F.scale, F.matrix3d, F.scale3d, F.skew, F.skewX, F.skewY, F.perspective, F.translateZ
filter
F.brightness, F.contrast, F.grayscale, F.invert, F.opacity, F.saturate, F.sepia, F.blur, F.dropShadow, F.hueRotate
"unstructured": F.abc.isUn = true
F.colorMix, F.inset, F.path, F.polygon, F.calc, F.linear, F.steps, F.linearGradient, F.radialGradient, F.conicGradient, F.repeatingLinearGradient, F.repeatingRadialGradient, F.repeatingConicGradient
CFunc
F.rgb, F.hsl, F.hwb, F.lch, F.oklch, F.lab, F.oklab
ColorFunc (w/aliases and alt-spellings including kebab-case CSS space id)
F.srgb, F.srgbLinear, F.a98Rgb, F.prophotoRgb, F.displayP3, F.rec2020, F.xyzD65, F.xyzD50
SRFunc
F.circle, F.ellipse
const PFactory
Public methods
init()undefinedinitializes almost everything
addAttributes()undefinedadds custom attributes to P and Pn
const U: units
<length>
U.px, U.em, U.rem, U.vw, U.vh, U.vmin, U.vmax, U.pt, U.pc, U.mm, U.in
<angle>
U.deg, U.rad, U.grad, U.turn
<time>
U.ms, U.s
<percentage>
U.pct = "%"
const Is: boolean functions
def()is the argument defined?
Number()is the argument a Number?
String()is the argument a String?
Element()is the argument an HTMLElement or SVGElement?
CSSRule()is the argument a CSSStyleRule?
SVG()is the argument an SVGElement?
A()is the argument an Array?
A2()is the argument a 2D Array?
Arrayish()is the argument "array-like"?
A2ish()is the argument 2D "array-like"?
const Ez: a factotem
Public
properties
defZeroarrayarguments for Ez.toNumber() in array form:
grThan0array
notNegarray
notZeroarray
okEmptyUndefarrayargs for Ez.toArray()
undefGrThan0arrayargs for Ez.toNumber(), generated by PFactory.init():
undefNotZeroarray
defGrThan0array
defNotNegarray
intGrThan0array
intNotNegarray
methods
promise()Promiseinstead of Promise.withResolvers()
is()undefinedassigns a read-only isAbc property to an object
readOnly()undefinedassigns a read-only property to an object
shallowClone()objectreturns a shallow clone of an object
newArray2D()2D arrayreturns a new 2D array, optionally filled
swapDims()2D arrayswaps 2D inner and outer dimensions
clamp()numberclamps a number between a min and a max
comp()boolcomplements a unit interval value = 1 - unit
compIf()boolconditional version of comp()
unitOutOfBounds()boolchecks for out-of-bounds units in an array
initialCap()stringconverts first character to upper case
toCamel()stringconverts string args into a single camelCase string
camelToKebab()stringconverts a camelCase string to kebab-case
kebabToCamel()stringconverts a kebab-case string to camelCase
kebabToSnake()stringconverts a kebab-case string to snake_case
toSum()numbersums numbers as a callback for Array.prototype.reduce()
toNumby()numbersoft numeric conversion, helps PBase and sub-classes
toNumber()numbernumeric conversion with lots of options
toArray()arraymore than a wrapper for Array.from(), lots of options
toElement()elementvalidates an element, converts string to element by id
toElements()arrayvalidates, converts to an array of elements
defaultToTrue()bool(arg === undefined) ? true : Boolean(arg)
noneToZero()number(arg === null) ? 0 : arg; for Color.js coordinates
"Protected"
methods
_mustBe()error & error message generating functions:
_mustBeErr()
_cantBe()
_cantBeErr()
_cant()
_cantErr()
_only()
_onlyErr()
_mustAscendErr()
_invalidErr()
_isElmy()validation functions:
_validObj()
_validFunc()
_join()helps Func/Prop.prototype.join()
_appendUnits()validates as it applies string units to numbers
_dims()counts array dimensions up to 2, non-array = 0, undefined = -1
const E: mostly pertaining to class Easy
Public properties
currentValuenull(alias E.cV) use current DOM value for factor, addend, max, min
eKey string constants
value"value"the value
unit"unit"the unit, range 0-1 inclusive
comp"comp"the complement of the unit
Easy and AFrame status values enumeration
arrived0the Easy has arrived and stopped animating
tripped1the Easy has arrived at the outbound destination of a round trip
waiting2the Easy is waiting, the value doesn't change across frames
inbound3the Easy is on the return leg of a round trip
outbound4the Easy is moving from start to end, calculating every frame
initial5the Easy is in its frame zero state, initial values set
original6the Easy has not set any property values
pausing7the AFrame is pausing the animation
playing8the AFrame is playing the animation
empty9the AFrame has no targets
Easy and leg type property enum
linear0the default linear timing function
sine1sine through bounce are "borrowed" from JQuery
circ2
expo3
back4
elastic5
bounce6
pow7variable timing based on user-supplied exponent
bezier8bezier timing based on [x1, y1, x2, y2]
steps8step function
increment9incremental function, doesn't require time
Easy and leg "io" property enum
in0the default ease in
out1ease out / the rest are for two-legged Easy only:
inIn2ease in-in
outIn3ease out-in
inOut4ease in-out
outOut5ease out-out
Step function jump enum
none0jump-none is the CSS equivalent
start1jump-start
end2jump-end
both3jump-both
Easer set property enum
let0only changes masked values
set1all args are masked, no need to get current values
net2only change numbers - for "unstructured" properties/functions
For conversion to/from degrees
rad 0.017453 = Math.PI / 180
grad1.111111 = 10 / 9
turn0.002778 = 1 / 360

indexes for argument masking:

C
feColorMatrixcolor
C.RR0 C.r0
C.GR1 C.g1
C.BR2 C.b2
C.AR3 C.a3
C.CR4 C.h0
C.RG5 C.s1
C.GG6 C.l2
C.BG7 C.w1
C.AG8
C.CG9 rgb()
C.RB10 hsl()
C.GB11 hwb()
C.BB12
C.AB13
C.CB14
C.RA15
C.GA16
C.BA17
C.AA18
C.CA19
HD
UHD color*
HD.l0
HD.a1
HD.b2
HD.c1
HD.h2
HD.x0
HD.y1
HD.z2
HD.alpha3
lab()
oklab()
lch()
oklch()
color()
M
matrixmatrix3d
M.a0 M.a10
M.b1 M.b11
M.c2 M.c12
M.e3 M.d13
M.f4 M.a24
M.tx3 M.b25
M.ty4 M.c26
M.d27
M.a38
M.b39
M.c310
M.d311
M.a412
M.b413
M.c414
M.d415
E
viewBox++
E.x0
E.y1
E.z2
E.w2
E.h3
E.width2
E.height3
rotate3d
E.angle3
SVG rotate()
E.svgRotA0
E.svgRotA1
E.svgRotY2

* display-p3 and rec2020 use RGB nomenclature

const Ease: CSS and jQuery-style presets
CSS-style
Ease.ease, Ease.in, Ease.out, Ease.inIn, Ease.inOut, Ease.outIn, Ease.outOut
jQuery-style
Quad: Math.pow(2)
Ease.quadIn, Ease.quadOut, Ease.inIn, Ease.quadInOut, Ease.quadOutIn, Ease.quadOutOut
Cubic: Math.pow(3)
Ease.cubicIn, Ease.cubicOut, Ease.inIn, Ease.cubicInOut, Ease.cubicOutIn, Ease.cubicOutOut
Quart: Math.pow(4)
Ease.quartIn, Ease.quartOut, Ease.inIn, Ease.quartInOut, Ease.quartOutIn, Ease.quartOutOut
Quint: Math.pow(5)
Ease.quintIn, Ease.quintOut, Ease.inIn, Ease.quintInOut, Ease.quintOutIn, Ease.quintOutOut
Sine
Ease.sineIn, Ease.sineOut, Ease.inIn, Ease.sineInOut, Ease.sineOutIn, Ease.sineOutOut
Circ
Ease.circIn, Ease.circOut, Ease.inIn, Ease.circInOut, Ease.circOutIn, Ease.circOutOut
Expo
Ease.expoIn, Ease.expoOut, Ease.inIn, Ease.expoInOut, Ease.expoOutIn, Ease.expoOutOut
Back
Ease.backIn, Ease.backOut, Ease.inIn, Ease.backInOut, Ease.backOutIn, Ease.backOutOut
Elastic
Ease.elasticIn, Ease.elasticOut, Ease.inIn, Ease.elasticInOut, Ease.elasticOutIn, Ease.elasticOutOut
Bounce
Ease.bounceIn, Ease.bounceOut, Ease.inIn, Ease.bounceInOut, Ease.bounceOutIn, Ease.bounceOutOut
class EBezier
Public
constructor(x1, y1, x2, y2, time) CSS cubic-bezier(x1, y1, x2, y2)
solve(x)floatsolves the cubic bezier for x
properties
timeint ms, write-onlycalculates #accuracy
arrayarray,   read-onlygets the 4 coordinates as an array
reversedEBezier, read-onlyreturns a flipped curve for roundTrip
class ECalc
Public methods
calculate()undefinedruns the calcs
static f()numberfactor = multiply
static a()numberaddend = add
Private
properties
#calcsarray: [calc object]one per config, famm order is critical
#oneDarray: [Number]1D array of calculated values
#twoDarray: [[Number]]2D array of calculated values
#valuenumbernon-array initial value
calc by dimensionality methods: #cNN()
#c00()N_ is the calculated value dimensionality
#c01()_N is the config/famm dimensionality
#c01s()the "s" is for "swap" dimensions
#c02()
#c02s()
#c10()
#c11()
#c11s()
#c12()
#c12s()
#c20()
#c21()
#c21s()
#c22()
#c22s()
#noop()this.#oneD.fill(this.#value);