Popmotion adheres to Semantic Versioning.
-
Roles are now getter/setters, if
get
andset
methods are present. For example: CSS role has getter/setters, so you can call:ui.css(element, { position: 'absolute', top: 0 });
Actor.stop().start()
was failing to run.
Actor.sync
now returnsActor
rather than the bound syncAction
.
svg
tags are now assignedui.css
role.
- Delaying test element creation in CSS Role prevents error in server-side rendering.
Sequence
class, for creating a sequence of non-sequential actions.onComplete
property toIterator.stagger
.- Pass an action as the
Iterator.each
andIterator.stagger
method
argument to automatically runstart
on eachActor
.
- Using rAF-provided timestamp instead of
performance.now
for smoother motion.
- @stoikerty: Fixed
performance.now
check for IE9.
Pointer
events now properly unbound onActor
stop.
Actor.smooth
now settable on a per-value basis.direct
value property added to take direct input values instead of inputOffset.
smooth
property added toTrack
- smoothes out values coming fromInput
sources.
watch
no longer overwritten onset
.
ui.select
now caches and finds cached Actors bound to DOM elements. If one Actor is found, it returns an Actor. If multiple Actors are found, an Iterator.reverse
method toIterator
.
- Adjusting
hasChanged
logic to always fire on first frame. - Changing
Iterator.stagger
logic for more even staggers.
- Manually moved the library class filenames to uppercase.
- Renamed some class files to uppercase to fix include fails in some Browserify compilations.
- Simulation functions are now sent
value <object>, frameDuration <int>, timeStarted <timestamp>
as arguments.
- Actions fired within an
onComplete
wouldn't start because the number of active Actions was being counted incorrectly.
- Major Firefox bug 1)
values
false-positive test forwatch
property, now explicitly checking forstring
. - Major Firefox bug 2)
element.style.hasOwnProperty()
always returning false, switching toin element.style
.
- Clearing Actor then/next queue on
start
. - Saving all arguments to queue via
then
so we can pass Inputs.
- Action-specific
onStart
,onUpdate
,onFrame
andonComplete
callbacks. These callbacks will be active only for the duration of the action, while callbacks attached to the host Actor will persist through all actions.
onStart
callbacks are now fired immediately before the Actor is activated, giving actions extra time to initiate and make use of the < 100ms response window.
- Bugfix for deep-copying Actions on Action start. That was a whoops and a half.
- Bugfix for subvalues not being flipped correctly.
- SVG Role divide by 0 error when
scale
=== 0.
- Bugfix where Popmotion would attempt to split numerical values.
- Bugfix for
complex
valueType regex where negative numbers were made positive.
- Full SVG support.
- Multiple simultaneous Actions on a single Actor - mix Simulations, Tracking and Tweens on the same elements!
- Animate complex strings, like
path
d
attributes. - Iterator - to allow single classes to be extended the ActorCollector has been dropped in favour of a generic Iterator class, which can iterate over any set of classes. This also makes it clearer when you're interacting with multiple items vs a single Actor, and these items are not longer limited to Actors.
- Roles -
ui.css
,ui.attr
,ui.svg
,ui.draw
. These are auto-assigned to Actors when initialised with anelement
property, but can also be manually assigned with theas
property on Actor initialisation. - Actors can have multiple roles by providing an array to
as
. - New roles can be created with
new ui.Role()
. - Value names can be translated before a Role accesses it, via a Role's
map
property. For exampleui.cssRole
mapsx
totranslateX
. - Action classes/definitions -
Tween
,Simulate
,Track
ui.addRoute
- see Rolesui.addPreset
,ui.addAction
- see Tween, Simulate and Track classesActorCollection
- see Iteratorplay
,run
,track
Actor methods - usestart
addToQueue
Actor method is nowthen
and takes Tween, Simulate and Track instances instead of raw properties.mapLink
Actor value property is nowmapFrom
.- Default tween
duration
set to300
. - Default tween
ease
set to"easeOut"
. reverse
,reset
->restart
,seek
methods moved toTweenControls
(returned when aTween
is passed tostart
)
flipValues
,reverse
,reset
,resetProgress
,resetOrigins
andseek
Actor methods - these are all going to be moved to theTween
class in3.2.0
- Fixing
bounce
andcapture
simulation calls.
- Removed undocumented
ui.addSimulation
- new simulations now passed as function instead of simulation name.
Actor.seek
no longer an Action, much higher performance.
- Only numerical properties can be set as functions to be resolved on action start.
ui.addEasing()
- New easing functions are now generated with
new ui.Easing()
and provided as theease
property. When provided an easeIn function,in
,out
andinOut
methods are returned.
Note: Forked from Redshift v2.1.1.
redshift
object name nowui
.- Terminology changes to fix API semantics:
- Action: Actor
- ActionCollection: ActionCollection
- Rubix: Action (as in, an Action an Actor can perform)
- Add new easing functions with
ui.addEasing()
. Provide the easeIn function and Popmotion will generate easeOut and easeInOut variants. - Add new simulation functions to
run
withui.addSimulation()
. - Any value can be a special value type, ie a color.
'#FFF'
splits into four numerical properties,Red
,Blue
,Green
andAlpha
. - Add new value types with
ui.addValueType()
. - HSLA value type support.
- Change Action
rubix
from"seek"
to"play"
onEnd.
- Added
.seek()
method to Actions.
- ActionGroup returns array of values when a getter is called.
onStart
regression from 2.0.0 - only firing for 'values' route.
- Fixing hasChanged regression, prevented .run() from stopping automatically.
- Adding Alpha property to all split color values (default: 1), in case a value has mixed RGB and RGBA properties.
- CSS values travelling through a splitter (ie backgroundColor is split into RGB values) can be set as functions like normal values.
- Upgraded stepped easing algorithm.
Action.hasChanged
set totrue
whenAction.isActive(true)
.props()
method removed - properties now saved directly to Action object..data()
functionality removed, just set properties of Action instead..flip()
is now.flipValues()
.
- ActionGroup.stagger() wasn't returning
this
- Action Groups for controlling multiple Actions at once.
- Stagger method for Action Groups.
- DOM selection support for creating Actions prepopulated with DOM elements.
- Calling .play(preset) while Action was in progress failed to add that call to the play queue.
- Added check for Process timers before clearing as clearTimeout is costing ~.4ms.